Sample Solution to Midterm Examination 1

CSUDH Computer Science Department

CSC461 Computer Graphics I (Fall 2004)

   

1.      (30 points, 3 points each) Briefly explain

1)        Main components of image formation

Three main components are: Objects, Viewer, and Light source(s)

 

2)      The pipeline architecture of computer graphics systems

 

 

 

 

3)      The disadvantages of the pinhole camera model

Two main disadvantages are 1) Pinhole is too small, and 2) Camera can not be adjusted to have a different angle of view

 

4)      How to identify the GL, GLU, and GLUT functions in OpenGL

The prefix of the function name: glXxxx for GL function, gluXxxx for GLU function and glutXxxx for GLUT function

 

5)      RGB color model and index color model

The RGB color model uses Red, Green and Blue three components to form a color, while the index color model uses pre-defined and indexed colors.

 

6)      Single-buffering and double-buffering, and how they are specified and used in OpenGL

Single-buffering uses a single frame buffer for both imaging and rasterization, while double-buffering uses a back frame buffer for imaging and a front frame buffer for rasterization.

To use single-buffering: set the display mode with GL_SINGLE, and call glFlush to rasterize

To use double-buffering: set the display model with GL_DOUBLE, and call glutSwapBuffers to rasterize

 

7)      The idle callback, and how the idle callback is used for animation

The idle callback is a special event handler for handling no events, meaning that after each main loop, if no events occurred, this handler will be called.

 

To animate, we should work with some global variable, which is initialized in initialization and is used to draw objects in the display callback. Additionally, the global variable should be updated in the idle call back, after which the post redisplay should be activated.

 

8)   Three approaches for picking objects on screen

Color-based, Bounding rectangles, and Hit list – selection

 

9)   How to draw erasable lines (rubberbanding)

Use XOR bit operation and follow the process: Switch to XOR write mode; draw a line; and re-draw the line to erase it

 

10)  Physical and logical input devices

Physical input devices are input devices that have physical properties such as mouse, keyboard, joystick, etc.

 

Logical input devices are input devices that do not physically exist, but have logical data input behaviors such as a locator, a choice, etc.  

 

2.      (10 points) A certain graphics system with a CRT display is advertised to display any four out of 64 colors. What does this statement tell you about the frame buffer, and about the quality of the CRT?

If it can display four colors, there are 2 bits per pixel in the frame buffer. Because 64=23*2, we can display only 4 reds, 4 greens, and 4 blues which probably indicates a low quality CRT.

 

3.      (10 points) It is possible to design a color CRT that uses a single electron gun and does not have a shadow mask. The single beam is turned on and off at the appropriate times to excite the desired phosphors. Why might such a CRT be more difficult to design, as compared to the shadow-mask CRT?

There are single beam CRTS. One scheme is to arrange the phosphors in vertical strips (red, green, blue, red, green, blue, …). The major difficulty is that the beam must change very rapidly, approximately three times as fast as each beam in a three beam system like the shadow mask CRT. In such a system the electronic components must also be much faster and more expensive.