Docsity

Frame Buffer - Computer Graphics - Old Exam Paper, Exams of Computer Graphics

Toggle sidebar
bg1
1 1
Cork Institute of Technology
Bachelor of Science (Honours) in Software Development and
Computer Networking โ€“ Award
(KDNET_8_Y4)
Summer 2008
COMPUTER GRAPHICS
(Time: 2 Hours)
Instructions
Answer THREE questions.
All questions carry equal marks.
Examiners: Ms. Helen Fagan
Dr. J. Buckley
Dr. A. Kinsella
Question 1
i. Write a display method in openGL to draw the following pinwheel shape centred
at the origin.
(The dotted lines show the x and y axis, the arms of the pinwheel are 2 units in
length and 0.5 in width)
(10 marks)
pf3
pf4

Partial preview of the text

Download Frame Buffer - Computer Graphics - Old Exam Paper 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)

Summer 2008

COMPUTER GRAPHICS

(Time: 2 Hours)

Instructions Answer THREE questions. All questions carry equal marks.

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

Question 1

i. Write a display method in openGL to draw the following pinwheel shape centred at the origin. (The dotted lines show the x and y axis, the arms of the pinwheel are 2 units in length and 0.5 in width) (10 marks)

ii. Describe how you would adapt a 2D openGL program to implement zooming in and out. (6 marks)

iii. What homogenous matrix represents each of the following operations in 2D

a) Scaling by a factor of a 1/ b) Rotation by 90 degrees c) Translation of (-2,1) (4 marks)

Question 2

i. Describe what is meant by each of the following terms: a) frame buffer b) color depth c) rasterization (4 marks)

ii. Explain either the operation of a CRT or a Flat Screen Display. (6 marks)

iii. Describe with the aid of a diagram how specular lighting is calculated as part of the Phong Lighting model. You should explain each element of the equation used. (10 marks) Question 3

i. Outline the information that must be specified to setup a camera and a viewing volume for perspective projection. Use diagrams to illustrate your answer. (8 marks)

ii. 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)

iii. What is meant by the viewing transformation? (4 marks)

FUNCTION HEADERS

GLAPI void APIENTRY glClear( GLbitfield mask ); void glBegin( GLenum mode ); void glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); void glColor3f( GLfloat red, GLfloat green, GLfloat blue ); void glEnd( void ); void glEndList( void ); void glLighti( GLenum light, GLenum pname, GLint param ); void glLoadIdentity( void ); void glMatrixMode( GLenum mode ); void glOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, void GLdouble near_val, GLdouble far_val ); 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 glVertex2f( GLfloat x, GLfloat y ); void glViewport( GLint x, GLint y, GLsizei width, GLsizei height ); void glLightfv( GLenum light, GLenum pname, const GLfloat *params ); void glMaterialfv( GLenum face, GLenum pname, const GLfloat params ); 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 glutPostRedisplay(); void glutKeyboardFunc(void(func)(unsigned char key, int x, int y));