Docsity

Computer Graphics Exam for Software Development and Computer Networking Students, Exams of Computer Graphics

Toggle sidebar
bg1
Cork Institute of Technology
Bachelor of Science (Honours) in Software Development and
Computer Networking โ€“ Award
(KDNET_8_Y4)
Autumn 2008
Computer Graphics
(Time: 2 Hours)
Instructions
Answer THREE questions.
All questions carry equal marks.
Examiners: Ms. H. Fagan
Dr. J. Buckley
Dr. A. Kinsella
Question 1
i) What is the main difference between parallel and perspective projection? Describe
the viewing volume used in perspective projection.
(6 marks)
ii) What information is specified for a camera when drawing a 3D scene using
perspective projection?
(3 marks)
iii) Show with the aid of an example how would you specify a camera in an 3D
openGL program?
(3 marks)
iv) The camera frame is made up of three vectors named u, v, and n. Show how these
vectors are derived from the information specified for a camera.
(8 marks)
pf3
pf4

Partial preview of the text

Download Computer Graphics Exam for Software Development and Computer Networking Students and more Exams Computer Graphics in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Science (Honours) in Software Development and

Computer Networking โ€“ Award

(KDNET_8_Y4)

Autumn 2008

Computer Graphics

(Time: 2 Hours)

Instructions Answer THREE questions. All questions carry equal marks.

Examiners: Ms. H. Fagan Dr. J. Buckley Dr. A. Kinsella

Question 1

i) What is the main difference between parallel and perspective projection? Describe the viewing volume used in perspective projection. (6 marks)

ii) What information is specified for a camera when drawing a 3D scene using perspective projection? (3 marks)

iii) Show with the aid of an example how would you specify a camera in an 3D openGL program? (3 marks)

iv) The camera frame is made up of three vectors named u, v, and n. Show how these vectors are derived from the information specified for a camera. (8 marks)

Question 2

i. Explain the purpose of the projection matrix and the model view matrix. How are they modified? (3 marks)

ii. Describe the purpose of the call glPushMatrix () and glPopMatrix (). (3 marks)

iii. Give an example of two places that you have used callbacks in an openGL program and explain how you would set one up. (4 marks)

iv. Write 2 openGL methods; one to draw a unit square and one to draw a triangle in a 2D world. Write a flag method that uses these two shapes to draw a flag. Then write a display method that draws a row of 3 flags. Draw an illustration of the expected output. (10 marks)

Question 3

i. What are the main differences between a global illumination scheme and a local illumination scheme? (4 marks)

ii. Describe with the aid of a diagram the equations used to calculate diffuse lighting and specular lighting in openGL. (8 marks)

iii. What is meant by the attenuation of lighting and how does the lighting calculation allow for this? (4 marks)

iv. Describe two ways of speeding up the lighting calculation. (4 marks)

Method Declarations void glBegin( GLenum mode ); void glClear(int buffers); void glEnd(void ); void glFrustum( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ); void glLoadIdentity( void ); void glMatrixMode( GLenum mode ); void glOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val ); void glPopMatrix( void ); void glPushMatrix( void ); void glRotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ); void glScalef( GLfloat x, GLfloat y, GLfloat z ); void glTranslatef( GLfloat x, GLfloat y, GLfloat z ); void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ); void gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top); void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar); void glutDisplayFunc(void (GLUTCALLBACK *func)(void)); void glutIdleFunc(void (GLUTCALLBACK *func)(void)); void glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y)); void glutPostRedisplay(); void glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height)); void glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value); void glVertex2f( GLfloat x, GLfloat y ); void glVertex3f( GLfloat x, GLfloat y, GLfloat z ); void glViewport( GLint x, GLint y, GLsizei width, GLsizei height );