

















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















































1
2
8
10 Output Primitives Output Primitive Attributes Point Size Color Line Thickness (1pt, 2pt … ) Type (Dashed, Dotted, Solid) Color Text Font (Arial, Courier, Times Roman … ) Size (12pt, 16pt ..) Spacing Orientation (Slant angle) Style (Bold, Underlined, Double lined) Color Filled Region Fill Pattern Fill Type (Solid Fill, Gradient Fill) Fill Color Images Color Depth (Number of bits/pixel)
11
y y x x y x
y x
a x bx A(a x ,a y
B(b x ,b y
Current Pixel (x k , y k
To find (x k+ , y k+!
k+
k
y k+
Digital Differential Analyzer Algorithm is an incremental algorithm. Assumption: Slope is less than 1 (Increment along x). Current Pixel = (x k , y k
(x k , y k ) lies on the given line. y k = m.x k
Next point (x k+ , y k+ ) on the line y k+ = m.x k+
y k+ = y k
k+
k
k+
k
k
Midpoint algorithm is an incremental algorithm
Assumption: Slope < 1 Current Pixel
Candidate Pixels Current Pixel ( xk, yk) Midpoint Line Coordinates of Midpoint = ( x k +1, y k
( x k +1, y k
( x k +1, y k