Reference no: EM132722829
Part -1:
The following are questions to answer:
1. Suppose a 2-dimensional clipping rectangle has its lower left corner at (30, 50) and its upper right corner at (220, 240). Hand simulate the Cohen-Sutherland algorithm on each of the following line segments:
i. (40, 140) - (100, 200)
ii. (10, 270) - (300, 0)
iii. (20, 10) - (20, 200)
iv. (0, 0) - (250, 250)
2. Consider the transformation necessary to scale a 2-dimensional object centred at (-1, 3) by 4
in the y-direction. The resulting object is still to be centred at (-1, 3).
i. List the sequence of steps necessary to accomplish this transformation.
ii. Write the individual transformation matrices needed to implement each of the steps in
(a) above. Hint: Use homogeneous coordinates.
iii. Compute the composite transformation matrix which will accomplish the entire transformation.
3. A camera's projection system is determined by its focal length, screen height, and screen aspect ratio (ratio of width to height). Given a camera with focal length f, screen height h, and aspect ratio a, give the screen position of 3D point x = (x, y, z), specified in the view coordinate frame of the camera. Assume a perspective projection.
4. Describe algebraically the steps taken by OpenGL to do a perspective projection of a single 3D vertex x into the canonical view volume, given a model view matrix M and a projection matrix P. You should do this in simple symbolic form. There should be no numbers or calculations.
5. Assuming that a call to function drawcube()will draw the vertices of a 1X1X1 cube centred at the origin, and a camera located at a position (0, 0, 100), is upright and aimed down the negative z axis. Using drawcube() as the only drawing primitive, give the sequence of OpenGL calls affecting the model view matrix needed to view a 3X4X1 box, oriented at 450 to the x axis and rotated -300 with respect to its y axis, after the 450 x rotation, and finally located with its centre at (5, 12, 3).
Part -2:
The following are questions to answer:
1. Using Adobe Photoshop design the graphics below:
2. Assuming that a certain full-colour (24-bit per pixel) RGB raster system has a 512-by-512 frame buffer, how many distinct colour choices (intensity levels) would be available? How many different colours could be displayed at any one time?
3. (a) What does it mean for a piecewise polynomial curve to be second order continuous?
(b) Verify that the uniform cubic B-spline, given below, is second order continuous.
4. Discuss how various visible-surface detection methods can be modified to process transparent objects. Are there any visible-surface detection methods that cannot handle transparent surfaces?
5. Using Adobe Photoshop, create the following images:
6. (a) Implement the basic radiosity algorithm for rendering the inside surfaces of a cube when one inside face of the cube is a light source.
(b) Write a program (using any common high-level programming language) to implement texture mapping for:
i. Spherical surfaces
ii. Polyhedrons.
Instructions for submission and grading
• Submit the assignment through VLE before the deadline (end of Week 4).
• Question 2, 3, 4 and 6 attract 15 marks each while, each of questions 1 and 5 attracts 20 marks.
• Please, save your designed graphics (in Question 1 and 5) in Encapsulated PostScript File (.eps) file format. Note: Any other format will not be accepted by the VLE
Attachment:- Assignment 2 CG.rar