CS2401 Computer Graphics PDF
CS2401 Computer Graphics PDF
CS2401 Computer Graphics PDF
that of its first node point. The line segments form the sides of the polygon and their intersecting points form
the vertices of the polygon.
8. Distinguish between convex and concave polygons?
If the line joining any two points in the polygon lies completely inside the polygon then, they are known as
convex polygons. If the line joining any two points in the polygon lies outside the polygon then, they are
known as concave polygons.
9. What is seed fill?
One way to fill a polygon is to start from a given point (seed) known to be inside the polygon and highlight
outward from this point i.e neighboring pixels until encounter the boundary pixels, this approach is called
seed fill.
10. What is scan line algorithm?
One way to fill the polygon is to apply the inside test. i.e to check whether the pixel is inside the polygon or
outside the polygon and then highlight the pixel which lie inside the polygon. This approach is known as
scan-line algorithm.
11. Define coherence properties?
A coherence property of a scene is apart of a scene by which relate one part of the scene with the other parts
of the scene.
12. What is an active edge list in the scan line algorithm?
The active edge list for a scan line contains all edges crossed by that scan line.
13. What is a winding number?
Winding number method is used to check whether a given point is inside or out side the polygon. In this
method give a direction number to all the edges which cross the scan line. If the edge starts below the line
and ends above scan line give direction as -1 . otherwise1. Fr polygons or two dimensional objects, the point
is said to be inside when the value of winding number is nonzero.
14. What is cell array?
The cell array is a primitive that allows users to display an arbitrary shape defined
as a two dimensional grid pattern.
15. What is type face?
Letters, numbers and other characters can be displayed in a variety of sizes and styles. The overall design
style for a set of characters is called a type face.
16. What do you mean by font?
The term font referred to a set of cast metal character forms in a particular size and format,
such as 10-point courier italic.
unwanted calculations intermediate steps saves time and memory and produce a sequence of transformations.
12. Distinguish between uniform scaling and differential scaling?
When the scaling factors sx and sy are assigned to the same value, a uniform scaling is produced that
maintains relative object proportions. Unequal values for sx and sy result in a differential scaling that is often
used in design application.
13. What is fixed point scaling?
The location of a scaled object can be controlled by a position called the fixed point that is to remain
unchanged after the scaling transformation.
14. Define Affine transformation?
A coordinate transformation of the form
X= axxx +axyy+bx, y ayxx+ayy y+by
is called a two-dimensional affine transformation. Each of the transformed coordinates x and y
is a linear function of the original coordinates x and y , and parameters aij and bk are constants
determined by the transformation type.
15. Distinguish between bitBlt and pixBlt?
Raster functions that manipulate rectangular pixel arrays are generally referred to as raster ops. Moving a
block of pixels from one location to another is also called a block transfer of pixel values. On a bilevel
system, this operation is called a bitBlt (bit-block transfer), on multilevel system t is called pixBlt.
16. List out the various Text clipping?
.All-or-none string clipping -if all of the string is inside a clip window, keep it otherwise discards.
.
All-or-none character clipping discard only those characters that are not completely inside
the window. Any character that either overlaps or is outside a window boundary is clipped.
.
Individual characters if an individual character overlaps a clip window boundary, clip
off the parts of the character that are outside the window.
UNIT II
1. What are the various representation schemes used in three dimensional objects?
.Boundary representation (B-res) describe the 3 dimensional object as a set of surfaces that separate the
object interior from the environment.
.Space-portioning representation describe interior properties, by partitioning the spatial region containing an
object into a set of small, no overlapping, contiguous solids.
2. What is Polygon mesh?
Polygon mesh is a method to represent the polygon, when the object surfaces aretiled, it is more convenient
to specify the surface facets with a mesh function. The various meshes are
Triangle strip (n-2) connected triangles
Quadrilateral mesh generates (n-1)(m-1) Quadrilateral
3. What is Bezier Basis Function?
Bezier Basis functions are a set of polynomials, which can be used instead of the primitive polynomial basis,
and have some useful properties for interactive curve design.
4. What is surface patch?
A single surface element can be defined as the surface traced out as two parameters (u, v) take all possible
values between 0 and 1 in a two-parameter representation. Such a single surface element is known as a
surface patch.
5. Write short notes on rendering bi-cubic surface patches of constant u and v method?
The simple way is to draw the iso-parmetric lines of the surface. Discrete approximations to curves on the
surface are produced by holding one parameter constant and allowing the other to vary at discrete intervals
over its whole range. This produce curves of constant u and constant v.
6. What are the advantages of rendering polygons by scan line method?
i. The max and min values of the scan were easily found.
ii. The intersection of scan lines with edges is easily calculated by a simple incremental
method.
iii. The depth of the polygon at each pixel is easily calculated by an incremental
method.
7. What are the advantages of rendering by patch splitting?
i. It is fast-especially on workstations with a hardware polygon-rendering pipeline.
ii. Its speed can be varied by altering the depth of sub-division.
8. Define B-Spline curve?
A B-Spline curve is a set of piecewise(usually cubic) polynomial segments that pass close to a set of control
points. However the curve does not pass through these control points, it only passes close to them.
9. What is a spline?
To produce a smooth curve through a designed set of points, a flexible strip called spline is used. Such a
spline curve can be mathematically described with a piecewise cubic polynomial function whose first and
second derivatives are continuous across various curve section.
10. What is the use of control points?
Spline curve can be specified by giving a set of coordinate positions called control points, which indicates the
general shape of the curve, can specify spline curve.
11. What are the different ways of specifying spline curve?
Using a set of boundary conditions that are imposed on the spline.
Using the state matrix that characteristics the spline
Using a set of blending functions that calculate the positions along the curve path by
specifying combination of geometric constraints on the curve
12. What are the important properties of Bezier Curve?
It needs only four control points
It always passes through the first and last control points
The curve lies entirely within the convex half formed by four control points.
13. Differentiate between interpolation spline and approximation spline?
When the spline curve passes through all the control points then it is called interpolate. When the curve is not
passing through all the control points then that curve is called approximation spline.
14. What do you mean by parabolic splines?
For parabolic splines a parabola is fitted through the first three points p1,p2,p3 of the data array of kot points.
Then a second parabolic arc is found to fit the sequence of points p2, p3, p4. This continues in this way until
a parabolic arc is found to fit through points pn-2, pn-1 and pn. The final plotted curve is a meshing together
of all these parabolic arcs.
15. What is cubic spline?
Cubic splines are a straight forward extension of the concepts underlying parabolic spline. The total curve in
this case is a sequence of arcs of cubic rather than parabolic curves
When the direction of the projection is not normal (not perpendicular) to the view plane then the projection is
known as oblique projection.
31. What is an axonometric orthographic projection?
The orthographic projection can display more than one face of an object.Such an orthographic projection is
called axonometric orthographic projection.
32. What is cavalier projection?
The cavalier projection is one type of oblique projection, in which thedirection of projection makes a 45degree angle with the view plane.
33. What is cabinet projection?
The cabinet projection is one type of oblique projection, in which the direction of projection makes a n angle
of arctan (2)=63.4- with the view plane.
34. What is vanishing point?
The perspective projections of any set of parallel lines that are not parallel to the projection plane converge to
appoint known as vanishing point.
35. What do you mean by principle vanishing point.
The vanishing point of any set of lines that are parallel to one of the three principle axes of
an object is referred to as a principle vanishing point or axis vanishing point.
36. What is view reference point?
The view reference point is the center of the viewing coordinate system. It is often chosen to be close to or on
the surface of the some object in the scene.
UNIT III IV V
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 is key frame?
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 no of other frames called keyframe
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 is the normal speed of a visual animation?
Visual animation requires a playback of at least 25 frames per second.
7. What are the different tricks used in computer graphics animation?
a. Color look Up Table manipulation
A geometric fractal is a fractal that repeats self-similar patterns over all scales.
20. What is Koch curve?
The Koch curve can be drawn by dividing line into 4 equal segments with scaling factor 1/3. and middle 2
segments are so adjusted that they form adjustment sides of an equilateral triangle.
21. What is turtle graphics program?
The turtle program is a Robert that can move in 2 dimensions and it has a pencil for
drawing. The turtle is defined by the following parameters.
Position of the turtle (x, y)
Heading of the turtle 0 the angle from the x axis.
22. What is graftals?
Graftals are applicable to represent realistic rendering plants and trees. A tree is represented by a String of
symbols 0, 1, [, ]
23. What is a Particle system?
A particle system is a method for modeling natural objects, or other irregularly shaped objects, that exhibit
fluid-like properties. Particle systems are suitable for realistic rendering of fuzzy objects, smoke, sea and
grass.
24. Give some examples for computer graphics standards?
CORE The Core graphics standard j.
GKS -- The Graphics Kernel system k.
PHIGS The Programmers Hierarchical Interactive Graphics System. l.
GSX The Graphics system extension m.
NAPLPS The North American presentation level protocol syntax.
(16 MARKS)
1. Explain in detail about the DDA scan conversion algorithm?
Step 1: Input the line endpoints and store the left endpoint in (x1, y1) and right endpoint in (x2, y2)
Step 2: Calculate the values of x and y using x =xb xa, y= yb ya
Step 3: if the values of x > y assign values of steps as x otherwise the values of steps as y
Step 4: Calculate the values of X increment and Y increment and assign the value x= xa
and y = ya
Step 5: for k=1 to steps do
X = X + X increment Y= Y + Y increment
putpixel(ceil(x), ceil(y),15)
Step 6: End
2. Explain Bresenhams line drawing algorithm?
Step 1: Input the line endpoints and store the left endpoint in (X0, Y0)
Step 2: Load (X0, Y0) in to the frame buffer
Step 3: Calculate constants x, y, 2 y, -2 x, and obtain the decision parameters as P0 = 2 y x
Step 4 : At each Xk along the line, starting at k = 0, perform the following test
If Pk < 0, the next point to plot is (Xk+1, Yk) and Pk+1 = Pk+2 y
Otherwise, the next point to plot is (Xk+1, Yk+1) and Pk+1 = Pk+2 y - 2 x
Step 5: Repeat step 4 x times
3. Explain Midpoint Circle algorithm?
Step 1:Input radius r and circle center(Xc, Yc)and obtain the first point on the circumference of a circle
centered on the origin as (X0, Y0) = (0, r)
Step 2: Calculate the initial values of the decision parameter as P0 = 5/4 r
Step 3: At each position starting at k perform the following test: If Pk < 0, the
next point to plot is (Xk+1, Yk) and Pk+1 = Pk+2 Xk+1 + 1
Otherwise the next point is (Xk+1, Yk+1) and Pk+1 = Pk+2 Xk+1 + 1- 2 Yk-1
Step 4: Determine symmetry points in the other seven octants
Step 5: Move each pixel position(X, Y) onto the circular path centered on (Xc, Yc) and plot the coordinate
values as X = X + Xc Y = Y + Yc
Step 6: Repeat steps 3 through until X>=Y Pk + 1= Pk + 2Y
Other wise, the next point is (Xk+1, Yk+1) and Pk + 1= Pk + 2 Y - 2 X
Step 5: Repeat steps 4 X times
4. Explain Ellipse generating Algorithm?
Step 1:Input radius rx, ry and ellipse center(Xc, Yc)and obtain the first point on the
circumference of a circle centered on the origin as (X0, Y0) = (0, ry)
Step 2: Calculate the initial values of the decision parameter in region 1 as
P10 =ry2 - rx2 ry+1/4 rx2
Step 3: At each position starting at Xk position in region 1,starting at k = 0, perform the
following test:
If Pk < 0, the next point to plot is (Xk+1, Yk) and 22 P1k+1 = P1k+2 ry Xk+1 + ry
Otherwise the next point is (Xk+1, Yk-1) and 222 P1k+1 = P1k+2 ry Xk+1 - 2ry Yk+1 + ry
Step 4: Calculate the initial values of the decision parameter in region 2 as
P20 =ry (X0+1/2)+ rx (Y0 1)-rx ry
Step 5: At each position starting at Yk position in region 2,starting at k = 0, perform the
following test:
If Pk > 0, the next point to plot is (Xk, Yk-1) and 22P2k+1 = P2k- 2 ry Yk+1 +rx
Otherwise the next point is (Xk+1, Yk-1) and 222P2k+1 = P2k- 2 ryYk+1 -2rx Yk+1 +rx
Step 6: Determine symmetry points in the other three octants
Step 7: Move each pixel position(X, Y) onto the circular path centered on (Xc, Yc) and plot the coordinate
values as X = X + Xc Y = Y + Yc
Step 8: Repeat steps for region 1 until 2 ry X>=2 ry Y
5.Explain Boundary fill Algorithm?
If the boundary is specified in a single color, the fill algorithm proceeds outward pixel-by- pixel until
the boundary color is encountered. This is called boundary fill algorithm.
void boundaryfill( int x, int y, int fill, int boundary)
{
int current;
current = getpixel (x, y);
if ((current != boundary) &&(current != nil)
{
setColor ( fill);
setPixel ( x, y);
boundaryfill (x+1, y, fill, boundary); boundaryfill (x-1,
y, fill, boundary); boundaryfill (x, y+1, fill, boundary);
boundaryfill (x, y-1, fill, boundary);
}
}