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

Computer Graphics

The document outlines various graphic file formats, including their abbreviations, histories, types, and applications, such as Adobe Illustrator (AI), Windows Metafile (WMF), and Scalable Vector Graphics (SVG). It also describes several line-drawing algorithms, including Xiaolin Wu’s Line Algorithm and Bresenham’s Line Algorithm, detailing their steps and calculations for rendering lines in computer graphics. The content serves as an educational resource for understanding both graphic formats and algorithms used in computer graphics.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Computer Graphics

The document outlines various graphic file formats, including their abbreviations, histories, types, and applications, such as Adobe Illustrator (AI), Windows Metafile (WMF), and Scalable Vector Graphics (SVG). It also describes several line-drawing algorithms, including Xiaolin Wu’s Line Algorithm and Bresenham’s Line Algorithm, detailing their steps and calculations for rendering lines in computer graphics. The content serves as an educational resource for understanding both graphic formats and algorithms used in computer graphics.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MESHACK OTIENO OUMA

SCT211-0765/2022

COMPUTER GRAPHICS ASSIGNMENT : BCT2405

1. AI (Adobe Illustrator)

• Abbreviation: Adobe Illustrator Artwork

• History: Developed by Adobe Systems in 1987 for use in Adobe Illustrator.

• Type: Vector

• Application: Used for creating logos, icons, and detailed illustrations due to its scalability
without loss of quality.

2. WMF (Windows Metafile)

• Abbreviation: Windows Metafile

• History: Developed by Microsoft in the 1990s for Windows applications.

• Type: Primarily vector, but can include raster elements.

• Application: Used in Windows applications for scalable graphics, clip art, and printing.

3. CMX (Corel Metafile Exchange)

• Abbreviation: Corel Metafile Exchange

• History: Developed by Corel Corporation for CorelDRAW.

• Type: Vector

• Application: Used for exchanging graphics between CorelDRAW and other applications.

4. CGM (Computer Graphics Metafile)

• Abbreviation: Computer Graphics Metafile

• History: Standardized in the 1980s by ISO for use in technical drawings.

• Type: Vector

• Application: Used in engineering, aviation, and military applications for technical diagrams.

5. SVG (Scalable Vector Graphics)

• Abbreviation: Scalable Vector Graphics

• History: Developed by W3C in 1999 as an open standard for web graphics.

• Type: Vector

• Application: Used in web design for scalable icons, illustrations, and animations.

6. ODG (OpenDocument Graphics)


• Abbreviation: OpenDocument Graphics

• History: Part of the OpenDocument standard, developed for open-source office suites.

• Type: Vector

• Application: Used in LibreOffice Draw and OpenOffice for illustrations and charts.

7. EPS (Encapsulated PostScript)

• Abbreviation: Encapsulated PostScript

• History: Developed by Adobe in the 1980s as a graphics format for high-quality printing.

• Type: Vector

• Application: Used in publishing, graphic design, and high-quality printing.

8. DXF (Drawing Exchange Format)

• Abbreviation: Drawing Exchange Format

• History: Developed by Autodesk in 1982 for CAD applications.

• Type: Vector

• Application: Used in AutoCAD and other CAD software for architectural and engineering
drawings.

9. BMP (Bitmap)

• Abbreviation: Bitmap

• History: Developed by Microsoft in the early 1990s for Windows graphics.

• Type: Raster

• Application: Used for high-quality images with no compression, often in Windows


applications.

10. JPEG (Joint Photographic Experts Group)

• Abbreviation: Joint Photographic Experts Group

• History: Developed in 1992 for efficient image compression.

• Type: Raster

• Application: Used for digital photography and web images due to its compression and
balance of quality.

11. GIF (Graphics Interchange Format)

• Abbreviation: Graphics Interchange Format

• History: Developed by CompuServe in 1987.

• Type: Raster

• Application: Used for web animations and simple graphics with limited colors.
12. TIFF (Tagged Image File Format)

• Abbreviation: Tagged Image File Format

• History: Developed by Aldus Corporation (later Adobe) in the 1980s.

• Type: Raster

• Application: Used in professional photography, publishing, and scanning due to its high
quality and lossless compression.

13. PICT (Macintosh Picture Format)

• Abbreviation: Macintosh Picture Format

• History: Developed by Apple in the 1980s for the Macintosh system.

• Type: Primarily raster, but can include vector elements.

• Application: Used in older Mac applications for images and graphics.

14. PNG (Portable Network Graphics)

• Abbreviation: Portable Network Graphics

• History: Developed in 1995 as a replacement for GIF, supporting transparency and lossless
compression.

• Type: Raster

• Application: Used for web images, UI elements, and graphics where transparency is needed

2.)

1. Xiaolin Wu’s Line Algorithm

Points: (1,1) → (3,5)


This algorithm uses anti-aliasing by assigning intensity values to pixels based on their distance from
the actual line.

Steps:

1. Calculate the slope:

m=(y1-y2) / (x2-x1) = (5-1) / (3-1) = 2

Since the slope is greater than 1, we will iterate over y instead of x.

For each y-value, compute the two closest x-values and assign intensities:

• The lower x-value gets a fractional intensity.

• The upper x-value gets the complement intensity.

Pixel calculations:

• At y = 1: X interpolates to ~1 → Plot (1,1) with full intensity.


• At y = 2: X interpolates to ~1.5 → Plot (1,2) and (2,2) with interpolated intensities.

• At y = 3: X interpolates to ~2 → Plot (2,3) with full intensity.

• At y = 4: X interpolates to ~2.5 → Plot (2,4) and (3,4) with interpolated intensities.

• At y = 5: X interpolates to ~3 → Plot (3,5) with full intensity.

2. Gupta-Sproull Algorithm

Points: (-2,3) → (1,4)


This algorithm is an anti-aliased version of Bresenham’s algorithm.

Steps:

1. Compute the slope:

m = (4-3) / (1-(-2)) = 1 /3

The slope is small, so x increments faster.

2. For each x-value, calculate the closest y-values:

o Assign pixel intensities based on distance from the line.

o Example:

▪ At x = -2: y = 3, so plot (-2,3) with full intensity.

▪ At x = -1: y = 3.33 → Plot (-1,3) and (-1,4) with interpolated intensities.

▪ At x = 0: y = 3.67 → Plot (0,3) and (0,4) with intensities.

▪ At x = 1: y = 4 → Plot (1,4) with full intensity.

3. Midpoint Algorithm

Points: (-3,4) → (5,-2)

Steps:

1. Compute increments:

dx = 5−(−3) = 8, dy = −2−4 = −6

2. Compute initial decision parameter:

P0 = 2Δy − Δx = 2(−6) −8 = −20

3. Iteration process:

o Start at (-3,4).

o Check P, update pixels based on decision rule:

▪ If P < 0, move right.


▪ If P ≥ 0, move diagonally (right and down).

o Continue updating until reaching (5,-2).

4. Bresenham’s Line Algorithm

Points: (1,5) → (2,8)

Steps:

1. Calculate increments:

dx= 2−1 = 1,dy = 8−5 = 3

2. Compute initial decision parameter:

P0 = 2dy – dx = 2(3) – 1 = 5

3. Iteration:

o Start at (1,5).

o At each step, if P ≥ 0, increase y and update P.

o The generated points:


(1,5), (1,6), (1,7), (2,8).

5. Midpoint Line-Drawing Algorithm

Points: (0,2) → (-1,4)

Steps:

1. Compute increments:

dx = −1 − 0 = −1, dy = 4 − 2 = 2

2. Compute initial decision parameter:

P0 = 2Δy – Δx = 2(2) − (−1) = 5

3. Iteration:

o Start at (0,2).

o Compute P, determine the next pixel.

6. DDA Algorithm

Points: (5,2) → (10,3)

Steps:

1. Compute steps:

dx = 10 – 5 = 5, dy = 3 − 2 = 1
Steps = max(|dx|, |dy|) = 5.

Compute increments:

Xinc = dx/steps = 5/5= 1, Yinc = dy/steps = 1/5 = 0.2

Generate points:

• (5,2), (6,2.2), (7,2.4), (8,2.6), (9,2.8), (10,3).

You might also like