Mid Sem 2090 Summer 2022
Mid Sem 2090 Summer 2022
Mid Sem 2090 Summer 2022
Define Computer Graphics and describe five application areas for computer
graphics- computer graphics deals with creation, manipulation and storage of different
type of images and object
A paint system
flight simulator
Computer aided design
Volume virtualization -Display mathematical functions
Explain why there is need for platform independent computer graphics API
They allow the programmer to use a common set of functions within an application,
and to run the same application on a variety of available systems and displays.
2. Draw the architecture of a standard computer graphics system and explain the
operations the scan controller [5 Marks]
scan
controller
System frame
CPU memory buffer
converter display
surface
system bus
x x geometric
scan position
logical y controller y
address
at (639, 0) 0 639
0 x
1
Line 10 =>// set white background color
Line 11=> // set drawing color
Line 12=> // set width which is a ‘dot’ is 4 by 4 pixels
Line 13=> // Applies subsequent matrix operations to the projection matrix stack
Line 14=>// Replaces the current matrix with the identity matrix
Line 15=> // Two-dimensional orthographic viewing region
Line 16=> // Function which specifies the affine transformation of x and y from
normalized device coordinates to window coordinates.
By use of a diagram, explain the working mechanism of the Color CRT Monitor.
2
x
scan controller
y
x
red y
green
spot
pixel blue
value electron
DAC's beam deflection
frame guns coils
buffer
(6 planes)
- The digital frame buffer value is converted to analog voltage for each R,G and B by the Digital
Analog Converter. Electron guns for the color are deflected to the appropriate screen location.
This process repeats itself 60 times each second to prevent flickering.
[5 Marks]
6. For raster display systems, explain how colored images are represented in the frame
buffer
Color is usually described as a combination of red, green, and blue light.
Each pixel is a 3-tuple: e.g., (23, 14, 51), for red (R), green (G), and blue (B).
The total number of bits allowed for R, G, and B values is the color depth.
A color depth of 8 is often used: 3 bits each for R and G. and 2 bits for B.
[5 Marks] 7. In OpenGL explain the use of the following libraries and call back function
a. GL , GLUT [5 Marks]
•glutDisplayFunc(myDisplay);
–(Re)draws screen when window opened or another window moved off it.
•glutReshapeFunc(myReshape);
–Reports new window width and height for reshaped window. (Moving a window does
not produce a reshape event.)
•glutIdleFunc(myIdle);
–when nothing else is going on, simply redraws display using void myIdle()
{glutPostRedisplay();}
••glutMouseFunc(myMouse);
–Handles mouse button presses. Knows mouse location and nature of button (up or
down and which button).
•glutMotionFunc(myMotionFunc);
–Handles case when the mouse is moved with one or more mouse buttons pressed.
•LIBRARIES
•GL, for which the commands begin with GL;
•GLUT, the GL Utility Toolkit, opens windows, develops menus, and manages events.
•GLU, the GL Utility Library, which provides high level routines to handle complex
mathematical and drawing operations.
•GLUI, the User Interface Library, which is completely integrated with the GLUT library.
– The GLUT functions must be available for GLUI to operate properly.
–GLUI provides sophisticated controls and menus to OpenGL applications.
3
Sketch and explain the architecture of plasma panel output monitor [5 Marks]
- Plasma panels, also called gas-discharge displays, are constructed by filling the
region between two glass plates with a mixture of gases that usually in dudes neon. A
series of vertical conducting ribbons is placed on one glass panel, and a set of
horizontal ribbons is built into the other glass panel.
Firing voltages applied to a pair of horizontal and vertical conductors cause the gas at
the intersection of the two conductors to break down into a glowing plasma of
electrons and ions.
QUESTION 9
Implement an openGL program to setup the window below and draw the polygon
shown on
the window [10 Marks]
My Star Window
4
QUESTION 10
Consider the function y=sin(x) for the interval x[0,90].
(a) Explain affine transformation required to map the graph of the function to a 640 by
480 screen
Required transformation
Sx=A*X+B
Sy=C*+D
In this case A=sW/90, B=0, C=sH/1,D=0
[5 Marks] (b) Develop an OpenGL function to plot the graph of the function in the
interval x [0, 90].
[5 Marks]
5
6
Powered by TCPDF (www.tcpdf.org)