58
CS2401-COMPUTER GRAPHICS UNIT – I Two Mark Questions with Answers 1. Define Computer graphics. Computer graphics remains one of the most existing and rapidly growing computer fields. Computer graphics may be defined as a pictorial representation or graphical representation of objects in a computer. 2. What is meant by refreshing of the screen? Some method is needed for maintaining the picture on the screen. Refreshing of screen is done by keeping the phosphorus glowing to redraw the picture repeatedly. (i.e.)By quickly directing the electronic beam back to the same points. 3. What is persistence? The time it takes the emitted light from the screen to decay one tenth of its original intensity is called as persistence. 4. What is resolution? The maximum number of points that can be displayed without an overlap on a CRT is called as resolution. 5. What is Aspect ratio? (May/June 2013) The ratio of vertical points to the horizontal points necessary to produce equal length of lines in both directions of the screen is called the Aspect ratio. Usually the aspect ratio is ¾. 6. Define pixel. Pixel is shortened forms of picture element. Each screen point is referred to as pixel or pel. 7. What is frame buffer? The memory area in which picture information is getting stored called as frame buffer or refresh buffer. 8. Define bitmap and pixmap. The frame buffer used in the black and white system is known as bitmap which take one bit per pixel. For systems with multiple bits per pixel, the frame buffer is often referred to as a pixmap. QB.1

Question Bank

Embed Size (px)

DESCRIPTION

2 Marks Question Bank for Digital Signal Processing

Citation preview

Page 1: Question Bank

CS2401-COMPUTER GRAPHICSUNIT – I

Two Mark Questions with Answers

1. Define Computer graphics. Computer graphics remains one of the most existing and rapidly growing computer fields. Computer graphics may be defined as a pictorial representation or graphical representation of objects in a computer.

2. What is meant by refreshing of the screen? Some method is needed for maintaining the picture on the screen. Refreshing of screen is done by keeping the phosphorus glowing to redraw the picture repeatedly. (i.e.)By quickly directing the electronic beam back to the same points.

3. What is persistence? The time it takes the emitted light from the screen to decay one tenth of its original intensity is called as persistence.

4. What is resolution? The maximum number of points that can be displayed without an overlap on a CRT is called as resolution.

5. What is Aspect ratio? (May/June 2013) The ratio of vertical points to the horizontal points necessary to produce equal length of lines in both directions of the screen is called the Aspect ratio. Usually the aspect ratio is ¾.

6. Define pixel. Pixel is shortened forms of picture element. Each screen point is referred to as pixel or pel.

7. What is frame buffer? The memory area in which picture information is getting stored called as frame buffer or refresh buffer.

8. Define bitmap and pixmap. The frame buffer used in the black and white system is known as bitmap which take one bit per pixel. For systems with multiple bits per pixel, the frame buffer is often referred to as a pixmap.

9. What is the role of video controller? A special purpose processor, which is used to control the operation of the display device, is known as video controller or display controller.

10. What do you mean by scan conversion? A major task of the display processor is digitizing a picture definition given in an application program into a set of pixel-intensity values for storage in the frame buffer. This digitization process is called scan conversion.

QB.1

Page 2: Question Bank

11. What is an output primitive? Graphics programming packages provide function to describe a scene in terms of these basic geometric structures, referred to as output primitives.

12. What do you mean by ‘jaggies’? Line with stair step appearance is known as jaggies.

13. What is point in the computer graphics system? The point is a most basic graphical element & is completely defined by a pair of user coordinates (x, y).

14. Write short notes on lines. A line is of infinite extent can be defined by an angle of slope and one point on the line P=P(x, y). This can also be defined as Y=mX + C where m is the slope and C is the Y- intercept.

15. What are the disadvantages of DDA algorithm of line drawing? The disadvantages of DDA algorithm of line drawing are: 1. Round-off error in successive additions of the floating-point increment can cause the calculated pixel positions to drift away from the true line path for long line segments. 2. Rounding operations and floating-point arithmetic in procedure are still time-consuming.

16. Define Circle. Circle is defined by its center xc, yc and its radius in user coordinate units. The equation of the circle is (x-xc)2 + (y-yc)2= r2.

17. Define Ellipse. An ellipse is an elongated circle. An ellipse can be given in terms of the distances from any point on the ellipse to two fixed positions called the foci of the ellipse. The sum of these two distances is the same values for all points on the ellipse. 18. Define polygon. A polygon is any closed continues sequence of line segments i.e. a polyline whose last node point is same as 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.

19. 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.

20. 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.

QB.2

Page 3: Question Bank

21. 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 lies inside the polygon. This approach is known as scan-line algorithm.

22. Define coherence properties. A coherence property of a scene is a part of a scene by which relate one part of the scene with the other parts of the scene.

23. What is an attribute parameter? Any parameter that affects the way a primitive is to be displayed is referred to as an attribute parameter.

24. What are the various attributes of a line? (Nov/Dec 2011) The line type, width and color are the attributes of the line. The line types include solid line, dashed lines, and dotted lines.

25. What is pixel mask? Pixel mask is a string containing the digits 1 and 0 to indicate which positions to plot along the line path. The mask 1111000, could be used to display a dashed line with a dash length of 4 and inter dot spacing of three.

26. What is a line cap? Line caps can be used to adjust the shape of the line ends to give a better appearance. There are three types of line caps. Butt cap which has a square end, round cap which has a semi circle end, projecting square cap which has one half of the line width beyond the specified end points.

27. List out the methods used for smoothly joining two line segments. The methods used are as follows: 1. Mitter join- by extending the outer boundaries of each of the two lines until they meet. 2. Round join – by capping the connection between the two segments with a circular boundary whose diameter is equal to the line width. 3. Bevel join – by displaying the line segments with butt caps and filling in the triangular gap where the segment meet.

28. What is Color Look up table? In color displays, 24 bits per pixel are commonly used, where 8 bits represent 256 level for each color. It is necessary to read 24- bit for each pixel from frame buffer. This is very time consuming. To avoid this video controller uses look up table to store many entries to pixel values in RGB format. This look up table is commonly known as color table.

QB.3

Page 4: Question Bank

28. What is tiling patterns? The process of filling an area with rectangular pattern is called tiling and rectangular fill patterns are sometimes referred to as tiling patterns.

29. What is soft fill? Soft fill is a filling method in which fill color is combined with the background colors.

30. What is kerned character? The characters which extend beyond the character body limits is known as kerned character. Examples are f and j.

31. What is character up vector? The orientation for a displayed character string is set according to the direction of the character up vector.

32. Define bundled attributes. Individual attribute commands provide a simple and direct method for specifying attributes when a single output device is used. When several kinds of output device are available at a graphics installation, it is convenient to set up a table for each output device that lists set of attribute values that are to be used on that device to display each primitive type. Attribute specified in this manner is known as bundled attribute.

33. What is Transformation? Transformation is the process of introducing changes in the shape, size and orientation of the object using scaling, rotation, reflection, shearing & translation etc.

34. Write short notes on active and passive transformations. In the active transformation the points x and x represent different coordinates of the same coordinate system. Here all the points are acted upon by the same transformation and hence the shape of the object is not distorted. In a passive transformation the points x and x represent same points in the space but in a different coordinate system. Here the change in the coordinates is merely due to the change in the type of the user coordinate system.

35. What is translation? Translation is the process of changing the position of an object in a straight-line path from one coordinate location to another. Every point (x, y) in the object must under go a displacement to (x , y). The transformation is:x= x + tx ; y= y + ty

36. What is rotation? A 2-D rotation is done by repositioning the coordinates along a circular path, in the x-y plane by making an angle with the axes. The transformation is given by: X= rcos(+ ) and Y= r sin (+ ).

QB.4

Page 5: Question Bank

37. What is scaling? The scaling transformations changes the shape of an object and can be carried out by multiplying each vertex (x, y) by scaling factor Sx, Sy where Sx is the scaling factor of x and Sy is the scaling factor of y.

38. What is shearing? (Nov/Dec 2012) The shearing transformation actually slants the object along the X direction or the Y direction as required.ie; this transformation slants the shape of an object along a required plane.

39. What is reflection? The reflection is actually the transformation that produces a mirror image of an object. For this use some angles and lines of reflection.

40. Distinguish between window and view port. (Nov/Dec 2011) A portion of a picture that is to be displayed by a window is known as window port. The display area of the part selected or the form in which the selected part is viewed is known as view port.

41. Define clipping. (May/ June 2012) Clipping is the method of cutting a graphics display to neatly fit a predefined graphics region or the view port.

42. What is covering (exterior clipping)? This is just opposite to clipping. This removes the lines coming inside the windows and displays the remaining. Covering is mainly used to make labels on the complex pictures.

43. What is the need of homogeneous coordinates? To perform more than one transformation at a time, use homogeneous coordinates or matrixes. They reduce unwanted calculations intermediate steps saves time and memory and produce a sequence of transformations.

44. 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.

45. 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.

46. Define affine transformation. A coordinate transformation of the form X1=axxx + axyy + bx , Y1= ayxx + ayy y +by

is called a two-dimensional affine transformation. Each of the transformed coordinates x 1 and y 1 is a linear function of the original coordinates x and

QB.5

Page 6: Question Bank

y , and parameters aij and bk are constants determined by the transformation type.

47. 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.

48. List out the various Text clipping. (Nov/Dec 2012) The various text clipping are:1. All-or-none string clipping - if all of the string is inside a clip window, keep it otherwise discards. 2. 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. 3. Individual characters – if an individual character overlaps a clip window boundary, clip off the parts of the character that are outside the window.

49. What is Viewing Transformation? The mapping of a part of a world-coordinate scene to device coordinate is referred to as Viewing Transformation.

50. What is the major difference between symmetrical DDA and simple DDA? (May/ June 2012)

The DDA (Digital Differential Analyzer) algorithm is used to find out interpolating points between any given two points, linearly (i.e. straight line).Basically what we need to do is: increment the coordinates by a fixed small amount, beginning from the starting point, and each time we have a new point progressing towards the end point.

In simple DDA – e (increment factor) is chosen as 1/max (|Δx|, |Δy|) such that one of the coordinate is integral and only the other coordinate has to be rounded. i.e. P(i+1) = P(i)+(1,Round(e*Δy)) here one coordinate is being incremented by 1 and the other by e*Δy

In symmetric DDA - e is chosen such that though both the co-ordinates of the resultant points has to be rounded off, it can be done so very efficiently, thus quickly.

51. How will you clip a point? (May/June 2013)

A point P=(x,y) for display, if following inequalities are satisfied:

xwmin <= x <= xwmax

ywmin <= y <= ywmax

where the edges of the clip window (xwmin,xwmax,ywmin,ywmax) can be

either the world-coordinate window boundaries or viewport boundaries. If any one of these four inequalities is not satisfied, the point is clipped (not saved for display).

QB.6

Page 7: Question Bank

UNIT I

16 Mark Questions with Key Points

1. Explain the following:1. Z-mouse2. Joysticks3. Touch panels4. Image scanners5. Data gloveZ-Mouse:Include three buttonsA thumb wheel on the side, a track ball on the top, and a standard mouse ball underneath.This design provides six degrees of freedom to select an object from the spatial position.Wit this we can pickup an object, rotate it and we can move it in any direction

QB.7

Page 8: Question Bank

Used in virtual reality and CAD systemsJoysticksConsists of small vertical liver mounted on a baseUsed to move the cursor around the screenThe screen cursor is moved according to the distanceOne or two buttons is usually intended for signaling certain actionsTouch panelsThree typesOptical touch panelElectrical touch panelAcoustical touch panelAllow selecting the screen position with the touch of finger. Touch input can be recorded using optical, electrical methodsImage scannersDrawings, color and black and white photos or text can be given as an input to the computer with an optical scanning mechanism.According to reflected light intensity the gradations of gray scale or color can be stored in an arrayData gloveConstructed with a series of sensors that can detect hand and finger motionsThe transmitting and receiving antennas can be structured as a set of three mutually perpendicular cols, forming a three dimensional Cartesian coordinates system.Electromagnetic coupling between the three pairs of coil is used to provide information about the position and orientation of hand.

2. Explain in detail about the DDA scan conversion algorithm. The digital differential analyzer is a scan conversion algorithm based onCalculation either dx or dy using equations, dy = m.dx dx = dy/mSample the line at unit intervals in one coordinate and determine corresponding integervalues nearest the line path for the coordinates Sample at X intervals(dx=1) and computing each successive Y value as Yk+1 = Yk + mFor lines with positive slope greater than 1, reverse the roles of X and Y. Sample at unitY intervals and calculate each successive X value as Xk+1 = Xk + 1/mAlgorithmStep 1: Input the line endpoints and store the left endpoint in (x1, y1) and right endpoint in (x2, y2)Step 2: Calculate values for dx & dy using dx=xb-xa, dy=yb-yaStep 3: Check if dx>dy then assign steps value as dx otherwise assign steps value as dy.Step 4: Calculate the values of X increment and Y increment and assign the value x= xa and y = yaStep 5: for k=1 to steps do

QB.8

Page 9: Question Bank

X = X + X increment Y= Y + Y increment Putpixel(ceil(x), ceil(y),15)Step 6: End

3. Explain Bresenham’s line drawing algorithm. (Nov/Dec 2012) In Bresenham’s approach the pixel position along a line path are determined by sampling unit X intervals. Starting from the left end point(X0, Y0)of a given line we step to each successive columns and plot the pixel whose scan line Y-value is closest to the line path.Assuming the Kth step in process, determined that the pixel at (Xk, Yk)decide which pixel to plot in column Xk+1.The choices are (Xk+1, Yk) and (Xk+1,Yk+1)AlgorithmStep 1: Input the line endpoints and store the left endpoint in (X0, Y0)Step 2: Load (X0, Y0) in to the frame bufferStep 3: Calculate constants dx,dy,2dy,-2dx & obtain decision parameter as P0=2*dy-dxStep 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+2dy Otherwise, the next point to plot is (Xk+1, Yk+1) and Pk+1 = Pk+2(dy-dx)Step 5: Repeat step 4 dx times.

4. Explain Midpoint circle drawing algorithm. (May/June 2012, Nov/Dec 2011)AlgorithmStep 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 – rStep 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 octantsStep 5: Move each pixel position(X, Y) onto the circular path centred on (Xc, Yc) and plot the coordinate values as X = X + Xc Y = Y + Yc

Step 6: Repeat steps 3 through until X>=Y

5. Explain Ellipse generating Algorithm. (May/June 2013)AlgorithmStep 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)

QB.9

Page 10: Question Bank

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 P1k+1 = P1k+2 ry2Xk+1 + ry2

Otherwise the next point is (Xk+1, Yk-1) and P1k+1 = P1k+2 ry2Xk+1 - 2ry2 Yk+1 + ry2

Step 4: Calculate the initial values of the decision parameter in region 2 as P20 = ry2 (X0+1/2)2+ rx2 (Y0 – 1)2- rx2 ry2

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 P2k+1 = P2k - 2 ry2Yk+1 + rx2

Otherwise the next point is (Xk+1, Yk-1) and P2k+1 = P2k - 2 ry2Yk+1 - 2rx2 Yk+1 + rx2

Step 6: Determine symmetry points in the other three octantsStep 7: Move each pixel position(X, Y) onto the circular path centred on (Xc, Yc) and plot the coordinate values as X = X + Xc Y = Y + Yc

Step 8: Repeat steps for region 1 until 2 ry2X>=2 ry2Y

6. Explain reflection and shear.

Reflection1. It is a mirror image of an object2. Rotating about 180 degree3. Flat object moving in the xy plane4. Reflection about y axis flips x coordinates5. Reflection point as pivot point is same as above6. To obtain the transformation matrix for reflection diagonal is y = -xSequence

Clockwise rotation by 45 degree Reflection about y axis Counter wise rotation by 45 degree

Shear1. Internal layer cause to slide over each other called shear2. Transforms coordinate position as X ‘= x + shx . y’ , Y’ = y3. Shift in the position of objects relative to shearing reference lines are equivalent to Translations.

7. Explain Liang Barsky line clipping

QB.10

Page 11: Question Bank

1. Faster line clipper of the parametric equation of a line segment2. Line parallel to one of the clipping boundaries3. Line intersects the extension of boundary k4. If u1 > u2 line is outside the clipping window5. Else inside the clipping window6. Clipping is done using the reflection in the clip window

8. Explain about Cohen –Sutherland Line Clipping algorithm. (Nov/Dec 2012, May/June 2012, Nov/Dec 2011)

1. Obtain the coordinates of the clipping window xmin, ymin, xmax, ymax.2. Get the coordinates of the line to be clipped xa, ya, xb, yb.3. Region codes are assigned to the line end points according to relative position with

respect to the clipping rectangle.4. The two region codes of the line end points which passes through the clipping

rectangle are ANDed.5. If the result is one (1 1 1 1),then the line is entirely outside the clipping window.6. If the result is zero (0 0 0 0), then the line is completely inside the window hence we

can save it for display.7. For the intermediate results we have to find intersection point using line equation.

The slope of the line is given by the equation m=(yb-ya)/(xb-xa).8. The point at which the line intersects the clipping window can be obtained using the

equation x’<=x1+m(y-y1) & y’<=y1+m(x-x1) ,where x is set either xmin or xmax and y is either ymin or ymax.

9. Using the intersection point the part of the outside the clipping window are clipped off.

9. Explain Sutherland Hodgeman polygon clipping.Clipping polygon which lies inside the clipping windowFour possible casesIf the first vertex is outside the window boundary and the second vertex insideIf the first vertex is inside the window boundary and the second vertex outsideIf both are outsideIf both are insideRepeat the process of algorithmConvex polygon are correctly clipped using this clippingConcave and convex polygon are also used

10. Explain about clipping operations.Clip a picture from either outside or inside a region known as clippingAlso called as clipping algorithmThe region against the object is known as clip windowClipping operations on different types of objectsPoint clippingPolygon clippingArea clippingLine clipping

QB.11

Page 12: Question Bank

Curve clippingText clippingPolygon and line clipping are the standard clipping components

11. Explain attributes of Output Primitives. Line, Curve, Area-fill and Character Attributes.

12. Explain two dimensional translation and scaling with an example. (May/June 2013)

Translation

A translation is applied to an object by representing it along a straight line path from one coordinate location to another by adding translation distances, tx, ty to original coordinate position (x,y) to move the point to a new position (x’,y’) to

x’ = x + tx, y’ = y + ty

The translation distance point (tx, ty) is called translation vector or shift vector.

Scaling

A scaling transformation alters the size of an object. This operation can be carried out for polygons by multiplying the coordinate values (x,y) to each vertex by scaling factor Sx & Sy to produce the transformed coordinates (x’,y’)

x’= x.Sx y’ = y.Sy

13. Obtain a transformation matrix for rotating an object about a specified pivot point. (Nov/Dec 2012, May/June 2013)

General Pivot-point Rotation

1. Translate the object so that pivot-position is moved to the coordinate origin2. Rotate the object about the coordinate origin3. Translate the object so that the pivot point is returned to its original position

QB.12

Page 13: Question Bank

Figure 1.24 Transformation sequence for rotating an object about specified pivot point

The composite transformation matrix for this sequence is obtain with the concatenation

Which can also be expressed as T(xr,yr).R(θ).T(-xr,-yr) = R(xr,yr,θ)

14. With suitable examples explain curve clipping algorithm. (Nov/Dec 2012)

Curve-clipping procedures will involve nonlinear equations, and this requires more processing than for objects with linear boundaries. The bounding rectangle for a circle or other curved object can be used first to test for overlap with a rectangular clip window.

If the bounding rectangle for the object is completely inside the window, we save the object. If the rectangle is determined to be completely outside the window, we discard the object. In either case, there is no further computation necessary. But if the bounding rectangle test fails, we can look for other computation-saving approaches. For a circle, we can use the coordinate extents of individual quadrants and then octants for preliminary testing before calculating curve-window intersections.

The below figure illustrates circle clipping against a rectangular window. On the first pass, we can clip the bounding rectangle of the object against the bounding rectangle of the clip region. If the two regions overlap, we will need to solve the simultaneous line- curve equations to obtain the clipping intersection points.

Figure 1.55 Clipping a filled circle

QB.13

Page 14: Question Bank

UNIT – IITwo Mark Questions with Answers

1. List out the various representation schemes used for three dimensional objects. The various representation schemes used for three dimensional objects are as follows: 1. Boundary representation (B-res) – describe the 3 dimensional objects as a set of surfaces that separate the object interior from the environment. 2. 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 are tiled, it is more convenient to specify the surface facets with a mesh function. The various meshes are as follows: 1. Triangle strip – (n-2) connected triangles 2. Quadrilateral mesh – generates (n-1) / (m-1) Quadrilaterals

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? (May/June 2013) 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. What is spline? (Nov/Dec 2011, Nov/Dec 2012) 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.

6. 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.

7. What are the different ways of specifying spline curve?1. Using a set of boundary conditions that are imposed on the

spline.

QB.14

Page 15: Question Bank

2. Using the state matrix that characteristics the spline.3. Using a set of blending functions that calculate the positions

along the curve path by specifying combination of geometric constraints on the curve

8. What are the important properties of Bezier Curve?1. It needs only four control points.2. It always passes through the first and last control points.3. The curve lies entirely within the convex hull formed by four

control points.

9. 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.

10. 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 knot 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.

11. 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 Each cubic satisfies: ax3 + bx 2+ cx + d

12. What is a Blobby object? Some objects do not maintain a fixed shape, but change their surface characteristics in certain motions or when in proximity to other objects. That is known as blobby objects. Example – molecular structures, water droplets.

13. Define Octrees. Hierarchical tree structures called octrees are used to represent solid objects in some graphics systems. Medical imaging and other applications that require displays of object cross sections commonly use octree representation.

14. Define Projection. The process of displaying 3D into a 2D display unit is known as projection. The projection transforms 3D objects into a 2D projection plane.

15. What are the steps involved in 3D transformation? The steps involved in 3D transformations are as follows:

1. Modeling Transformation

QB.15

Page 16: Question Bank

2. Viewing Transformation3. Projection Transformation4. Workstation Transformation

16. What do you mean by view plane? A view plane is nothing but the film plane in camera which is positioned and oriented for a particular shot of the scene.

17. What is view-plane normal vector? This normal vector is the direction perpendicular to the view plane and it is called as [DXN DYN DZN]

18. What is view distance? The view plane normal vector is a directed line segment from the view plane to the view reference point. The length of this directed line segment is referred to as view distance

19. Define viewing transformation. (May/ June 2012) The process of converting the description of objects from world coordinates to viewing coordinates is known as viewing transformation.

20. What you mean by parallel projection? Parallel projection is one in which z coordinates is discarded and parallel lines from each vertex on the object are extended until they intersect the view plane.

21. What do you mean by perspective projection? Perspective projection is one in which the lines of projection are not parallel. Instead, they all converge at a single point called the center of projection.

22. What is projection reference point? In Perspective projection, the lines of projection are not parallel. Instead, they all converge at a single point called Projection reference point.

23. What is the use of projection reference point? In perspective projection, the object positions are transformed to the view plane along these converged projection line and the projected view of an object is determined by calculating the intersection of the converged projection lines with the view plane.

24. What are the different types of parallel projections? The parallel projections are basically categorized into two types, depending on the relation between the direction of projection and the normal to the view plane. They are orthographic parallel projection and oblique projection.

QB.16

Page 17: Question Bank

25. What is orthographic parallel projection? (Nov/Dec 2012) When the direction of the projection is normal (perpendicular) to the view plane then the projection is known as orthographic parallel projection

26. What is oblique projection? (Nov/Dec 2012) When the direction of the projection is not normal (not perpendicular) to the view plane then the projection is known as oblique projection.

27. 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.

28. What is cavalier projection? The cavalier projection is one type of oblique projection, in which the direction of projection makes a 45-degree angle with the view plane.

29. What is cabinet projection? The cabinet projection is one type of oblique projection, in which the direction of projection makes an angle of arc tan (2) = 63.4- with the view plane.

30. 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.

31. 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.

32. What is view reference point? The view reference point is the center of the viewing coordinate system. Itis often chosen to be close to or on the surface of the some object in the scene.

33. What is color look up table? In color display unit it is necessary to read 44-bit for each pixel from buffer. This is very 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.

34. What is solid modeling? The construction of three dimensional objects for graphics display is often referred to as solid modeling.

QB.17

Page 18: Question Bank

35. 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.

36. 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.

37. 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 two-dimensional device coordinates.

38. What is solid modeling? The construction of 3 dimensional objects for graphics display is often referred to as solid modeling.

39. 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.

40. Give some examples for computer graphics standards. Some examples of computer graphics standards are:

1. CORE – The Core graphics standard2. GKS -- The Graphics Kernel system3. PHIGS – The Programmers Hierarchical Interactive Graphics System.4. GSX – The Graphics system extension5. NAPLPS – The North American presentation level protocol syntax.

41. 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.

42. Define quadric surfaces. (Nov/Dec 2011)

1. The quadric surfaces are described with second degree equations (Quadratics).

2. They include spheres, ellipsoids, torus, parabolids, and hyperboloids.

43. Differentiate parallel projection from perspective projection. (May/ June 2012)

Parallel Projection

QB.18

Page 19: Question Bank

1) Parallel projection is a method for generating a view of a solid object is to project points on the object surface along parallel lines onto the display plane.

2) In parallel projection, parallel lines in the world coordinate scene project into parallel lines on the two dimensional display planes.

3) This technique is used in engineering and architectural drawings to represent an object with a set of views that maintain relative proportions of the object.

4) The appearance of the solid object can be reconstructed from the major views.

Perspective Projection

1) It is a method for generating a view of a three dimensional scene is to project points to the display plane alone converging paths.

2) This makes objects further from the viewing position be displayed smaller than objects of the same size that are nearer to the viewing position.

3) In a perspective projection, parallel lines in a scene that are not parallel to the display plane are projected into converging lines.

4) Scenes displayed using perspective projections appear more realistic, since this is the way that our eyes and a camera lens form images.

44. What are the advantages over B spline over Bezier curve? (May/June 2013) 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 whereas Bezier curve needs four control points and it always passes through first and last control points, the curve lies entirely within the convex hull formed by four control points.

45. What is critical fusion frequency? (May/June 2013) The critical fusion frequency is the number of flashes per second at which a flashing light is perceived as being continuous — for humans this is usually greater than 10 flashes per second (10 Hz), which is why normal house lighting (running at 50 or 60 Hz) or TV and films (running at around 25 frames per second) look continuous.

Unit-II16 Mark Questions with Key Points

1. Explain the three dimensional display methods. Parallel projection

1. The production of the 2D display of the 3D scene is called projection.

QB.19

Page 20: Question Bank

2. Project points on the object surface along the parallel lines on to the display plane.

3. Different 2D views of objects can be produced by projecting the visible points.

Perspective projection1. Done by the projecting points to the display plane along the

converging points.2. Causes the objects farther from the viewing point should be

smaller of the same sized object present here.

Depth Cueing1. Basic problem for visualization techniques is called depth cueing.2. Some 3D objects are without depth information.

Visible line and surface identification1. To highlight the visible lines2. Display visible lines as dashed lines3. Removing the invisible lines

Surface rendering1. Lightening conditions in the screen2. Assigned characteristics3. Degree of transparency4. How rough or smooth the surfaces are to be

Exploded and cutaway viewsThree dimensional and stereoscopic views

2. Explain spline representation. (May/June 2012, May/June 2013)It is referred to a curve drawn in a different mannerInterpolation and approximation splinesSet of coordinate points called control pointsCurve can be translated, rotated and scaledEnclosing a set of points called convex hullSet of connected points is often called control graphParametric continuity conditionGeometric continuity conditionSpline specification Discuss about any one spline (B spline)

3. Explain Bezier curves and surfaces. (May/June 2012)Can be fitted to any number of control pointsPolynomial functions between p0 and pnCalculated x(u), y(u), z(u)Properties of Bezier curvesCubic Bezier curvesDesign techniques in Bezier curvesBezier surfaces

4. Explain general three dimensional rotations. (Nov/Dec 2012, Nov/Dec 2011,

QB.20

Page 21: Question Bank

May/June 2012, May/June 2013) Transformation sequencesRotation in five stepsTranslate the object that rotates in parallel coordinate axisRotate the object with one coordinate axisApply inverse rotation to its original positionApply inverse translation to its original positionV = p2 – p1After rotation to original position

5. Discuss in detail about Projections. (Nov/Dec 2012, Nov/Dec 2011) ->Define projection The process of converting the description of objects from world coordinates to viewing coordinates is known as projection -> Parallel projection Parallel projection is one in which z coordinates is discarded and parallel lines from each vertex on the object are extended until they intersect the view plane. ->Perspective projection Perspective projection is one in which the lines of projection are not parallel. Instead, they all converge at a single point called the center of projection. ->Projection reference point In Perspective projection, the lines of projection are not parallel. Instead, they all converge at a single point called Projection reference point. ->The use of Projection reference point In Perspective projection, the object positions are transformed to the view plane along these converged projection line and the projected view of an object is determined by calculating the intersection of the converged projection lines with the view plane. ->The different types of parallel projections The parallel projections are basically categorized into two types, depending on the relation between the direction of projection and the normal to the view plane. They are orthographic parallel projection and oblique projection. ->Orthographic parallel projection When the direction of the projection is normal (perpendicular) to the view plane then the projection is known as orthographic parallel projection ->Orthographic oblique projection When the direction of the projection is not normal (not perpendicular) to the view plane then the projection is known as oblique projection. ->Axonometric orthographic projection The orthographic projection can display more than one face of an object. Such an orthographic projection is called axonometric orthographic projection. ->Cavalier projection

QB.21

Page 22: Question Bank

The cavalier projection is one type of oblique projection, in which the direction of projection makes a 45-degree angle with the view plane. ->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.

6. Explain Back face detection method and Depth buffer method. (May/June 2013)Back face Detection method

Fast and simple object space method For identifying the back faces of a polyhedron Based ion inside outside test Plane parameters A, B, C, D

Ax +By+ Cz +D < 0 Inside point is along the line of sight to the surface

V.N = Vz C Polygon is back face if C < 0 Polygon cannot see on any face if C = 0 Z component value is C <= 0

Depth Buffer Method To compare the surface depths at each pixel position on the plane

projection Also referred as z- buffer method Two buffer areas Depth buffer to store depth values Refresh buffer to store intensity values Depth value for a surface position (x, y)

Z( -Ax – By – D)/C Depth z’ of next position (x + 1, y)

Z’( -A(x + 1)-By – D)/C

7. Explain area subdivision and A-Buffer method. A - Buffer Method

Extension idea of the depth buffer method It represents an antialiased, area averaged, accumulation-buffer

method Only one visible surface Two fields Depth field - Stores a positive or negative real number Intensity field - Stores a surface intensity information or a pointer

value Data for each surface in the linked list includes RGB intensity components Opacity parameters Depth Percent of area coverage Surface identifier Pointer to next surface

QB.22

Page 23: Question Bank

Area Sub Division Method Image space method The relative characteristic of surface are Surrounding surface Inside surface Outside surface Conditions for subdivision All surfaces are outside surfaces with respect to the area Only one inside A surrounding surface with in the area boundaries

8. Explain Depth sorting method. Both image and object space operations Perform the basic function Surface are sorted in order of decreasing depth Surface are scan converted in order, starting with the surface of

greatest depth Often referred as painters algorithm Test listed in the order of increasing difficulty Surface do not overlap Projections of the two surfaces on to the view plane do not overlap

9. Write notes on quadric surfaces. (Nov/Dec 2012)

The quadric surfaces are described with second degree equations (Quadratics).

They include spheres, ellipsoids, torus, parabolids, and hyperboloids.

QB.23

Page 24: Question Bank

UNIT – IIITwo Mark Questions with Answers

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? Tweening is the process, which is applicable to animation objects defined by a sequence of points, and that change shape from frame to frame.

3. What is animation? (Nov/Dec 2011) Computer animation refers to any time sequence of visual changes in a scene. Computer animations can also be generated by changing camera parameters such as position, orientation and focal length.

4. What is key frame? (Nov/Dec 2011, Nov/Dec 2012) A key frame is 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.

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? The different tricks used in computer graphics animation are as follows:

1) Color look up table manipulation2) Bit plane manipulation3) Use of UDCS4) Special drawing modes5) Sprites

QB.24

Page 25: Question Bank

6) Bit flitting

8. What are the steps in animation sequences? The steps are: 1. Storyboard Layout 2. Object Definition 3. Keyframe Specifications 4. Generation of in-between Frames

9. What is Morphing? Transformation of object shapes from one to another is called morphing. Morphing methods can be applied to any motion or transition involving a change in shape.

10. How frame-by-frame animation works? In frame-by-frame animation, 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.

11. What is chromaticity? The term chromaticity is used to refer collectively to the two properties describing color characteristics: Purity and dominant frequency.

12. Define Color model. A Color model is a method for explaining the properties or behavior of color within some particular context. No single color model can explain all aspects of color, so we make use of different models to help describe the different perceived characteristics of color.

13. What are the uses of chromaticity diagram? The chromaticity diagram is useful for the following:

1. Comparing color gamuts for different sets of primaries.2. Identifying complementary colors.3. Determining dominant wavelength and purity of a given color.

14. Give the transformation matrix for conversion of RGB to YIQ.

15. What is HSV model? The HSV (Hue, Saturation, 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

QB.25

Page 26: Question Bank

white and black that is to be added to obtain different shades, tints, and tones.

16. What is the application of 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.

17. State the features of OpenGL. The features of OpenGL are: 1) It is a device independent library, by using the functions in it we can develop a graphics application which run on any machine and produce same graphical output on any output device. 2) It is often called as an API. 3) OpenGL is at its more powerful when drawing images of complex three-dimensional scenes.

18. What is event-driven programming? Event-driven programming means that the program responds to various events such as the click of a mouse, the press of a key on a keyboard, or the resizing of the window on a screen by managing a event queue and organizing the programs as a collection of callback functions that are executed when events occur.

19. What is Utility Toolkit? OpenGL comes with a Utility Toolkit which provides tools to assist with event management.The four principal types of events we will frequently work with are:

1) glutDisplayFunc(myDisplay)2) glutReshapeFunc(myReshape)3) glutMouseFunc(myMouse)4) glutKeyboardFunc(myKeyboard)

20. List the basic graphics primitives. The basic graphics primitives are as follows:

1) Point2) Line3) Polyline4) Polygon

In OpenGL every primitive is represented as a set of vertices.

21. Write a command sequence in OpenGL to plot dots on screen. The command sequence in OpenGL to plot dots on screen is as follows: glBegin(GL_POINTS); glvertex2i(100,50); glvertex2i(150,100); glEnd(); In the command used to draw a point, gl corresponds to graphics library, vertex represents basic command, 2 represents no. of arguments and i represents the type of argument.

22. What is a polyline? A polyline is a collection of line segments connected end-to-end. In OpenGL a polyline is drawn by specifying vertices between glBegin(GL_LINE_STRIP) and glEnd().

QB.26

Page 27: Question Bank

23. State the use of parameterizing figures. By parameterizing the figure, more flexibility is achieved. We can draw families of objects distinguished by different parameter values.

24. Define convex polygon. A polygon is convex if a line connecting any two points of the polygon lies entirely within it.

25. State the role of aspect ratio. The shape of an object is embodied in its aspect ratio. For example the aspect ratio of a rectangle is simply the ratio of its width to height.

26. List other graphics primitives in OpenGL. The other graphics primitives are:

1) GL_TRIANGLES2) GL_TRIANGLE_STRIP3) GL_TRIANGLE_FAN4) GL_QUADS5) GL_QUAD_STRIP

27. What a model view matrix will do? Model view matrix is used to position the object as well orient and position the camera in a scene by applying sequence of transformations.

28. What is role of projection matrix? The projection matrix scales and shifts each vertex so that all those vertices that lie inside a view volume will lie a standard cube that extends from -1 to 1 in each dimension.

29. State the role of viewport matrix. After clipping, the viewport matrix finally maps the surviving portion of the block into a 3D viewport.

30. What does gluLookAt( ) do? GluLookAt ( ) builds a matrix that converts world coordinates into eye coordinates.

31. What does glOrtho( ) do? The function glOrtho(left, right, bottom, top, near, far) establishes a parallelepiped as a view volume that extends from left to right in x, from bottom to top in y and from –near to –far in z.

32. List the OpenGL tools used for modeling and viewing. The OpenGL tools used for modeling and viewing are:

1) glScaled(sx,sy,sz)2) glTranslated(dx,dy,dz)3) glrotated(angle,ux,uy,uz)

33. Define SDL. The designer can specify the objects in a scene through a simple language and place the description of the scene in a file. The drawing program then becomes general purpose

QB.27

Page 28: Question Bank

program, it reads the file describing the scene at run time and drawn whatever objects are encountered in the file. The Scene Description Language offers such a tool.

34. State the difference between CMY and HSV color models. (Nov/Dec 2012) CMY model: A color model defined with the primary colors cyan, magenta, and yellow is useful for describing color output to hard-copy devices. The HSV (Hue, Saturation, 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, tints, and tones.

35. What are subtractive colors? (May/ June 2012) CMY is a subtractive color model (i.e.,) cyan can be formed by adding green and blue light. When white light is reflected from cyan-colored ink, the reflected light must have no red component. i.e., red light is absorbed or subtracted by the link.

36. 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.

37. Draw the color model HLS double cone. (May/ June 2013) The diagram of HLS double cone is as follows:

38. What is dithering? (May/ June 2013) Dithering is a process that uses noise to smooth out colors in digital graphics and sounds in digital audio. Several types of dithering are used by various image and audio editors,

QB.28

Page 29: Question Bank

though random dithering is the most common. While dithering is often used to improve the appearance and sound of low quality graphics and audio, it can also be applied to high quality images and recordings. In these situations, dithering may still provide extra smoothness to the image or sound.

UNIT – III

16 Mark Questions with Key Points

1. Explain key frame systems. (Nov/Dec 2012)Key frame systemsMotion path can be given with a kinematics descriptionPhysically based on force acting objectFrame in to individual component or object called cellsMorphingTransformation of object shapes from one form to another is called morphingTwo key frames for an object transformationPreprocessing using vertex countSimulating accelerationsTime interval between keyframe is divided in to n + 1 Discuss with relevant formulas & derivations.

2. Explain about the Color Models. (Nov/Dec 2012, Nov/Dec 2011, May/June 2012, May/June 2013)

Define Color Model Types of Color Model

1. XYZ2. RGB (monitor)3. CMYK (Printing devices)4. YIQ (Television)5. HSV (Artists)

QB.29

Page 30: Question Bank

3. Discuss about various motion specification methods.o Direct motion specificationo Goal directed systemo Kinematics & Dynamics

4. Write a program sequence in OpenGL for drawing sierpinski gasket. To draw it follow the algorithm in order,

1. Choose three fixed points T0, T1 and T2 to form some triangle.2. Choose the initial point p0 to be drawn by selecting one of the points

T0, T1 and T2 at random. Now iterate the following steps until the pattern is satisfyingly filled in:

3. Choose one of the points T0, T1 and T2 at random, call it T.4. Construct the next point pk as the midpoint between T and previously

found point pk-1.5. Draw pk using Drawdot().

Give Programming Example.

5. Illustrate the use of parameterizing figures with a programming example. By parameterizing the figure more flexibility is achieved. We can draw families of

objects distinguished by different parameter values. Programming Example (house-village)

6. Explain the overview of the viewing process and the graphics pipeline. View volume Graphics pipeline is implemented with three matrices. Those are:

1. Model view matrix is used to position the object as well orient and position the camera in a scene by applying sequence of transformations.

2. The projection matrix scales and shifts each vertex so that all those vertices that lie inside a view volume will lie a standard cube that extends from -1 to 1 in each dimension.

3. After clipping, the viewport matrix finally maps the surviving portion of the block into a 3D viewport.

7. Discuss about SDL with an example. (Nov/Dec 2012, Nov/Dec 2011, May/June 2012, May/June 2013)

The designer can specify the objects in a scene through a simple language and place the description of the scene in a file. The drawing program then becomes general purpose program, it reads the file describing the scene at run time and drawn whatever objects are encountered in the file. The Scene Description Language offers such a tool.

Give Programming Example.

QB.30

Page 31: Question Bank

8. Discuss Basic OPENGL operations. (Nov/Dec 2011) 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_POINTSGL_LINES GL_LINE_STRIP GL_LINE_LOOP GL_TRIANGLES GL_TRIANGLE_STRIP GL_TRIANGLE_FAN GL_QUADSGL_QUAD_STRIP GL_POLYGON

UNIT IV2 Mark Questions with Answers

1. What is rendering? (May/June 2013) Rendering is the process of converting visualization primitives into something that can be visually perceived by the user.

2. What is shading? (Nov/Dec 2011 and May/June 2012) Shading is the process of computing the color for the components of a scene. It is usually done by calculating the effect of light on each object in a scene to create an effective lighted presentation. The shading process is thus based on the physics of light,and the most detailed kinds of shading computation can involve deep subtleties of the behavior of light including the way light scatters from various kinds of materials with various details of surface treatments.

3. Name the types of shading. There are two types of Shading:

1. Flat Shading2. Smooth Shading

a) Gouraud Shadingb) Phong Shading

4. What is flat shading? (May/June 2013) Flat shading of a polygon presents each polygon with a single color. This effect is computed by assuming that each polygon is strictly planar and all the points on the polygon have exactly the same kind of lighting treatment. The term flat can be taken to mean that the color is flat across the polygon, or that the polygon is colored as though it is flat (planar) and thus does not change color as it is lighted.

QB.31

Page 32: Question Bank

5. What do you mean by smooth shading? (May/June 2013) Smooth shading of a polygon displays the pixel in the polygon with smoothly-changing colors across the surface of the polygon. It attempts to de-emphasize edges between faces by computing colors at more points on each face by interpolating colors of left and right edges of each scan line content.

6. How light can interact with the surface of an object? The incident light interacts with the surface in three different ways:

1. Some is absorbed by the surface and is converted into heat.2. Some is reflected from the surface3. Some is transmitted into the interior of the object as in the case of glass.

7. State the types of reflection of incident light. The two types of reflection are:

1. Diffuse Scattering It occurs when some of the incident light penetrates the surface slightly and is re-radiated uniformly in all directions.

2. Specular Reflection Incident light does not penetrate the object, but instead is reflected directly from its outer surface.

8. Write a sequence of code which is used to create light source in OpenGL. The sequence of code is as follows:GLfloat myLightPosition[] = {3.0, 6.0, 5.0, 1.0}; //creates a light source at position givenglLightfv(GL_LIGHT0, GL_POSITION, myLightPosition);glEnable(GL_LIGHTING);glEnable(GL_LIGHT0);

9. How light sources can be moved? Light sources can be repositioned either by1). Applying transformations which includes suitable uses of functions gltranslated(), glrotated() and glscaled().2). Moving the camera

10. What is texturing? (Nov/Dec 2011, Nov/Dec 2012 and May/June 2012) 1) A texture image is a rectangular array of pixel data. 2) Texturing – applying textures to a graphical object to achieve a more interesting image or add information to the image without computing additional geometry.

11. What is reflection mapping? The class of techniques known as reflection mapping can significantly improve the realism of pictures. The basic idea is to see reflections in an object that suggest the “world” surrounding that object. The two main types of reflection mapping are,i). Chrome mapping (coated with chrome)ii). Environment mapping (surrounding environment is seen reflected in the object)

12. How can we construct a colored light?

QB.32

Page 33: Question Bank

Colored light can be constructed by adding certain amounts of red, green and blue light. When dealing with colored sources and surfaces we calculate each color component individually and simply add them to from the final color of the reflected light. Ir= Iar ρar + Idr ρdr × lambert + Ispr ρsr × phongf Ig= Iag ρag + Idg ρdg × lambert + Ispg ρsg × phongf Ib= Iab ρab + Idb ρdb × lambert + Ispb ρsb × phongf The above equations are applied three times to compute the red, green and blue components of the reflected light.

13. Discuss about Spotlights. Light sources are point sources by default, meaning that they emit light uniformly in all directions. But OpenGL allows you to make them into spotlights, so they emit light in a restricted set of directions. The fig. shows a spotlight aimed in direction d with a “cutoff angle” of α.

14. How to add shadows to objects? (Nov/Dec 2012) Shadows make an image more realistic. The way one object casts a shadow on another object gives important visual clues as to how the two objects are positioned with respect to each other. Shadows conveys lot of information as such, you are getting a second look at the object from the view point of the light source. There are two methods for computing shadows:

1. Shadows as Texture 2. Creating shadows with the use of a shadow buffer

15. List down the ways to adjust the camera. There are six degrees of freedom for adjusting a camera: It can be slid (Sliding the camera means to move it along one of its own axes that is, in the u, v and n direction without rotating it) in three dimensions and it can be rotated (roll, pitch & yaw)about any of three coordinate axes.

16. What is Bump Mapping? Bump mapping is a technique developed by Blinn, to give a surface a wrinkled or dimpled appearance without struggling to model each dimple itself. One problem associated with applying bump mapping to a surface like a teapot is that since the model does not contain the dimples, the object's outline caused by a shadow does not show dimples and it is smooth along each face.

17. How can we make an object to glow? This is the simplest method. The visibility intensity I is set equal to the texture value at each spot: I=texture(s,t)

QB.33

Page 34: Question Bank

The object then appears to emit light or glow. Lower texture values emit less light and higher texture values emit more light. No additional lighting calculations are needed. OpenGL does this type of texturing using glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

18. List down the components of mesh objects. A mesh objects has the following three lists

1. The vertex list 2. The normal vector list 3. The face list

UNIT – IV

Detailed answers

1. Discuss the types of shading models. (Nov/Dec 2012, May/June 2012, May/June 2013)A shading model dictates how light is scattered or reflected from a surface. The shading models described here focuses on achromatic light. Achromatic light has brightness and no color, it is a shade of gray so it is described by a single value its intensity.

Some amount of the reflected light travels in the right direction to reach the eye causing the object to be seen. The amount of light that reaches the eye depends on the orientation of the surface, light and the observer. There are two different types of reflection of incident light. Diffuse scattering occurs when some of the incident light slightly penetrates the surface and is re-radiated uniformly in all directions. Scattered light interacts strongly with the surface and so its color is usually affected by the nature of the surface material. Specular reflections are more mirror like and highly directional. Incident light is directly reflected from its outer surface. This makes the surface looks shinny. In the simplest model the reflected light has the same color as the incident light, this makes the material look like plastic. There are two types of Shading:

1. Flat Shading

QB.34

Page 35: Question Bank

Flat shading of a polygon presents each polygon with a single color. This effect is computed by assuming that each polygon is strictly planar and all the points on the polygon have exactly the same kind of lighting treatment. The term flat can be taken to mean that the color is flat across the polygon, or that the polygon is colored as though it is flat (planar) and thus does not change color as it is lighted.

2. Smooth Shading (Smooth shading of a polygon displays the pixel in the polygon with smoothly- changing colors across the surface of the polygon. It attempts to de-emphasize edges between faces by computing colors at more points on each face by interpolating colors of left and right edges of each scan line content.) The types of Smooth Shading are:

a) Gouraud Shadingb) Phong Shading

2. What is shading? Explain about it in detail.A shading model dictates how light is scattered or reflected from a surface. The shading models described here focuses on achromatic light. Achromatic light has brightness and no color, it is a shade of gray so it is described by a single value its intensity. Some amount of the reflected light travels in the right direction to reach the eye causing the object to be seen. The amount of light that reaches the eye depends on the orientation of the surface, light and the observer. There are two different types of reflection of incident light. Diffuse scattering occurs when some of the incident light slightly penetrates the surface and is re-radiated uniformly in all directions. Scattered light interacts strongly with the surface and so its color is usually affected by the nature of the surface material.

Specular reflections are more mirrorlike and highly directional. Incident light is directly reflected from its outer surface. This makes the surface looks shinny. In the simplest model the reflected light has the same color as the incident light, this makes

the material look like plastic.

Explain about computing the above scattering & reflection components.

3. Explain about texturing with an example. (Nov/Dec 2011, May/June 2013)Textures are formed from bitmap representations of images, such as digitized photo. Such a representation consists of an array txtr[c][r] of color values. If the array has C columns and R rows, the indices c and r vary from 0 to C-1 and R-1 respectively. The function texture(s,t) accesses samples in the array as in the code: Color3 texture (float s, float t) { return txtr[ (int) (s * C)][(int) (t * R)]; } Where Color3 holds an RGB triple. Example: If R=400 and C=600, then the texture (0.261, 0.783) evaluates to txtr[156][313]. Note that a variation in s from 0 to 1 encompasses 600 pixels, the variation in t encompasses 400 pixels. To avoid distortion during rendering, this texture must be mapped onto a rectangle with aspect ratio 6/4. Procedural Textures - Textures are defined by a mathematical function or procedure. For example a spherical shape could be generated by a function: float fakesphere( float s, float t)

QB.35

Page 36: Question Bank

{ float r= sqrt((s-0.5) * (s-0.5)+ (t-0.5) * (t-0.5)); if (r < 0.3) return 1-r/0.3; //sphere intensity else return 0.2; //dark background } This function varies from 1(white) at the center to 0 (black) at the edges of the sphere.

Painting the textures to flat surfaces(Explanation) Adding textures to mesh objects(Explanation)

4. How will you build a camera in a program? (Nov/Dec 2011, May/June 2013)CAMERA IN A PROGRAM To have a finite control over camera movements, we create and manipulate our own camera in a program. After each change to this camera is made, the camera tells OpenGL what the new camera is. We create a Camera class that does all things a camera does. In a program we create a Camera object called cam, and adjust it with functions such as the following: cam.set(eye, look, up); // initialize the camera cam.slide(-1, 0, -2); //slide the camera forward and to the left cam.roll(30); // roll it through 30 degree cam.yaw(20); // yaw it through 20 degree The Camera class definition: class Camera { private: Point3 eye; Vector3 u, v, n; double viewAngle, aspect, nearDist, farDist; //view volume shape void setModelViewMatrix(); //tell OpenGL where the camera is public: Camera(); //default constructor void set(Point3 eye, Point3 look, Vector3 up); //like gluLookAt() void roll(float, angle); //roll it void pitch(float, angle); // increase the pitch void yaw(float, angle); //yaw it void slide(float delU, float delV, float delN); //slide it void setShape(float vAng, float asp, float nearD, float farD); }; The Camera class definition contains fields for eye and the directions u, v and n. Point3 and Vector3 are the basic data types. It also has fields that describe the shape of the view volume: viewAngle, aspect, nearDist and farDist. The utility routine setModelViewMatrix() communicates the modelview matrix to OpenGL. It is used only by member functions of the class and needs to be called after each change is made to the camera‟s position. The matrix

This matrix V accounts for the transformation of world points into camera coordinates. The utility routine computes the matrix V on the basis of current values of eye, u ,v and n and loads the matrix directly into the modelview matrix using glLoadMatrixf().

QB.36

Page 37: Question Bank

5. How Shadowing can be done? (Nov/Dec 2011,Nov/Dec 2012, May/June 2012, May/June 2013)

Shadows make an image more realistic. The way one object casts a shadow on another object gives important visual clues as to how the two objects are positioned with respect to each other. Shadows conveys lot of information as such, you are getting a second look at the object from the view point of the light source. There are two methods for computing shadows:

Shadows as Texture (Explanation) Creating shadows with the use of a shadow buffer (Explanation)

UNIT V2 MARK QUESTIONS

1. Define Fractals. (Nov/Dec 2011, May/June 2012, May/June 2013) A Fractal is an object whose shape is irregular at all scales. Fractal has infinite detail and fractal dimension. A fractal imbedded in n-dimensional space could have any fractional dimension between 0 and n.

2. What is a Fractal Dimension? Fractal has infinite detail and fractal dimension. A fractal imbedded in n-dimensional space could have any fractional dimension between 0 and n. The Fractal Dimension D= LogN / Log SWhere N is the No of Pieces and S is the Scaling Factor.

3. What is random fractal? The patterns in the random fractals are no longer perfect and the random defects at all scale.

4. What is geometric fractal? A geometric fractal is a fractal that repeats self-similar patterns over all scales.

QB.37

Page 38: Question Bank

5. 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.

6. State the properties of fractals. The properties of fractals are:

1. Infinity (recursion)2. Self similar (means that they appear the same at every scale)

7. Mention another method to approach infinity. Another way to approach infinity is to apply a transformation to a picture again and again and examine the results. This technique also provides an another method to create fractal shapes.

8. Write down the pseudo code for drawing any order Koch Curve. The recursive method for drawing any order Koch curve is given in the following pseudo code:To draw Kn:if ( n equals 0 ) Draw a straight line;else {Draw Kn-1;Turn left 60 ;Draw Kn-1;Turn right 120 ;Draw Kn-1;Turn left 60 ;Draw Kn-1;}

9. What is IFS? An iterated function system (IFS) is a collection of N affine transformations Ti, for i=1,2,…N.

10. What is attractor? List down its properties. Each affine map reduces the size of its image at least slightly, the orbit converge to a unique image called the attractor of the IFS. We denote the attractor by the set A, some of its important properties are: 1. The attractor set A is a fixed point of the mapping W(.), which we write as W(A)=A. That is putting A through the copier again produces exactly the same image A. The iterates have already converged to the set A, so iterating once more makes no difference. 2. Starting with any input image B and iterating the copying process enough times, we find that the orbit of images always converges to the same A. If Ik = W (k) (B) is the kth iterate of image B, then as k goes to infinity Ik becomes indistinguishable from the attractor A.

11. What is the chaos game? The Chaos Game is a nonrecursive way to produce a picture of the attractor of IFS.

QB.38

Page 39: Question Bank

12. Write down the pseudo code for playing the chaos game. The pseudo code for playing the chaos game is as follows:void chaosGame(Affine aff[], double pr[], int N) { RealPoint P = { 0,0 ,0,0}; //set some initial point int index; do { index = chooseAffine(pr , N); // choose the next affine P = transform(aff[ondex], P); drawRealDot(P); // draw the dot } while (!bored); }

13. Define Mandelbrot set. (No v/Dec 2011, May/June 2012) The Mandelbrot set considers different values of c, always using the starting point s =0. For each value of c, the set reports on the nature of the orbit of 0, whose first few values are as follows: orbit of 0: 0, c, c2+c, (c2+c)2+c, ((c2+c)2+c)2 +c,…….. For each complex number c, either the orbit is finite so that how far along the orbit one goes, the values remain finite or the orbit explodes that is the values get larger without limit. The Mandelbrot set denoted by M, contains just those values of c that result in finite orbits:

The point c is in M if 0 has a finite orbit. The point c is not in M if the orbit of 0 explodes.

14. Define Julia Set. (Nov/Dec 2011, May/June 2012) Like the Mandelbrot set, Julia sets are extremely complicated sets of points in the complex plane. There is a different Julia set, denoted Jc for each value of c. A closely related variation is the filled-in Julia set, denoted by Kc, which is easier to define.

15. What is filled-in Julia set? The filled-in Julia set at c, Kc, is the set of all starting points whose orbits are finite. When studying Kc, one chooses a single value for c and considers different starting points. Kc should be always symmetrical about the origin, since the orbits of s and –s become identical after one iteration.

16. How can we add strength to ray tracing method? The great strength of the ray tracing method is the ease with which it can handle both reflection and refraction of light. This allows one to build scenes of exquisite realism, containing mirrors, fishbowls, lenses and the like. There can be multiple reflections in which light bounces off several shiny surfaces before reaching the eye or elaborate combinations of refraction and reflection. Each of these processes requires the spawning and tracing of additional rays.

17. Mention the data structure which is used to hold the Boolean objects. The data structure used to hold Boolean object is Binary Tree.

18. What is ray tracing? Ray tracing (also called ray tracing, ray-tracing or ray casting) is a technique for presenting three-dimensional (3D) images on a two-dimensional (2D) display by tracing a path of light through pixels on an image plane.

QB.39

Page 40: Question Bank

19. List down the properties of peano curves. (Nov/Dec 2012)

A fractal curve can in fact “fill the plane” and therefore have a dimension of 2. Such curves are called peano Curves. Quadratic Koch Curve, Dragon Curve and Gosper Curve are the examples

20. Write down some of the Boolean operations on objects. (Nov/Dec 2012)

Objects such as lenses and hollow fish bowls, as well as objects with holes are easily formed by combining the generic shapes. Such objects are called compound, Boolean or CSG objects. The Boolean operators: union, intersection and difference are shown in the below figure.

UNIT – V

16 Mark Questions with Key Points

1. Discuss about Julia set. (Nov/Dec 2012, May/June 2012, May/June 2013)

Definition:Julia Set Jc is for any given value of c; it is the boundary of Kc. Kc is the set of all starting points that have finite orbits and every point outside Kc has an exploding orbit. We say that the points just along the boundary of Kc and “on the fence”. Inside the boundary all orbits remain finite; just outside it, all orbits goes to infinity. Preimages and Fixed Points If the process started instead at f(s), the image of s, then the two orbits would be: s, f(s), f2(s), f3(s),…. (orbit of s) or f(s), f2(s), f3(s), f4(s),…. (orbit of f(s)) which have the same value forever. If the orbit of s is finite, then so is the orbit of its image f(s). All of the points in the orbit , if considered as starting points on their own, have orbits with the same behavior: They all are finite or they all explode. Any starting point whose orbit passes through s has the same behavior as the orbit that start at s: The two orbits are identical

QB.40

Page 41: Question Bank

forever. The point “just before” s in the sequence is called the preimage of s and is the inverse of the function f(.) = (.)2 + c. The inverse of f(.) is , so we have two preimages of z are

Drawing

2. Explain Mandelbrot set. Defintion:

The Mandelbrot set considers different values of c, always using the starting point s =0. For each value of c, the set reports on the nature of the orbit of 0, whose first few values are as follows:

Orbit of 0: 0, c, c2+c, (c2+c)2+c, ((c2+c)2+c)2 +c,…….. For each complex number c, either the orbit is finite so that how far along the orbit one goes, the values remain finite or the orbit explodes that is the values get larger without limit. The Mandelbrot set denoted by M, contains just those values of c that result in finite orbits:

i. The point c is in M if 0 has a finite orbit. ii. The point c is not in M if the orbit of 0 explodes.

Computation Drawing

3. Describe about Koch Curve. A complex curve can be fashioned recursively by repeatedly “refining” a

simple curve. The simplest example is the Koch curve, discovered in1904 by the Swedish mathematician Helge von Koch. The curve produces an infinitely long line within a region of finite area. Successive generations of the Koch curve are denoted K0, K1, K2….The zeroth generation shape K0 is a horizontal line of length unity.

Examples Programming Examples & Explanations

4. Explain Random Fractals. (Nov/Dec 2011, May/June 2012)Fractal is the term associated with randomly generated curves and surfaces that exhibit a degree of self-similarity. These curves are used to provide “naturalistic” shapes for representing objects such as coastlines, rugged mountains, grass and fire.

Fractalizing a Segment The simplest random fractal is formed by recursively roughening or fractalizing a line segment. At each step, each line segment is replaced with a “random elbow”. The figure shows this process applied to the line segment S having endpoints A and B. S is replaced by the two segments from A to C and from C to B. For a fractal curve, point C is randomly chosen along the perpendicular bisector L of S. The elbow lies randomly on one or the other side of the “parent” segment AB.

Programming Example Controlling the spectral density of fractal.

5. Write short notes on reflections and transparency. (May/June 2012, May/June 2013)

QB.41

Page 42: Question Bank

The great strengths of the ray tracing method is the ease with which it can handle both reflection and refraction of light. This allows one to build scenes of exquisite realism, containing mirrors, fishbowls, lenses and the like. There can be multiple reflections in which light bounces off several shiny surfaces before reaching the eye or elaborate combinations of refraction and reflection. Each of these processes requires the spawnins and tracing of additional rays. When the surface is mirror like or transparent, the light I that reaches the eye may have 5 components. I=Iamb + Idiff + Ispec + Irefl + Itran The first three are the fan=miler ambient, diffuse and specular contributions. The diffuse and specular part arise from light sources in the environment that are visible at Pn. Iraft is the reflected light component, arising from the light , Ik that is incident at Pn along the direction –r. This direction is such that the angles of incidence and reflection are equal,so R=dir-2(dir.m)m Where we assume that the normal vector m at Pn has been normalized.

Similarly Itran is the transmitted light components arising from the light IT that is transmitted through the transparent material to Ph along the direction –t. A portion of this light passes through the surface and in so doing is bent, continuing its travel along –dir. The refraction direction + depends on several factors.

I is a sum of various light contributions, IR and IT each arise from their own fine components – ambient, diffuse and so on. IR is the light that would be seen by an eye at Ph along a ray from P‟ to Pn. To determine IR, we do in fact spawn a secondary ray from Pn in the direction r, find the first object it hits and then repeat the same computation of light component. Similarly IT is found by casting a ray in the direction t and seeing what surface is hit first, then computing the light contributions.

The Refraction of Light When a ray of light strikes a transparent object, apportion of the ray penetrates the object. The ray will change direction from dir to + if the speed of light is different in medium 1 than in medium 2. If the angle of incidence of the ray is θ1, Snell‟s law states that the angle of refraction will be sin(θ2) /C2= sin(θ1) / C1 where C1 is the speed of light in medium 1 and C2 is the speed of light in medium 2. Only the ratio C2/C1 is important. It is often called the index of refraction of medium 2 with respect to medium 1. Note that if θ1 ,equals zero so does θ2 .Light hitting an interface at right angles is not bent.

In ray tracing scenes that include transparent objects, we must keep track of the medium through which a ray is passing so that we can determine the value C2/C1 at the next intersection where the ray either exists from the current object or enters another one. This tracking is most easily accomplished by adding a field to the ray that holds a pointer to the object within which the ray is travelling. Several design polices are used, 1) Design Policy 1: No two transparent object may interpenetrate. 2) Design Policy 2: Transparent object may interpenetrate.

6. Explain about CSG/ Boolean operations on objects. (May/June 2013)A ray tracing method to combine simple shapes to more complex ones is known as constructive Solid Geometry(CSG). Arbitrarily complex shapes are defined by set operations on simpler shapes in a CSG. Objects such as lenses and hollow fish bowls,

QB.42

Page 43: Question Bank

as well as objects with holes are easily formed by combining the generic shapes. Such objects are called compound, Boolean or CSG objects.

Two compound objects build from spheres. The intersection of two spheres is shown as a lens shape. That is a point in the lens if and only if it is in both spheres. L is the intersection of the S1 and S2 is written as L=S1∩S2 The difference operation is shown as a bowl. A point is in the difference of sets A and B, denoted A-B, if it is in A and not in B. Applying the difference operation is

analogous to removing material to cutting or carrying. The bowl is specified by B=(S1-S2)-C. The solid globe, S1 is hollowed out by removing all the points of the inner sphere, S2, forming a hollow spherical shell. The top is then opened by removing all points in the cone C. A point is in the union of two sets A and B, denoted AUB, if it is in A or in B or in both. Forming the union of two objects is analogous to gluing them together. The union of two cones and two cylinders is shown as a rocket. R=C1 U C2 U C3 U C4. Cone C1 resets on cylinder C2.Cone C3 is partially embedded in C2 and resets on the fatter cylinder C4.

QB.43