You are on page 1of 3

Computer Graphics

QUIZ
1. Trackball and Translations are used to manipulate their OpenGL ________. a. scenes b. animations c. Movements d. Projection 2. The AppWindow class has a method init() and the dialog box has to be instantiated and opened within it. We must also attach the dialog box to a drawable window so it can be refreshed each time a live variable changes, When using _____________. a. Static variables b. Dynamic values c. live variables d. live values 3. The AppWindow constructor is modified to include the statement setEvents(KEY_DOWN_EVENT ) . So that _________. a. To receive the key released events b. To receive the key pressed events c. To receive the key up events d. To receive the key events 4. The _______ method is called I n turn, when the application is executed, the run() method creates the main window. a. init() b. Display
c. onKeyDown() d. refresh()

5. Object instantiation in Gwtk does not create the actual window. Instead, the window is created ____________ at the appropriate time. a. Externally b. Inline c. Internally d. None of the above. 6. Gwtk is an object-oriented toolkit written in C++ and provides a complete and well organized API for the creation and management of windows, dialog boxes and admin controls including several graphics specific controls. a. TRUE b. FALSE

Computer Graphics

7. In a computer graphics course, the main focus should be the graphical techniques and not a fancy interface. For simple interactive computer graphics programs, keyboard and mouse input is not sufficient and cannot produce excellent programs. a. TRUE b. FALSE 8. What if the 7th case of the following code is executed what will be the result:
void AppWindow::onKeyDown( int key, bool special ) { switch( key ) { case 'x' : thetaX += 5; break; case 'X' : thetaX -= 5; break; case 'y' : thetaY += 5; break; case 'Y' : thetaY -= 5; break; case 'z' : thetaZ += 5; break; case 'Z' : thetaZ -= 5; break; case 'o' : thetaX = thetaY = thetaZ = 0.0; break; case 'q' : exit( 0 ); } refresh(); }

a. b. c. d.

Key z will be pressed and the z axes will increment. Key q will be pressed and the three axes will be set to zero. Key o will be pressed and the three axes will be set to zero. Non of the above

9. Which language API defines graphics operations independent of the operating system or computer hardware? Additional hardware specific libraries are used to provide an interface between API and the hardware and between the user and the platform specific windowing system. a. DirectX b. Graphix Windowing Toolkit c. CGI d. OpenGL

Computer Graphics

10. In this example, when the user presses the Reset button, onWidgetAction() is called with an id value of RESET_ID. We reset the teapot size and orientation.
void AppDialog::onWidgetAction( int id ) { if( id == RESET_ID ) { teapotSize = 1.0; TrackBall::setToIdentity( theta ); synchronize(); } else exit( 1 ); }

a. TRUE b. FALSE

You might also like