CMPS 285 Final, Fall 1995

American University of Beirut · Computer Graphics · 5 pages

All CMPS 285 files
CMPS 285 Final, Fall 1995, page 1

Stuck on a question? A tutor can walk you through it.

CMPS 285 Final, Fall 1995, page 2 CMPS 285 Final, Fall 1995, page 3 CMPS 285 Final, Fall 1995, page 4 CMPS 285 Final, Fall 1995, page 5

More CMPS 285 files

Show the text of this final exam
VM EHIC AS CREME 14 LIBRARY 4 oF BEIRUT American University of Beirut Faculty of Arts @ Sciences Department of Mathematics Math 285-Computer Graphics Final - Fall 1996 Time: 2 hours Ahmad Nasri Student Id Number | Student Name (Surname, First) [ Grade / 100 ] NB; All graphics commands should be given in OpenGL format A. General (9 points) Answer by True or by False each of the following questions: 1. A rubber band state is active when only when a button is not held down. 2. Panning consists of mapping a variable size window to a variable size viewport. 3. In OpenGL Graphics segments (display lists) cannot be nested. . In the replicating methods for producing thick primitives, each computed pixel is duplicated in rows for lines with slope > 1 . In direct manipulation technique, objects, attributes, or relations are represented visually, 6. A potentiometer is a locator device that can be used to enter bounded value. B. Output Primitives (30 points) 1. Define each of the following: (a) Flyback time (c) Depth cueing (e) An interaction task (b) An icon (d) Surface rendering (f) A dialogue box . Explain the role of a video-controller in a raster scan system and sketch a diagram showing its main components. . How many pixels will be produced for the line from (2, y) to (r,s) by Bresenham’s algorithm? Count the first and last pixel. . Consider an RGB system that has a 512 x 512 frame buffer with 20 bits per pixel and a color lookup table with 24 bits per pixel. How many distincts gray levels can be displayed with this system? How may colors can be displayed simullancously? . Sketch out the piece of text J ENJOY GRAPILCS using a left path and an upvector 6. In the process of scan-line algorithm for area filling, what are the contents of the active edge list when processing the scan line indicated in the following picture. Describe the spans on that line. 13 C. Dithering (5 points) 1. A picture has been calculated for display on a workstation and then moved to a bi-level device and drawn using the following 4 x 4 ordered dithering matrix: 15 7 3 Will the pixel (103,103) with intensity 12 be turned on? Explain why. D. OpenGL (10 points) 1, Write an OpenGL segment that computes n points on a circle centered at the origin and of radius r = 1 and display a fan as shown below. . The fan above is to be used in a windmill shown below after enlarging it Lwo times. Using the fan segment, Write OpenGL code to describe a segment that draws the windmill. Assume that the body of the windmill is available in a segment WindMill() and the new center of the fan is at (0.7, 0.5). E. Antialiasing (10 points) 1. A line is supersampled using subpixels as indicated in the following picture. What is the color at each of the two pixels (10, 20) and (11,20). Assume that the line is drawn with intensity (255, 0,0) on a background color of intensity (100, 100, 100). . Assume that the maximum intensity of a primitive is (255, 0,0), and that half the area of a pixel is covered by that primitive, What is the intensity contribution (i,., dy, ty) of that pixel using a filter function f(2, y) = 2. Show how to get your answer. F. Windowing/Clipping (10 points) 1, A window in the world coordinates is defined by: XWmin=10 XWmar = 70 Ywmin = 20 Ywmar = 40 is to be mapped to a viewport defined by: Xtmin =0.5 XUmaz = 1.0 Yumin = 0.0 Yumar = 0.5 Give the Window-to-viewport transformation matrix in terms of a product of matrices. - Using the Cohen-Sutherland algorithm for linc clipping, Which of the following seg- ments (a to e) are can be trivially rejected? i.e. which do not need further processing. Show an example, where this algorithm fails to produce correct result. ‘fhe box rep- resents the window. ~~ SN G. Object Representation (10 points) 1. Give the quadtree representation of the object shown below: _ a | oi 2. Give the Polyhedral representation (vertices, faces and edges) of the following object: 6 5 H. Fractals (10 points) 1. Given the following first two successive steps of a fractal object: (a) What is the initiator and the generator? Draw them. (b) What is the Fractal Dimension? (c) What are the main properties of this fractal object? tc. statistically-self similar, self-similar, or etc? Answer each of the fullowing: I. Transformation (15 points) 1. Assume that the basic transformations are given in the following table: translation T(tz, ty) Rotation (6) about origin Scaling S'(Sz, Sy) factors positive Shear Shy or Shy(a) A composite transformation T(B, Sz, Sy, &) = R(f).S (Se, 8y).R(a) is applied to a unit square with corner at the origin: PP. q 8 (a) Draw a picture of the transformed square after applying each of the transforma- tions in T for the values (a = 90, 8 = 0,8, = sy = 2). (b) Find the transformation matrix of the composite transformation in terms of 6, Sx, Sy, and a. (c) Explain how to find the values of a, 8 sz, and Sy to make 7’ a shear in the x-direction.