0% found this document useful (0 votes)
11 views

Assignment One

The document provides an overview of various image formats, detailing their abbreviations, histories, types (raster or vector), and typical applications. It also includes explanations of several line-drawing algorithms used in computer graphics, such as Xiaolin Wu's, Gupta-Sproull, Midpoint, Bresenham’s, and DDA algorithms, along with their calculations and plotted points. The content is structured into two parts: the first focusing on image formats and the second on line-drawing algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Assignment One

The document provides an overview of various image formats, detailing their abbreviations, histories, types (raster or vector), and typical applications. It also includes explanations of several line-drawing algorithms used in computer graphics, such as Xiaolin Wu's, Gupta-Sproull, Midpoint, Bresenham’s, and DDA algorithms, along with their calculations and plotted points. The content is structured into two parts: the first focusing on image formats and the second on line-drawing algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

NYONGESA METHUSELLA MISIKO

SCT211-0069/2022
ICS 2311: COMPUTER GRAPHICS
ASSIGNMENT 1

PART A
Read on various image formats such as Ai, wmf, Cmx, cgm,svg ,odg, eps , dxf , bmp, jpeg
,Gif ,Tiff,PICT and png:
Explain what the abbreviation stand for and some history on the format.
State whether each of the graphic format above is raster or vector.
Briefly explain a typical application or area of usage of each of the format.

1. AI (Adobe Illustrator Artwork):


● History: It was developed by Adobe Systems in 1987 primarily for creating
vector-based illustrations.
● Type: Vector
● Usage: Used for creating logos, illustrations and scalable graphics without
quality loss.

2. WMF (Windows Metafile):


● History: It was introduced by Microsoft in 1987 as a graphics file format for
Windows applications.
● Type: Vector
● Usage: Used for clip art, vector graphics and images in Microsoft Office
documents.

3. CMX (Corel Metafile Exchange):


● History: It was developed by Corel Corporation for use with CorelDRAW
software.
● Type: Vector
● Usage: Used in CorelDRAW for saving graphic data with layout and vector
information.

4. CGM( Computer Graphics Metafile):


● History: It was standardized by ISO in 1987 for vector graphics interchange.
● Type: Vector.
● Usage: Used in engineering, aviation and technical documentation for
complex diagrams.

5. SVG(Scalable Vector Graphics):


● History: It was developed by W3C in 1999 as an open standard for vector
graphics on the web.
● Type: Vector
● Usage: It is ideal for web graphics, interactive graphics and animations.

6. ODG (Open Document Graphics):


● History: It was part of the OpenDocument standard developed by OASIS for
office applicdations.
● Type: Vector
● Usage: Used in applications like LIbreOfficeDraw for diagrams and drawings.

7. EPS( Encapsulated PostScript):


● History: It was developed by Adobe in the late 1980s to facilitate high-quality
printing.
● Type: Vector which can include raster elements.
● Usage: Used in desktop publishing and professional printing.

8. DXF (Drawing Exchange Format):


● History: It was developed by Autodesk in 1982 for exchanging CAD
drawings.
● Type: Vector
● Usage: Used in engineering and architectural designs for CAD
interoperability.

9. BMP (Bitmap Image File):


● History: It was created by Microsoft in 1986 for Windows operating systems.
● Type: Raster
● Usage: Used for storing high quality uncompressed images in Windows.

10. JPEG (Joint Photographic Experts Group):


● History: It was standardized in 1992 by the JPEG committee for compressing
photographic images.
● Type: Raster.
● Usage: It is widely used in digital photography and web images.

11. GIF (Graphics Interchange Format):


● History: It was introduced by CompuServe in 1987 for web graphics with
limited color colors and animation support.
● Type: Raster
● Usage: It is used for simple web animations and small images.

12. TIFF (Tagged Image File Fromat):


● History: It was developed by Aldus Corporation, which is now Adobe in the
mid-1980s for high-quality images.
● Type: Raster
● Usage: It is preferred in publishing, archiving and medical imaging.

13. PICT (Picture File Format):


● History: It was created in 1996 as a non-patented alternative to GIF.
● Type: Supports both vector and raster
● Usage: It is used for graphics interchange on classic Macintosh systems.
14. PNG (Portable Network Graphics):
● History: It was created in 1996 as a non-patented alternative to GIF.
● Type: Raster.
● Usage: Used for web images requiring transparency and lossless
compression.

PART B:
1. Xiaolin Wu's line algorithm ((1,1) and(3, 5).
Formula: Handles anti-aliasing by calculating intensity based on distance from the
theoretical line.
Calculating slope (dy/dx) = (5-1) / (3-1) = 2
Starting with x = 1 and y = 1:
Moving along x, we calculate y as: y0 + slope * (x - x0)
For x = 2, y = 1 + 2*(2-1) = 3
For x = 3, y = 1 + 2*(3-1) = 5
Points plotted: (1,1), (1,2), (2,2), (2,3), (2,4), (3,4), (3,5)

2. Gupta-Sproull algorithm (-2, 3) and (1, 4).


Formula: Focuses on anti-liasing by distance between the pixel center and the line.
Calculating differences: dx = (1-(-2)) = 3, dy = 4-3 = 1
Intial decision variable: d = 2 * dy-dx = 2 * 1-3 = -1
Iterations:
X = -2, y = 3: d < 0, d = -1 + 2 = 1, x = -1
X = -1, y = 3: d > 0, d = -3, y = 4, x = 0
X = 0, y = 4: d < 0, d = -3 + 2 = -1, x = 1
X = 1, y = 4: stop
Points plotted: (-2,3), (-1,3), (0,4), (1,4)

3. Midpoint Algorithm (- 3, 4) and (5, - 2).


Formula: Deteremines the next pixel based on the midpoint between two possible
pixels and chooses the one closer to the ideal line.
Calculating differences: dx = (5-(-3) = 8, dy = -2 - 4 = -6
Initial d = dy - (dx / 2) = -6 - (8 / 2) = -10
Process:
X = -3, y = 4: d < 0, d = -10-6 = -16, x = -2
X = -2, y = 4: d < 0, d = -16-6 = -22, x = -1
X = -1, y = 4: d < 0, d = -22-6 = -28, x = 0
X = 0, y = 3: d < 0, d = -28-6 = -34, x = 1
X = 1, y = 3: d < 0, d = -34-6 = -40, x = 2
X = 2, y = 2: d < 0, d = -40-6 = -46, x = 3
X = 3, y = 1: d < 0, d = -46-6 = -52, x = 4
X = 4, y = 0: d < 0, d = -52-6 = -58, x = 5
X = 5, y = -2: stop
Points plotted: (-3,4), (-2,4), (-1,4), (0,3), (1,3), (2,2), (3,1), (4,0), (5, -2)
4. Bresenham’s Line-Drawing Algorithm (1,5) and (2,8).
Formula: Uses integer addition, subtraction and bit shifting.
Calculating differences: dx = 2 - 1 = 1, dy = 8 - 5 = 3
Initial d = 2dy-dx = 5
Iterations:
X = 1, y = 5: d > 0, d = 5 + 2*(3-1) = 9, y = 6, x = 1
X = 1, y = 6: d > 0, x = 2, y = 7
Points plotted: (1,5), (1,6), (2,7), (2,8)

5. Midpoint Line-Drawing Algorithm (0,2) and (−1,4)


Formula: Similar to the standard Midpoint algorithm but uses symmetrical properties.
Calculating differences: dx = -1, dy = 2
Initial d = dy - (dx / 2) = 2.5
Process:
X = 0, y = 2: d > 0, d = 2.5 + (2 - (-1)) = 5.5, y = 3
X = -1, y = 3: d > 0, y = 4, stop

Points plotted: (0,2), (-1,3), (-1,4)

6. DDA line drawing Algorithm (5,2) and(10, 3).


Formula: max(|dx|, |dy|)
Calculating differences: dx = 5, dy = 1
Initial d = max(|dx|, |dy|) = 5, xInc =1 , yInc = 0.2
Process:
(5,2), (6,2.2), (7,2.4), (8,2.6), (9,2.8), (10,3)

Points plotted: (5,2), (6,2.2), (7,2.4), (8,2.6), (9,2.8), (10,3)

You might also like