0% found this document useful (0 votes)
37 views5 pages

Tutorial 1

The document discusses 5 questions related to computer graphics concepts. Question 1 calculates pixel display times for non-interlaced and interlaced raster monitors. Question 2 provides the steps and parameters for drawing a line using the midpoint line drawing algorithm. Question 3 finds the intersection point of a plane and line. Question 4 finds the coordinates of a reflected triangle across a line. Question 5 determines the velocity of a point's projection onto a plane given its 3D velocity and the camera's focal length.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views5 pages

Tutorial 1

The document discusses 5 questions related to computer graphics concepts. Question 1 calculates pixel display times for non-interlaced and interlaced raster monitors. Question 2 provides the steps and parameters for drawing a line using the midpoint line drawing algorithm. Question 3 finds the intersection point of a plane and line. Question 4 finds the coordinates of a reflected triangle across a line. Question 5 determines the velocity of a point's projection onto a plane given its 3D velocity and the camera's focal length.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

CS6360 - Computer Graphics

Tutorial 1; Total time: 50 mins


Question 1:
Consider a raster monitor of resolution 640*480 pixels. A scanning is used with horizontal retrace time
of 4 micro seconds and vertical retrace time of 20 micro seconds respectively. Calculate the time
available to display a pixel for both cases of (i) non-interlaced and (ii) interlaced. Assume a scan rate of
50 frames per seconds

Answer:
(A)
(i) Non-interlaced:

Time per scan = (1000/50) = 20 m sec

Retrace/ scan = (20 + 480x4) micro sec = 1.94 ms

Total time to scan pixels = 20 – 1.94 = 18.06 ms

Therefore, time per pixel = = 58.8 nano sec

(ii) Interlaced:
Time per fields = 100 ms

Retrace/ field = (20 + 240 x 4) = 0.98 ms

Total time to scan pixels/ field = 10 – 0.98 = 9.02 ms

Therefore, time per pixel = = 58.7 nano sec

(B) No. of pixels displayed per second = 640*480*50.


No. of horizontal retraces per second = 480*50

No. of vertical retrace per second for non-interlaced case = 50

No. of vertical retrace per second for interlaced case = 50*2 = 100

Total horizontal retrace time per second = 480*50*4 micro-secs ≈ 96 milli-secs

Total vertical retrace time per second for non-interlaced case = 50*20 micro-secs ≈ 1 milli-sec

Total vertical retrace time per second for interlaced case = 100*20 micro-secs ≈ 2 milli-secs.

(i) Non-interlaced total retrace time in a second for non-interlaced case is 97 milli-secs.
So, time available for all pixel displays during a particular scan is: (1000-97)milli-secs =
903 milli-secs.
Therefore, time available to display a single pixel for non-interlaced case is :
903/(640*480*50) milli-sec = 58.8 nano-secs.

(ii) Interlaced total retrace time in a second for interlaced case is 98 milli-secs.
So, time available for pixel display during a particular scan is: (1000-98) = 902 milli-secs.

Therefore, time available to display a single pixel for interlaced case is :


902/(640*480*50) milli-sec = 58.7 nano-secs.

Question 2:

Write the pixels to be considered to draw a line between (10,15) and (17,20) using mid-point line
drawing algorithm. Mention the initial values of the required parameters as well as the change in values
of the necessary parameters.

Answer:

x1 = 17, y1 = 20; x0 = 10, y0 = 15; dx = 7, dy = 5, Dstart = 3

Sl. No. d x y change

0 d=3 10 15 -

1 d = 3+(-4) = -1 11 16 NE

2 d = -1+10 = 9 12 16 E

3 d = 9-4 = 5 13 17 NE

4 d = 5-4 = 1 14 18 NE

5 d = 1-4 = -3 15 19 NE

6 d = -3+10 = 7 16 19 E

7 d = 7-4 = 3 17 20 NE
Question 3:
A plane determined by the points and and a line passing through the points and intersect
the plane at a point, Q. Find the coordinates of Q.

Answer:
The point Q satisfies eqn of both line and plane,
Parametric eqn of plane,
⃗ ⃗⃗⃗⃗⃗ (⃗⃗⃗⃗⃗ ⃗⃗⃗⃗⃗) (⃗⃗⃗⃗⃗ ⃗⃗⃗⃗⃗)

Parametric eqn of line,


⃗ ⃗⃗⃗⃗⃗ (⃗⃗⃗⃗⃗ ⃗⃗⃗⃗⃗)

⃗⃗⃗⃗⃗ (⃗⃗⃗⃗⃗ ⃗⃗⃗⃗⃗) ⃗⃗⃗⃗⃗ (⃗⃗⃗⃗⃗ ⃗⃗⃗⃗⃗) (⃗⃗⃗⃗⃗ ⃗⃗⃗⃗⃗)


(⃗⃗⃗⃗⃗ ⃗⃗⃗⃗⃗) (⃗⃗⃗⃗⃗ ⃗⃗⃗⃗⃗) (⃗⃗⃗⃗⃗ ⃗⃗⃗⃗⃗) ⃗⃗⃗⃗⃗ ⃗⃗⃗⃗⃗

t can be solved as,

[ ]

[ ]

This value can then be plugged back in parametric eqn of line to give the point of intersection.
Question 4:

Consider the line L and the triangle ABC as shown in the figure given below. The equation of the line L is
y=x+2. The coordinates of the points A, B and C are (2,5,1), (2,8,1) and (4,8,1) respectively. A*B*C*
represents the reflection of the original triangle ABC through the line L. Find the co-ordinates of A*, B*
and C*.

Answer:

The line will pass through the origin by translating it -


2 units in the y direction. The resultant line can be
made coincident with the x axis by rotating it by –tan-
1
(1) = -45 degree about the origin. After that, the
triangle ABC can be reflected through the line L,
which now coincides with the x axis. The transformed
position vectors of the triangle are then rotated and
translated back to the original orientation. The
combined transformation is:

√ √ √ √
[ ] [ ] [ ]
√ √ √ √
[ ] [ ]

√ √ √ √
[ ] [ ]
√ √ √ √
[ √ √ ]

√ √ √ √
[ ]
√ √ √ √
[ √ √ ]

=[ ]

Hence, the transformed position vectors for the triangle A*B*C* are:

[ ] [ ] [ ]
Question 5:

Let a point P moves with at an uniform velocity v on a linear path in 3D. Find the velocity of point Q,
which is the perspective projection of P on a 2D plane. Consider the focal length of the camera be f.

Answer:

Let the velocity of P along x, y and z coordinates be v1, v2 and v3 respectively ( ⃗⃗ = [v1 v2 v3]). Let after one
unit time, the point P moves to the location P’. Hence, in the projection plane, the point Q moves to the
new location Q’. If the projection matrix is given by the matrix T, where:

[ ]

Then, displacement of P’ from P is [ ]

Displacement of Q’ from Q = P’T-PT = [ ]*T = [ ]

Hence the velocity in the projection plane is [ ]

You might also like