DC66
DC66
Answer
1. User interface: Most of the applications that run on personal computer and
workstations have user interfaces that rely on desktop window systems to manage
multiple simultaneous activities, clicking facilities that allow user to select menu items,
icons and other objects on the window.
2. Graphs plotting in commercial applications: To create 20 and 30 graphs of
mathematical, physical and economic function, histograms, bar and pie charts,
spreadsheets, task scheduling charts etc. So CG is used to clarify complex phenomena
and to facilitate informed decision making.
3. Desktop publishing: The use of graphics for the creation and dissemination of
information has increased since the advent of desktop publishing on personal computers.
Desktop publishing set up columns for entering text and rearranges the text and
rearranges the text in the columns to fit the new size. We can mix graphics in to the text
and this is possible because these system treats text as a graphics object, knowing the
precise position coordinates, rotation, size and style of every letter.
4. Computer aided design: It allow for speedy, simple design of buildings mechanical
systems, floor plans, pcb. CAD systems save time and energy, when revising
designs.CAD systems are user friendly.
5. Simulation, animation and video games: Simulation indicates a touch of visualization,
which makes the process of simulation more convincing. Many CAD softwares are
available for simulation. Another area is cartooning .cartoon characters are modelled in
the computer as 3D shape descriptions
Q2 (b) Consider a raster system with resolution of 640 x 480.What size of frame
buffer (in bytes) is needed to store 12 bits per pixel.
Answer
Resolution = 640 x 480
Size of frame buffer = 640 x 480 pixels
= 640 x 480 x 12 bits
= (640 x 480 x 12) / 8 bytes
= 460800 bytes
Q3 (b) Digitize a line from (1, 2) to (12, 18) on a raster screen using Bresenham’s
straight line algorithm.
Answer
Algorithm:-
integer is integer floor function.
sign returns -1,0,1 as its arguments is <=0 ,=0,>0
/* appropriate the line length so that we can move along either of x or y axis */
© IETE 1
DC66 COMPUTER GRAPHICS JUNE 2013
Answer
There are times when we require a change of scale to suit our requirements.
Scaling Transformation of the form:
S= sx 0
0 sy
The contents of matrix S do matter when we are multiplying our points on the plane with
it. Suppose the scaling matrix S were identity matrix.
S= sx 0
0 sy
Then the image would not change, as anything multiplied by identity matrix would
remain the same.
Rotation Transformation of the form:
Suppose, we have a point Q1=[x1, y1] and we rotate it about the origin of an angle θ to
get a new position
Q2 = [x2, y2]. Now these rotations can be anticlockwise and clockwise.
This form of rotation is performed in three transformation steps:
1. Translate the point (xc, yc) to the origin.
© IETE 2
DC66 COMPUTER GRAPHICS JUNE 2013
3. Translate the center of rotation back to where it belong that is where it started.
Q4 b What are the new coordinates of the point P (2, -4) after the rotation by 30
degrees.
Answer
The given point is (2, -4) and it has to be rotated by 30 degrees.
Answer
step1: compute the outcodes for each of the vertices of the given polygon.
Step 2: if both the outcodes come out to be zero, then the sides ‘k’ is within the window
part and is fully visible. So retain it and go to step 3.
Step 3: if both the outcodes are non-zero, compute the value of ‘AND’operation between
them.
Step a: if the value comes out to be non-zero, the side ‘k’ is completely outside the
window port, so is fully invisible and because will be rejected go to step 3.
Step b: If the value comes out to be zero, the side may need clipping go to step d.
Step c: If one of the two outcodes is zero, the sides requires to be clipped, go to step d.
Step e: Find intersections of the side ‘k’ with each of the edges of the
windowport.Pushing the segments towards the edge of the windowport, and get the new
fresh outcodes. Go to step b.
Q5 (b) Use Sutherland-Hodgman algorithm for line clipping to clip a line [(0, 0), (10,
10)] against rotated window shown in figure.
© IETE 3
DC66 COMPUTER GRAPHICS JUNE 2013
Q6 (a) Describe the use of Bezier curves and its working principle used in computer
graphics.
Answer
Bezier curves are used in computer graphics to produce curves which appear reasonably
smooth at all scales. This curve construction is based on certain control points.Working: -
For a set of four points p0, p1, p2, p3 we associate a curve with the following properties:
3. The entire curve is contained in the quadrilateral whose concerns are the four
given points.
These are used in CG as they are very efficient to construct, since a simple
recursion process means that the basic arithmetic operation needed to build the
points along one is just division by two.
For this reason the most efficient implementation use scaled integers instead of
floating point numbers as basic numerical data.
Answer
Oblique projections have their projections that are not perpendicular to the projection
plane.
i.e. (q,p,r)!=(a,b,c)
There are two common oblique parallel projections:
1 0 0 0
0 1 0 0
Cos θ Sin θ 0 0
0 0 0 1
© IETE 4
DC66 COMPUTER GRAPHICS JUNE 2013
Cabinet parallel projections: - Lines perpendicular to projection plane are ½ their true
length, i.e. is L=1/2
1 0 0 0
0 1 0 0
cosθ sinθ 0 0
0 0 0 1
Q7 (a) Explain the method of back face detection with the help of example.
Q8 (b) Explain the method of frame by frame animation technique for expert
animator.
Answer
Key frame systems were developed by classical animators such as Walt Disney. An
expert animator would design an animation by drawing certain intermediate frames,
called key frames. Then other animators would draw the in between frames.
2. Layout a story board, i.e. a sequence of informal drawings that shows the form,
structure, and story of the animation.
6. Create the key frames of the animation. The key frames are those where the
entities to be animated are in positions such that intermediate positions can be
easily inferred.
© IETE 5
DC66 COMPUTER GRAPHICS JUNE 2013
9. Transfer the pencil test frames to sheets of acetate film, called “cels” .these may
have multiple planes e.g. a static background with an animated foreground.
With computers the animator would specify the key frames and the computer would draw
the in between frames “tweening”. Many different parameters can be interpolated but
care must be taken in such interpolate if the motion is to be look “real”.
The simplest type of interpolation is linear the computer interpolates points along a
straight line.
Text Book
© IETE 6