Computer graphics
End product is picture/image.
Creation, presentation &
manipulation of pictures is CG.
Main building blocks of image is
PIXEL.
Frame buffers continuous memory.
One memory bit one pixel (0 or 1)
Vector and raster graphics
Vector graphics objects are drawn at once
Raster graphics objects are drawn each pixel at a
time
Most display devices use raster graphics for displaying a
image.
Scan conversion-generation of
display
Organize
picture into
precise Display
pattern image using
required by
video tech.
the graphics
display
Scan conversion (generation
of display)
Vector graphics
The patterns are predefined and
object is drawn at once.
Require information about only lines
and patterns (characters)
Raster graphics
The information about each pixel is
required to be stored for displaying
image.
Scan lines top to
bottom
left to
right
Raster graphics
The information about each pixel is
required to be stored for displaying
image.
Scan conversion techniques
Scan
conversion
Real time Frame
Run length
scan buffer
encoding
conversion memory
Real time scan conversion
Real time
Scan
conversion
Visual Geometric
attributes properties
Color, shade Coordinates
intensity , slopes,text
Real time scan conversion
Calculating
Scanning the pixel intensity
information for each scan
line
Processor
Less memory requirement
Pic info is randomly organized
Easy for add or delete the info
More useful for dynamic presentations
Simplest presentation
B
1 Intersection of
scan line and
actual line is
2 C stored in display
list
A
3
Active edge is
D the edge which
intersect the
particular scan line
1. Simple active edge list using
pointers
B
BC B
1
BA
C BD E
A
CD
D AD
1. Simple active edge list using
pointers
B
BC
1
BA B
2 C BD
A
CD E
D AD
1. Simple active edge list using
pointers
B
BC
1
BA
2 C BD B
A
3 CD
D AD E
Sorted active edge list
Y bucket is used. (x intercept, change in x
intercept from scan line to scan line,no of
scan lines cross the scan line)
1 Null
2 xBA,xBA,yBa
B
xBC,xBC,yBC
3 Null C
4 xCD,xCD,yCD A
5 Null
6 xAD,xAD,yAD D
7 Null
y null
8 decremented for each next scan line, if y<0, edge is
deleted. i.e. displayed on screen
Next x intercept can be obtained by adding x to
previous x intercept for each scan line
Y bucket with indexed list
1 xBA
2 xBA
1 Null 3 yBA
2 xBA,xBA, 1 4 XBC
yBa
5 xBC
6 yBC
xBC,xBC,y
BC 7
3 Null 8
8 xCD
4
9 xCD
xCD,xCD,y
CD 10 yCD,
5 Null 12 11
6
12 xAD
xAD,xAD,y End
AD of 13 xAD
7 Null scan 14 yAD
line
8 Null 15
Y bucket with linked list
1 xBA
2 xBA
3 yBA
1 Null
2 xBA,xBA, 4
1 5
yBa
5 XBC
xBC,xBC,y 6 xBC
BC 7 yBC
3 Null 8
8
4
xCD,xCD,y 9 xCD
CD End of data 10 xCD
5 Null grp, n- 12 11 yCD,
6 n location of
12
xAD,xAD,ynext data
AD grp on that 13 xAD
7 Null scan
Endline
14 xAD
8 Null of
scan 15 yAD
Image compression
Run length encoding
Image have large no of pixels having
same intensity
Run intensit
length y
Run length no of successive pixels
having same intensity
Intensity value of intensity
example
1 10 1
2
3
4
4 1 1 0 5 1
5
6
7
8 10 0
9
1 1 2 3 4 5 6 7 8 9 1
RLE for RGB
Run RED GREEN BLUE
length Intensi Intensi Intensi
ty ty ty
3 1 0 0 6 1 2 8
3 pixels of RGB intensities 1
0 0
6 pixels of RGB intensities 1
2 6
Storage requirements
Picture resolution 1024 X 1280 X
24
X * Y, 24 bit
image (RGB)
Frame rate 30 FPS
Storage req= (1024 x 1280 x 24 x 30)/(8
bit/byte)
= 3456 megabytes
Disadvantages of RLE
Sequential storage
Adding and deleting lines is difficult
Time consuming
Overhead due to both encoding and
decoding
assignments
1. 2 D transformations
2. 3 D transformations
3. Implementation of DDA line
algorithm
4. implementation of Bresenhams
line algorithm
5 . implementation of Bresenhams
circle algorithm