Beruflich Dokumente
Kultur Dokumente
MODEL EXAMINATION-I
Part - B (5 * 16 = 80)
12. a) Explain any one line drawing method with an example. (16)
(OR)
b)Explain Sutherland Hodgman algorithm for polygon clipping. (16)
5. Affine transformation:
xI = axxx + axyy + bx
yI = ayxx + ayyy + by
8. Blobby objects
11.a
CAD
Presentation graphics
Computer art
Entertainment
Scientific
Business (2)
Image processing
Used in robotics
(2)
ICON (2)
b.
Translation
Translation equation:
x I = x + tx yI = y + ty
Matrix equation:
PI = P + T
(4)
Rotation
• rotational angle Θ
xI = x Cos Θ – y Sin Θ
yI = x Sin Θ + y Cos Θ
PI = R.P
(4)
Scaling
xI = x . Sx
yI = y . Sy
Uniform Scaling : Sx = Sy
Differential Scaling: Sx ≠ Sy
(4)
Reflection
Shear
b.
performed by processing polygon vertices against each clip rectangle boundary
Processing cases
1. First vertex is outside , Second is inside
add second vertex & intersection point of polygon edge with window
boundary to o/p vertex list (4)
2. If both vertices are inside
add the second vertex to o/p vertex list (4)
3. If the first vertex is inside ,second is outside (4)
save the edge intersection point with window boundary to o/p vertex list
4. If both vertices are outside
add nothing to o/p vertex list (4)
13.a
Every line endpoint is assigned a four digit binary code – region code
Region code identifies the location of the point relative to the boundaries of the
clipping rectangle
Bit 1 is set to 1 if x < xwmin
Bit 2 is set to 1 if x > xwmax
Bit 3 is set to 1 if y < ywmin
Bit 4 is set to 1 if y > ywmax (4)
Accept the lines whose both endpoints are having the region code 0000
Reject the lines whose endpoints have a 1 in the same bit position in the
region code
Lines that cannot be identified as completely inside or outside a clip
window are checked for intersection with window boundaries
Intersection with clipping boundary can be calculated using the slope
intercept form of the line equation. (8)
The intersection point with the vertical boundary is
y = y1 + m (x – x1 )
(2)
The intersection point with the horizontal boundary is
x = x1 + (y – y1) / m
(2)
b.
• Declare the necessary variables
• Obtain the center ,major and minor axes of the ellipse
• Determine the first point of the ellipse (0,ry)
• Calculate the decision parameter for the region as P10 = ry2 – rx2 ry + rx 2/4 (2)
• At each x starting from k =0 in region 1 perform the following test
If P < 0 the next point to be plotted is (x k+1, yk )and P1 k+1 = P1 k +2ry2 x k+1 +ry2
(2)
Else the next point to be plotted is (x ,y ) and P1 k+1 = P1 k +2ry2x k+1 – 2rx2y k+1 +ry2
(2)
Repeat for all k until 2 ry2x >= 2rx2y (2)
• For region 2 calculate decision parameters as P2 0 = ry (x + 1/2) +rx (y0- 1) 2 - rx2ry2
2 2 2
(2)
• At each position in region 2 starting from x = 0 for each xk perform the
following test
If P > 0 the next point to be plotted along the ellipse is (xk ,yk-1) and P2
2 2
k+1 = P2 k -2rx y k+1 + rx (2)
Else the next point to be plotted along the ellipse is (x , y) and P2 k+1 =
P2 k + 2ry2x k+1 – 2rx2y +rx2
(2)
• Determine the symmetry points in other three quadrants
• Repeat the steps for all regions until 2ry2x >= 2rx2y
(2)
14.a
• Parallel projection
parallel lines in world coordinate scenes are projected as parallel lines
in 2D display plane.
(3)
• Perspective projection
parallel lines that are not parallel to the display plane are projected
into converging lines.
(3)
• Depth Cueing
method to indicate the depth with wire frame display.
intensity of the objects are varied according to their distance from the
viewing position
(2)
• Visible line & surface identification
clarify depth relationships
highlight visible lines in a different color
non visible lines are displayed as dashed line
(2)
• Surface Rendering
sets the surface intensity of objects according to the lighting
conditions in the scene and according to assigned surface characteristics
(2)
• Exploded & cutaway views
show the internal structure and relationships of object parts
cut away view removes part of visible surfaces to show internal
structure
(2)
• 3 D & Stereoscopic view
obtained by reflecting a raster image from a vibrating flexible mirror
stereoscopic view provides separarte views for left eye & right eye (2)
b. HSV color model
color parameters are hue (H), saturation (S) and value(V)
3D representation(hexcone) derived from RGB cube
Origin black & Vertex white
Boundary of the hexagon represents various hues
Saturation is measured along horizontal axis, varies from 0 to 1
Value is measured along vertical axis , varies from 0 at the apex to 1 at the
top of the hexcone
Hue is represented as an angle varying from 0 to 360 degrees
Complementary colors are 180 degrees apart
Adding black decreases V while S is constant
Adding white decreases S while V is constant
(8)
HLS color model
Double cone representation
Color parameters are hue, lightness and saturation
Hue specifies angle
Complementary colors are 180 degrees apart
Vertical axis – lightness
L=0 represents black and L =1 represents white
S varies from 0 to 1
Increasing and decreasing L makes the color lighter and darker
Decreasing S moves the color toward gray
(8)
15.a
Polygon & Quadric surfaces
- Object descriptions are stored as sets of surface polygons
- The surfaces are described with linear equations
Polygon table
• data is placed into the polygon table for processing
• Polygon data table can be organised into two groups
geometric table
attribute table (4)
Spline surfaces
it is a composite curve formed with polynomial pieces satisfying a
specified continuity conditions at the boundary of the pieces
Control points
it is a set of point that indicate the general shape of the curve
• interpolation of control points
• approximation of control points
• convex hull
Parametric continuity conditions
Imposed at connection points to ensure smooth transitions from one
curve to another
Zero order parametric continuity
First order parametric continuity
Second order parametric continuity (4)
Fractal constructions & particle systems
Characteristics of fractal objects
• Infinite detail at every point
• Self similarity between object parts
Fractal Generation Procedure
Repeated application of a specified transformation function
to points within a region of space
Classification of fractals
• Self similar fractals
• Self affine fractals
• Self squaring fractals
• Self inverse fractals
(4)
Octree encodings
• divides 3D space into octants
• Stores 8 data elements in each node
• Individual elements of 3D space are called voxels
• If all voxels in an octant are of same type the value is stored in the corresponding data
element of the node
• Otherwise the octant is subdivided into octants & the corresponding data element in the
node points to the next node
• Each node can have 0 to 8 immediate descendants (4)
b.
(i)
Mapping a part of a world coordinate scene to device coordinates
(1)
2D viewing transformation pipeline
MC → WC → VC →NVC →DC
(1)
The mapping of a point at position P(xw , yw ) in window to viewport is given by
xv = xvmin + (xw – xwmin ).sx
(1)
yv = yvmin + (yw – ywmin ).sy
(1)
where
sx = xvmax – xvmin / xwmax – xwmin
(1)
sy = yvmax – yvmin / ywmax – ywmin
(1)
(ii)
Identifies the interior region of objects
Types of tests
odd – even rule
draw a line from a point to a distant point outside ,if the no. of edges crossed is odd the
point is interior otherwise the point is exterior (3)
non zero winding number rule
initialize winding number to 0 for each edge which crosses the line from right to left add
1 and for each edge crossing from left to right subtract 1 if winding no. is non zero the point
is inside otherwise it is outside (3)
(iii)
• locate the intersection points ( scanline with the polygon edges)
• Sort the points from left to right
• Set the frame buffer position between each intersection pair with the
specified color
(2)
Polygon and sorted edge table
• Non horizontal edges are sorted into an edge table
• Each entry in the table contains
Maximum y value for the edge
X intercept value
Inverse slope of the edge
(2)
Process scan line from bottom to top of the polygon
SET –II
Part-A
1.
CAD
Presentation graphics
Computer art
Entertainment
Visualization
Image processing
2.
emissive displays
3.
Miter join
Round join
Bevel join
4. xI = x Cos Θ – y Sin Θ
yI = x Sin Θ + y Cos Θ
Parallel projection
Perspective projection
Depth cueing
Part-B
11.a
(i) Primary output device – video monitor
Beam of electrons emitted by electron gun passes through focusing & deflection system that
direct the beam towards specified position on phosphor coated screen which emits a small spot of
light
(1)
Properties
Persistence- time taken for the emitted light to decay to one tenth of its original
intensity
Resolution - max. no. of points that can be displayed without overlap on the CRT
Aspect Ratio- ratio of vertical points to horizontal points necessary to produce equal
length lines in both directions on the screen (3)
Raster Scan Displays
memory area that stores the picture definition(intensity values for all screen points) (1)
Return of electron beam to the left of the screen after refreshing each scanline
Return of the electron beam to the top left corner at the end of each frame to begin the next
frame (1)
(ii)
SPACEBALL (does not move strain gauges measure pressure applied to provide i/p) (1)
DIGITIZERS (graphics tablet used for drawing ,stylus is used in combination) (1)
b.
12.a
• Declare the necessary variables
• Obtain the center ,major and minor axes of the ellipse
• Determine the first point of the ellipse (0,ry)
• Calculate the decision parameter for the region as P10 = ry2 – rx2 ry + rx 2/4
• At each x starting from k =0 in region 1 perform the following test
If P < 0 the next point to be plotted is (x k+1, yk )and P1 k+1 = P1 k +2ry2 x k+1
+ry2
Else the next point to be plotted is (x ,y ) and P1 k+1 = P1 k +2ry2x k+1 – 2rx2y k+1
+ry2
Repeat for all k until 2 ry2x >= 2rx2y
• For region 2 calculate decision parameters as P2 0 = ry2 (x + 1/2) 2+rx2 (y0- 1) 2
- rx2ry2
• At each position in region 2 starting from x = 0 for each xk perform the
following test
If P > 0 the next point to be plotted along the ellipse is (xk ,yk-1) and P2 k+1 = P2
2 2
k -2rx y k+1 + rx
Else the next point to be plotted along the ellipse is (x , y) and P2 k+1 = P2 k +
2ry2x k+1 – 2rx2y +rx2
• Determine the symmetry points in other three quadrants
• Repeat the steps for all regions until 2ry2x >= 2rx2y
b. Translation
Moves the object without deformation
Points are translated by the same amount (2)
Translation equation:
xI = x + tx yI = y + ty (2)
Matrix equation:
PI = P + T (1)
Rotation
Reposition an object along the circular path in the XY plane (2)
Inside-Outside test
Identifies the interior region of objects
Types of tests
odd – even rule
non zero winding number rule (2)
Boundary fill approach
start from interior and paint outwards towards the boundary
Methods to proceed
4-connected
8-connected (2)
Flood fill alg.(to fill an area with multiple colors)
Start from a point and reassign all pixel values that are set with a given color with the
desired fill color (2)
14.a
- Object descriptions are stored as sets of surface polygons
- The surfaces are described with linear equations
Polygon table
• data is placed into the polygon table for processing
• Polygon data table can be organised into two groups
geometric table
attribute table (2)
Storing geometric data
To store geometric data three lists are created
Vertex table – contains coordinate values for each vertex
Edge table – contains pointers back into the vertex table
Polygon table – contains pointers back into the edge table
Advantages of three table
efficient display of objects
For faster info. Extraction
expand edge table to include forward pointers to the polygon table (2)
To check data consistency & completeness
Check that
every vertex is an endpoint for atleast two edges
Every edge is part of atleast one polygon
Every polygon is closed
Every polygon has atleast one shared edge
Every edge referenced by a polygon pointer has a reciprocal pointer back to the polygon
(4)
Plane Equation
Ax + By + Cz + D = 0
eqn. is solved by Cramer’s rule
Identification of points
• if Ax + By + Cz + D < 0 ,the points (x,y,z) is inside the surface
• if Ax + By + Cz + D > 0 ,the points (x,y,z) is outside the surface (2)
Octree encodings
Hierarchical tree structure
Node corresponds to a region in 3D space
Extension of quadtree encodings(2D) (2)
Octree
- divides 3D space into octants
- Stores 8 data elements in each node
- Individual elements of 3D space are called voxels
- If all voxels in an octant are of same type the value is stored in the corresponding data
element of the node
- Otherwise the octant is subdivided into octants & the corresponding data element in the
node points to the next node
- Each node can have 0 to 8 immediate descendants (4)
15.a
Line type - is set by the function
setLinetype(lt)
lt ranges from 1 to 4
1 – solid line
2 – dashed line
3 – dotted
4 – dash dotted
Line width - is set by the function (3)
setLinewidthScaleFactor(lw)
lw – 1 std.line width
>1 thicker line
0.5 half of std. width (3)
Pixel mask
string contains the digits 1 and 0
Indicates the positions to plot (3)
Line caps
adjust the shape of the line ends
gives the lines better appearance (1)
Types of line caps
Butt cap
Round cap
Projecting square cap (3)
Methods to join line segments
Miter join
Round join
Bevel join (3)
b.(i)
• Parallel projection
• Perspective projection
• Depth cueing
• Visible lines & Surface identification
• Exploded & Cutaway views
• 3 D & Stereoscopic views (4)
(ii)