Showing posts with label cg. Show all posts
Showing posts with label cg. Show all posts

November 01, 2018

Computer Graphics - Answer Keys

Section – A (7 x 8 marks = 56 marks)

Question 1.The co-ordinates of only one eighth of the total pixels lying on circumference of a circle are computed. Why? The Bresenhem’s circle drawing algorithm can be adapted for computing the coordinates of other pixels, explain?

Solution Scheme: 
Circle is symmetric about its axis. So, if point (x,y) is on the circle, then we can trivially compute (450 segment) seven other points (y,x),(y,-x),(x,-y),(-x,-y),(-y,-x),(-y,x),(-x,y) using the symmetry.(2 marks)
Bresenhem’s circle drawing algorithm (6 marks)

Question 2.Cohen-Sutherland line clipping technique uses the concept of region codes (or outcodes) in order to clip lines. Suppose a rectangular clip window ABCD is defined such that the lower left hand corner is at A(1,2) and upper right hand corner is at C (9,8). Clip the following line segments using Cohen Sutherland technique
  Line 1 from P(-1,7) to Q(11,1)
  Line 2 from R(3,7) to S(3,10)
  Line 3 from U(2,3) to V(8,4).