Professional Documents
Culture Documents
RB1803 B53
(x0,y0) = (0,r)
p0 = 5/4 – r
3. At each x[k] position, starting at k = 0, perform the following test: If p[k] <
0, the next point along the circle centered on (0,0) is (x[k+1], y[k]) and
Otherwise, the next point along the circle is (x[k+1], y[k-1]) and
5. Move each calculated pixel position (x,y) onto the circular path centered on
(xc,yc)
x = x + xc, y = y + yc
PART B
4 Give the rules for scan conversion of polygon region with the help of a example
Answer:-
The job of scan conversion is to shade pixels lying within a closed polygon, and to do so efficiently. The fill
colour will in general depend on the lighting, texture, and visibility of the polygon being scan-converted.
These will be ignored for the time being.
Let's assume that the polygon is closed and has ordered edges.
The scan conversion algorithm then works as follows:
0 0 1 0 0 1
0.707 -0.707 0 0 1 5
0.707 0.707 0 0 1 2
0 0 1 1 1 1
0 0 2.121
= 0 2 4.909
1 1 1
1 0 -1 0.707 0.707 0 1 0 1
0 1 -1 0.707 0.707 0 0 1 1
1 1 1 0 0 1 1 1 1
= 0.707 - 0.707 -1
0.707 0.707 0.414
0 0 1
0.707 - 0.707 -1 0 1 5
0.707 0.707 0.414 0 1 2
0 0 1 1 1 1
6. Generate the homogeneous matrix for the composite transformation by applying the
translation (tx,ty), followed by uniform scaling (s), and then followed by rotation (θ), on the
object (x,y) in a 2D homogeneous coordinate system. Further, apply the transformation
taking x=5, y=3, tx=7, ty=3, s=2, and θ=-30.
Answer:- Here ,we are required to first apply translation and then scaling and then we need to
rotate by angle θ .hence the reqd matrix will be a composite matrix . The required homogeneous
matrix for the composite transformation will be the product of four matrices and is given by
X’ cos Ѳ - sin Ѳ 0 s 0 0 1
0 tx X
Y’ = sin Ѳ cos Ѳ 0 0 s 0 0
1 ty Y
1 0 0 1 0 0 1 0
0 1 1
0 0 1 0 0 1 1
0 0 1
1
1 1
X’ 2.cos 150 – 6.sin 90 + 14.cos 30 – 6.sin 30
1 1
X’=25
Y’=-2