Docsity

Computer Graphics - Solved Assignment, Exercises of Computer Graphics

Toggle sidebar
bg1
CS6360 - Computer Graphics
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.
pf3
pf4
pf5
Discount

On special offer

Partial preview of the text

Download Computer Graphics - Solved Assignment and more Exercises Computer Graphics in PDF only on Docsity!

CS6360 - Computer Graphics

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 = 64048050.

No. of horizontal retraces per second = 480*

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 = 480504 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/(64048050) 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/(64048050) 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:

x 1 = 17, y 1 = 20; x 0 = 10, y 0 = 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. ABC* 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 ABC* 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 v 1 , v 2 and v 3 respectively ( โƒ—โƒ— = [v 1 v 2 v 3 ]). 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 [ ]