You are on page 1of 2

Birla Institute of Technology and Science-Pilani, Hyderabad Campus

First Semester 2018-2019


Midterm
Course No IS F311 Course Title: Computer Graphics
Type: Closed Time: 90 min Total Marks:20 (20% ) Date: 13/10/18

Name: ID:
Instructions: Attempt all the questions. Please write your answers clearly and concisely.
1. (0.5+0.5+1+1+1 points) Consider the following equation of a parabola x2 = 4ay, where a > 0. Lets
say we want to design a midpoint algorithm to rasterize this parabola. Answer the following questions.

1. Comment how to exploit symmetry in this case.


2. Show mathematically, how the slope of the tangent of parabola is changing in the first quadrant
when x is incremented starting from (0,0).
3. Lets say we have started scan conversion from (0, 0). Assume we have just plotted the pixel (xp , yp ),
where 0 < xp < 2a. What are the next two possible pixel we will look for? Explain using a diagram.
4. What is the implicit equation of parabola to be used in this case? How will we decide, which pixel
to choose (among the two possible choices in previous question) using midpoint strategy. Explain
using decision parameter.
5. Let d be the decision parameter. Explain for both pixel choices, how will we update the decision
parameter.

2. (1+1 points) Consider an axis S2 passing through origin and making an angle 45◦ and and orthogonal
axis S1 . Find the composite transformation matrix to scale a unit square with vertex coordinates
(0, 0), (0, 1), (1, 0), (1, 1) for a factor of 2 along S1 and a factor of 1 along S2 . Find the final coordinates
after transformation.
3. (3 points) We want to put a mirror in a 3D scene. The mirror is specified as a 3D rectangle specified
with its corner points and with one of its principle axes parallel to the y axis and the other parallel to
the xz plane (illustrated below Figure 1).
Give the transformation matrix that will generate mirror objects of all the objects in the scene (you may
assume all the objects are in front of the mirror). And show the results as a product of matrices.

Figure 1: Mirror Reflection


4. (2+3 points) 1. Consider a line segment between P1 (−1, −2), P2 (2, 4) and a clip window xmin =
0, xmax = 1, ymin = 0, ymax = 1. Explain the steps of Liang Barsky algorithm to demonstrate how
the clipping will be done.
2. Use Weiler-Artherton Polygon clipping algorithm to clip the subject polygon S1, S2, S3, S4, S5, S6, S7, S8, S9
with respect to the clip polygon P 1, P 2, P 3, P 4 as shown in the Figure 2. Describe all the steps of
the algorithm.

Figure 2: Subject Polygon and Clip Polygon

5. (1+2 points) Consider the points A(0, 5, 2), B(0, 5, 3), C(5, 5, 2), and D(5, 5, 3). Let the projection plane
be at z = d = 2, perpendicular to z-axis, and the center of projection be at origin O(0, 0, 0).
1. Compute the point of projection of all four point A, B, C, and D on the given projection plane.
2. Compute the vanishing point of the two parallel lines L1(A, B) passing through A and B and
L2(C, D) passing through C and D. Explain all the steps.
6. (1+2 points) 1. Explain how a Viewing Reference Coordinate (VRC) is set. Clearly mention the input
parameters required for setting up VRC.
2. Expalin using a block diagram, the basic steps of 3D viewing pipeline.

Page 2

You might also like