Computer Grtapics - Unit III 2 Marks

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

CS2401-Computer Graphics

Graphics Programming

IV-B

UNIT-III- 2 Marks
Color Models - RGB, YIQ, CMY, HSV - Animations - General Computer Animation, Raster,
Keyframe - Graphics programming using OPENGL - Basic graphics primitives - Drawing three
dimensional objects - Drawing three dimensional scenes
1. Define computer graphics animation.
Computer graphics animation is the use of computer graphics equipment where the graphics
output presentation dynamically changes in real time. This is often also called real time animation.
2. What is tweening?
It is the process, which is applicable to animation objects defined by a sequence of points, and
that change shape from frame to frame.
3. Define frame.
One of the shape photographs that a film or video is made of is known as frame.
4. What are key frames? (Nov/Dec 2011,Nov/Dec 2012)
A key frame is a detailed drawing of the scene at a certain time in the animation sequence.
Within each key frame, each object is positioned according to the time for that frame.
Some key frames are chosen at extreme positions in the action; others are spaced so that the
time interval between key frames is not too great.
One of the shape photographs that a film or video is made of the shape of an object is known
initially and for a small number of other frames called key frame.
Visual animation requires a playback of at least 25 frames per second
5. What is pseudo animation?
Pseudo animation is creating a sequence of stills, photographing or video graphing each still as
one frame, and then later playing back the frames at a faster speed.
6. What are the different tricks used in computer graphics animation?
a. Color look Up Table manipulation
b. Bit plane manipulation
c. Use of UDCS
d. Special drawing modes
e. Sprites
f. Bit blitting
7. What is color look up table?
In color display unit it is necessary to read 44-bit for each pixel from buffer. This is time
consuming process. To avoid this video controller uses look up table to store many entries of pixel
vales in RGB format. This look up table is commonly known as color look up table.
8. What is an intuitive interface?
The intuitive interface is one, which simulates the way a person would perform a
corresponding operation on real object rather than have menu command.

CS2401-Computer Graphics

Graphics Programming

IV-B

9. What is Sprite?
A Sprite is graphics shape in animation and games programs. Each sprite provided in the
system has its own memory area similar to but smaller than pixel RAM.
10. What is the UDC technique?
UDC stands for User Defined Character set. It is graphics animation trick, which is used in
early microcomputer system.
11. What is the use of hidden line removing algorithm?
The hidden line removal algorithm determines the lines, edges, surfaces or volumes that are
visible or invisible to an observer located at a specific point in space.
12. What is computer graphics realism?
The creation of realistic picture in computer graphics is known as realism. It is important in
fields such as simulation, design, entertainments, advertising, research, education, command, and
control.
13. How realistic pictures are created in computer graphics?
To create a realistic picture, it must be process the scene or picture through viewing-coordinate
transformations and projection that transform three-dimensional viewing coordinates onto twodimensional device coordinates.
14. What is chromaticity?
The term chromaticity is used to refer collectively to the two properties describing color
characteristics: Purity and dominant frequency.
15. Define Color model.
A Color model is a method for explaining the properties or behavior of color within some
particular context.
16. What are the uses of chromaticity diagram?
The chromaticity diagram is useful for the following:
Comparing color gamuts for different sets of primaries.
Identifying complementary colors.
Determining dominant wavelength and purity of a given color.
17. What is HSV model?(Nov/Dec-2014)
The HSV (Hue, Saturation, and Value) model is a color model which uses color descriptions
that have a more intuitive appeal to a user. To give a color specification, a user selects a spectral color
and the amounts of white and black that is to be added to obtain different shades, tint, and tones.
18. What for CMY color model used? (Nov / Dec 2012)(Nov/Dec-2014)
The printing process often used with the CMY model generates a color point with a collection
of four ink dots, somewhat as an RGB monitor uses a collection of three phosphor dots.
One dot is used for each of the primary colors (cyan, magenta, and yellow), and one dot is
black. A black dot is including because the combination of cyan, magenta, and yellow inks typically

CS2401-Computer Graphics

Graphics Programming

IV-B

produce dark gray instead of black. Some plotters produce different color combinations by spraying
the ink for three primary colors over each other and allowing them to mix before they dry.
19. What are the parameters in the HLS color model?
Hue, Lightness and Saturation.
20. Define Computer animation. (Nov/Dec 2011)
Computer animation refers to any time sequence of visual changes in a scene. In addition to
changing object position with translations or rotations, a computer generated animation could display
time variations in object size, color, transparency, or surface texture.
21. What are the steps in animation sequence? (Nov/Dec 2011)
Story board layout
Object definition
Key-frame specifications
Generation of in-between frames
22. How frame-by-frame animation works?
Here each frame of the scene is separately generated and stored. Later, the frames can be
recorded on film or they can be consecutively displayed in "real-time playback" mode.
23. What is morphing?
Transformation of object shapes from one form to another is called morphing.
24. What are the methods of motion specifications?
Direct motion specification
Goal-directed Systems
Kinematics and Dynamics.
25. Define primary color and complementary color.
Primary color:
The two or three colors used to produce other colors in such a color model are referred to as
primary colors.
Complementary colors:
If the two color sources combine to produce white light, they are referred to as complementary
colors.
26. What are the two types of mixing colors?
Two main principles for mixing colors:
Additive mixing: shining colored lights on a white ball
Subtractive mixing: mixing paint colors and illuminating with white light.
27. Define color gamut.
Color space is represented in a way a range of colors arranged in a 3D coordinate
system.
Color gamut is the range of all the possible colors for a color model.

CS2401-Computer Graphics

Graphics Programming

IV-B

28.Define OpenGL.
OpenGL (Open Graphics Library) is the computer industry's standard application program
interface ( API ) for defining 2-D and 3-D graphic images.
OpenGL specifies a set of "commands" or immediately executed functions. Each command
directs a drawing action or causes special effects.
A list of these commands can be created for repetitive effects.
OpenGL is independent of the windowing characteristics of each operating system, but
provides special "glue" routines for each operating system that enable OpenGL to work in that
system's windowing environment.
29. What are the basic primitive types supported by the OpenGL and how they are specified?
OpenGL Provides tools for drawing all the output primitives such as points, lines, triangles,
polygons, quads etc and it is defined by one or more vertices.
To draw such objects in OpenGL we pass it a list of vertices. The list occurs between the two OpenGL
function calls glBegin() and glEnd(). The argument of glBegin() determine which object is drawn.
These functions are
glBegin (int mode);
glEnd (void );
The parameter mode of the function glBegin can be one of the following:
GL_POINTS
GL_LINES
GL_LINE_STRIP
GL_LINE_LOOP
GL_TRIANGLES
GL_TRIANGLE_STRIP
GL_TRIANGLE_FAN
GL_QUADS
GL_QUAD_STRIP
GL_POLYGON
30. Write down the format of glVertex command?
The main function used to draw objects is named as glVertex. This function defines a point (or a
vertex) and it can vary from receiving 2 up to 4 coordinates.
Format of glVertex Command:
When we wish to refer the basic command without regard to the specific arguments and datatypes it is
specified as glVertex*();
31. Write the viewing functions in OpenGL?
1. gluOrtho2D(): Specifies the coordinate system in two dimension void gluOrtho2D (GLdouble
left, GLdouble right, GLdouble bottom,GLdouble top);
Example: gluOrtho2D (0.0, 640.0, 0.0, 480.0);
2. glOrtho() : Specifies the coordinate system in three dimension
Example : glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
3. glFlush() : Ensures that the drawing commands are actually executed rather than stored in a
buffer awaiting (ie) Force all issued OpenGL commands to be executed.
4. glMatrixMode(GL_PROJECTION) : For orthographic projection.

CS2401-Computer Graphics

Graphics Programming

IV-B

5. glLoadIdentity () : To load identity matrix


6. glShadeModel : Sets the shading model. The mode parameter can be either GL_SMOOTH
(the default) or GL_FLAT.
Example: void glShadeModel (GLenum mode);
32. What are the display callback functions in OpenGL?
Using the OpenGL Utility Toolkit (GLUT) the programmer can register a callback function
with each of these events by using the following commands:
glutMouseFunc(myMouse) - which registers myMouse() with the event that occurs when the mouse
button is pressed or released;
glutMotionFunc(myMovedMouse) - which registers myMovedMouse() with the event that occurs
when the mouse is moved while one of the buttons is pressed;
glutKeyboardFunc(myKeyboard) - which registers myKeyBoard() with the event that occurs when a
keyboard key is pressed.
33. Define polyline. Draw the ployline code in OpenGL.
Polyline is a collection of line segments joined end to end. It is described by an ordered list of
points, In OpenGL a polyline is called a line strip, and is drawn by specifying the vertices in turn
between glBegin (GL_LINE_STRIP) and glEnd ().
For example, the code:
glBegin(GL_LINE_STRIP);//draw an open polyline glVertex2i(20,10);
glVertex2i(50,10);
glVertex2i(20,80);
glVertex2i(50,80);
glEnd();
glFlush();
34. Define dominant frequency or dominant wavelength.
A light source such as the sun or a light bulb emits all frequencies within the visible range to
produce white light.
When white light is incident upon an object, some frequencies are reflected and some are
absorbed by the object. The combination of frequencies present in the reflected light determines what
we perceive as the color of the object.
If low frequencies are predominant in the reflected light, the object is described as red. In this
case, we say the perceived light has a dominant frequency (or dominant wavelength) at the red end
of the spectrum.
35. Explain the terms hue and luminance of light sources?
A light source such as the sun or a light bulb emits all frequencies within the visible range to
produce white light.
The dominant frequency is also called the hue, or simply the color, of the light.
Radiant energy is related to the luminance of the source.
36. Define purity or saturation.
Purity describes how washed out or how pure the color of the light appears. Pastels and pale
colors are described as less pure.

CS2401-Computer Graphics

Graphics Programming

IV-B

37. Define CMY color model.


A color model defined with the primary colors cyan, magenta, and yellow is useful for
describing color output to hard-copy devices.
cyan can be formed by adding green and blue light. Therefore, when white light is reflected
from cyan-colored ink, the reflected light must have no red component. That is, red light is
absorbed, or subtracted, by the ink.
magenta ink subtracts the green component from incident light
yellow subtracts the blue component.
38. Illustrate the unit cube representation for CMY model?
In the CMY model, point (1, 1, 1) represents black, because all components of the incident
light are subtracted. The origin represents white light. Equal amounts of each of the primary colors
produce grays, along the main diagonal of the cube.
39. Define CIE chromaticity diagram. (Apr/May03)
When we plot the normalized amounts x and y for colors in the visible spectrum, we obtain the tongueshaped curve. This curve is called the CIE (Commission Internationale delEclairage).
Points along the curve are the pure colors in the electromagnetic spectrum.
The line joining the red and violet spectral pints, called the purple line, is not part of the
spectrum.
Interior points represent all possible visible color combinations.
Actually, this point is plotted for a white-light source known as illuminant C, which is
used as a standard approximation for average daylight.

40. What are Subtractive colors?(May/June 2012)


o Cyan, magenta, and yellow are Subtractive colors.
o Mixing paint colors and illuminating with white light. CMY is a subtractive color model (i.e.,)
cyan can be formed by adding green and blue light. When white light is reflected from cyancolored ink, the reflected light must have no red component. i.e., red light is absorbed or
subtracted by the link.
41. Draw the color model HLS double cone.

CS2401-Computer Graphics

Graphics Programming

IV-B

42. Define dithering. (April/May 2013)


The term dithering is used in various contexts. It refer to techniques for approximating halftones
without reducing resolution, as pixel-grid patters
43. State Lambers Law.
The relationship between brightness and surface orientation is called Lambers Law.
44. Write about OPENGL.
OpenGL is a software interface that allows you to access the graphics hardware without taking care of
the hardware details or which graphics adapter is in the system. OpenGL is a lowlevel graphics library
specification. It makes available to the programmer a small set of geomteric primitives - points, lines,
polygons, images, and bitmaps. OpenGL provides a set of commands that allow the specification of
geometric objects in two or three dimensions, using the provided primitives, together with commands
that control how these objects are rendered (drawn).
45.List any four real-time animation Techniques.
(Nov/Dec 2013)
1. Stop Motion
2. Motion Capture
3. Traditional animation(Hand-drawn Animation)
4. Morphing
5. Rotoscoping
46.How are mouse data sent to an OpenGl application? (Nov/Dec 2013)
When a mouse event occurs the system calls the registered function, supplying it with values
for these parameters. The value of button will be one of:
void myMouse(int button, int state, int x, int y);
void mousePressEvent( QMouseEvent* event );
void mouseReleaseEvent( QMouseEvent* event );
void mouseMoveEvent( QMouseEvent* event );
o GLUT_LEFT_BUTTON,
o GLUT_MIDDLE_BUTTON,
o GLUT_RIGHT_BUTTON,
With the obvious interpretation, and the value of state will be one of: GLUT_UP or GLUT_DOWN.
The values x and y report the position of the mouse at the time of the event.
void mouse(int btn, int state, int x, int y)
{
if(btn==GLUT_LEFT_BUTTON && state==GLUT_DOWN)
{
setX(x);
setY(y);
drawSquare(MOUSEx,HEIGHT-MOUSEy);
glutPostRedisplay();
}
if(btn==GLUT_RIGHT_BUTTON && state==GLUT_DOWN)
{
exit(1);
}
}

CS2401-Computer Graphics

Graphics Programming

IV-B

47.What do you mean by Temporal aliasing?


(May/June 2012)
Temporal aliasing is caused by the sampling rate (i.e. number of frames per second) of a scene
being too low compared to the transformation speed of objects inside of the scene; this causes objects
to appear to jump or appear at a location instead of giving the impression of smoothly moving towards
them.
To avoid aliasing artifacts altogether, the sampling rate of a scene must be at least twice as high as the
fastest moving object.
48.State the Difference between CMY and HSV Color Model.(Nov/Dec-2014)
SI.NO
CMY
HSV
A color model defined with the primary The HSV model uses color descriptions that have
1
colors cyan, magenta, and yellow a more intuitive appeal to a user.
(CMY) is useful for describing color
output to hard-copy devices.
2

cyan can be formed by adding green and


blue light.
magenta ink subtracts the green
component from incident light
yellow subtracts the blue component.

To give a color specification, a user selects a


spectral color and the amounts of white and black
that are to be added to obtain different shades,
tints, and tones. Color parameters in this model
are hue ( H ) ,saturation( S ) and value( V).

49. Write down the different type of Animation. (Nov/Dec-2014)


Frame animation
Morphing
3D animation
2D animation
50. Explain XYZ Color model.
XYZ Color Model
The set of CIE primaries is generally referred to as the XYZ, or (X, Y, Z), color model, where
X, Y, and Z represent vectors in a three-dimensional, additive colorspace. Any color C , is
then expressed as
C = XX + YY + ZZ
where X, Y, and Z designate the amounts of the standard primaries needed to match C .

CS2401-Computer Graphics

Graphics Programming

IV-B

51. Discuss the properties of light.


Light or different colors, is a narrow frequency band within the electromagnetic spectrum.
Since light is an electromagnetic wave, we describe the various colors in terms of either the frequency
for the wavelength of the wave.
Brightness is another property, which is the perceived intensity of the light.
The second perceived characteristic is the purity, or saturation, of the light.
1. Purity describes how washed out or how "pure" the color of the light appears.
2. Pastels and pale colors are described as less pure. These three characteristics, dominant
frequency, brightness, and purity, are commonly used to describe the different properties
we perceive in a source of light.
52. What is animation?
Computer animation refers to any time sequence of visual changes in a scene. Computer
animation can also be generated by changing camera parameters such as poition, orientation and focal
length.
53. Define Viewport.
Viewport is the display area on the OPENGLs 2D application window, which is measures in
pixels in Windows Coordinates. The viewport define the size and shape of the display area to map the
projected scence captured by the camera onto the application window.
54. What are the two projection supported by OPENGL?
OPENGL support two types of projections: Orthographic projection and Perspective projection
55. What are the four transformation involed in producing a scene?
The process used to produce a scene in OPENGL is like taking a photograph with a camera. It
invloes four transformation:
1. Arrange the objects or model in the world (Model Transformation)
2. Postion and orientate the camera (View Transforamtion )
3. Select a camera lens (wide angle, normal or telescopic) adjust the focus length and Zoom
factor to choose the cameras field of view.
4. Select the portion of negative to be printed.
56. Explain the Format of glVertex Command.
When we wish to refer the basic command without regard to the specific arguments and
datatypes it is specified as
glVertex2i (.);

gl
library

basic
command

number of
arguments

type of
argument

CS2401-Computer Graphics

Graphics Programming

IV-B

57. How to draw dots using OPENGL?


setPixel (x,y, col) which sets the individual pixel at location(x,y) to the color
specified by col.
58. How to draw lines using OPENGL?
To draw a straight line, the command used is line (X1, Y1, X2, Y2) which draws a line
betweeb (X1, Y1) and (X2, Y2)
60. What are the Steps in the development of an animation?
Steps in the development of an animation sequence are,
1. Object manipulation and rendering
2. Camera motion
3. Generation of in-betweens frames
61. Explain about Raster Animations.
On raster systems, we can generate real-time animation in limited applications using
raster operations.
A simple method for translation in the xy plane is to transfer a rectangular block of pixel
values from one location to another.
62. List the functions initialize and display the screen window in our program.
glutInit(&argc, argv)
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB)
glutInitWindowSize(640,480)
glutInitWindowPosition(100,15)
glutCreateWindow("Example")
glutMainLoop()

10

You might also like