CG Viva Questions ANSWERS
CG Viva Questions ANSWERS
2. application areas of CG
To start the graphics system, first call the initgraph function. initgraph
loads the graphics driver and puts the system into graphics mode. You
can tell initgraph to use a particular graphics driver and mode, or to
autodetect the attached video adapter at run time and pick the
corresponding driver.
1) *graphdriver
Integer that specifies the graphics driver to be used. You can give
graphdriver a value using a constant of the graphics_drivers
enumeration type.
2)*graphmode
3)*pathtodriver
Specifies the directory path where initgraph looks for graphics drivers (*.BGI)
first.
Then the init graph will automatically detect the graphics driver and it’s mode.
6)Resolution.
It is defined as the maximum no: of points that can be displayed with out
overlap on aCRT
OR
It can be defined as the no: of points per centimeter that can be plotted
horizontally or vertically
EG:
640x480
800x600
024x768
In raster scan system electron beam is swept across the screen one row at a
time from top to bottom. Here the electron beam returns to the leftmost
position one line down & scan again & repeat this to cover the entire screen.
But in random scan systems the electron beam is directed only to the parts of
the screen where a picture is to be drawn
9)Horizontal retrace
It is the returning of the electron beam to the leftmost position of the
screen one scan line down (in raster scan system)
10)vertical retrace
After scanning all the scan lines in the screen the electron beam returns to
the top most positions in the screen to start the scanning process
again.this diagonal movement of the electron beam is called vertical
retracing
11)Refresh rate
12)Pixel(picture element)
It can be defined as the smallest size object or color spot that can be
displayed & addressed on a monitor
13)Vector graphics
14)Raster graphics
16)Display list
Graphic commands are stored in the display file
It is a file storing all commands & when this file is interpreted image is
displayed on the screen.
24.Equation of line
y=mx+b
Rotation
x1=r cos(φ +θ)
= r cosφ cosθ-rsinφ sin θ
This is the rectangular region in the screen which is selected for displaying
the object
2. check whether the line end point is completly inside the clip
window
If line end point is completly inside the clip window then the region
code of the line endpoints are 0000
3. check whether the line end point is completly outside the clip
window.
This is done by perfoming logical AND operation of the region
code & if we get 1 as result then the line is completly outside the clip
window
48.Bezier curve.
It is a mixture of interpolating & approximation splines.
It has 2 interpolated end points & 2 or more approximated intermediary c
ontrol points
49.Equation for Bezier curve
bezier bspline
1
Interpolate 1st and last control Approximates all control points
points & approximates all other
points
2 Degree depends onthe no: of Degree is independent of the no: of
control points control points
3 No local control over the shape Allows local control over the shape
of the curve of the curve
55.Properties of bspline
Curve has the degree d-1
For n+1 control points the is drawn with n+1 blending functions.
Blending functions is defined over d sub interval in the total range of u
The range of parameter u is divided into n+d+1 sub intervals
56.Types of Bspline.
Uniform : Here the spacing between the knot values is constant
Non uniform:Spacing between the knot values is not constant
Open:combination of uniform & non uniform Bsplines
63. . How will you determine that a line is completely inside a clip window?
Refer qno:34
lighting model or Shading model is used to calculate the intensity of light that we
should see at a given point on the surface of object
68.surface rendering
69 .Diffuse Reflection
70 .Specular reflection
73.Which visible surface dection method is used in the case of transparent surface
A-Buffer Method
74.Which visible surface dection method is used in the case of overlapping surfaces
Scan-Line Method
75. Different Polygon rendering methods
And finally Linearly interpolate the vertex intensities over the surface of
the polygon.
But in phong shading first step is same ie determining the average unit
normal vector at each polygon vertex
Then Linearly interpolate the vertex normals over the surface of the polygon
and at last Apply an illumination model along each scanline to calculate
projected pixel intensities for the surface points.
Dithering is an imaging technique which allows a bitmap (or a bitmapped device, such
as a screen or printer) to appear to display more colors than are actually possible.
If the bitmap (or bitmapped device) only allows black and white, dithering can be
used to produce an illusion of gray.
If the bitmap (or bitmapped device) allows a palette of colors, then dithering can
produce an illusion of more colors being displayed than are in the palette.
81.Explain fractals.
Fractals are used to model natural objects like mountains,clouds plants and coastlines
etc having irregular or fragmented features.
84.Explain morphing