2005 Solve
2005 Solve
640/240=2.6 inch
480/240=2 inch
Size=2.6’’*2’’
f) Find the CMY coordinates of a color at (0.2,1,0.5) in the RGB space.
C 1 R 1 0.2
0.8
M = 1 - G = 1 - 1.0 =
0.0
Y 1 B 1 0.5
0.5
Q2 (a)
Step 1: Input radius r and center coordinates (Xc, Yc) and obtain the first point on the
circumference of the circle centered on the origin (0, 0) as:
(Xo, Yo)= (0, r).
Step 2: Calculate the initial value of the decision parameter as:
Po=3-2r.
Step 3: At each Xk position, starting at k=0, perform the following test:
If Pk < 0, the next point along the circle centered on (0, 0) is (Xk + 1, Yk) and
Pk+1=Pk+4Xk+6
Otherwise, the next point along the circle centered on (0, 0) is (Xk+1, Yk-1) and
Pk+1=Pk+4(Xk-Yk) +10.
Step 4: Determine the symmetry points in the other seven octants using 8-way symmetry
property of circle.
Step 5: Move each calculated pixel position (X, Y) onto the circular path centered on
(Xc, Yc) and calculate the coordinates:
X=X+Xc and Y=Y+Yc.
Step 6: Repeat steps 3 through 5 until X>Y.
2.b) Find the matrix representation of point about origin. Write the matrix
representation of Translation (Geometric).
Ans) We represent the co-ordinate pair (x,y) of a point by the triple (x,y,1) in
homogeneous co-ordinates. Then translation in the direction v = txI + tyJ can be expressed by
the matrix function –
1 0 0
TV = 0 1 0
tx ty 1
3.(a) Prove that uniform scaling (SX=SY) and a rotation form a commutative
pair of operations but that , in general , scaling and rotation are not
commutative operations.
Solution : -
cosθ sinθ 0
R = -sinθ cosθ 0
0 0 1
The transformation matrix for scaling , with SX and SY scaling factor in the X and Y direction
respectively , is
SX 0 0
0 SY 0
S=
0 0 1
Now ,
cosθ sinθ 0 SX 0 0
R . S =-sinθ cosθ 0 0 SY 0
0 0 1 0 0 1
SX . cosθ SY . sinθ 0
= -SX . sinθ SY . cosθ 0
0 0 1
SX 0 0 cosθ sinθ 0
and S . R = 0 SY 0 -sinθ cosθ 0
0 0 1 0 0 1
SX . cosθ SX. sinθ 0
= -SY . sinθ SY . cosθ 0
0 0 1
SX . cosθ SX . sinθ 0
and S . R = -SX . sinθ SX . cosθ 0
0 0 1
As R.S =S.R , it is proved that uniform scaling (SX=SY) and a rotation form a commutative
pair of operations
3.b) Show that transformation matrix for a reflection about the line y=-x is
equivalent to a reflection relative to the y-axis followed by a counter,
clockwise rotation of 900.
Ans) The transformation matrix for reflection about the line y = -x is:-
0 -1 0
R’e = -1 0 0 (1)
0 0 -1
The transformation matrix R for rotating a point p(x,y) through an angle 900, in the
counter clockwise direction, about the origin in homogeneous co-ordinate system is as
follows:-
0 1 0
R= -1 0 0 (2)
0 0 1
-1 0 0
Re = 0 1 0 (3)
0 0 1
Now the transformation matrix of a point p(x,y) after reflection relative to the
y-axis followed by a counter clockwise rotation of 900 to the point p can be obtain by
multiplying (3) and (2)
-1 0 0 0 1 0
0 1 0 -1 0 0
0 0 1 0 0 1
0 -1 0
= -1 0 0
0 0 1
1. In computer graphics technology, what we 1. Our action to draw maps the imaginary
have envisioned is called the object object into a triangle on paper, which
definition, which defines the triangle in an constitutes a continuous display surface
abstract space of our choosing. This space is in another space called the image space.
continuous and is called object space.
2. In which surface visibility is determined 2. In which the pixel grid is used to guide
the
using continuous models in the object computational activities that determine
space without involving pixel based visibility at the pixel level.
operation.
Q:- 5.b) Explain any one of the hidden line removal algorithm.
SCAN-LINE ALGORITHM:-
Step2:- For all the polygon surface finds all the pixels on the current scan-line that lies within
the polygon (this can be done using YX scan conversion algorithm).
For each such pixel values
a) Find the depth(the current value in the depth buffer) of the polygon at this point.
b) If Z-value < depth the Z-value is stored in depth buffer and the intensity buffer is set
to the shading color of the polygon under consideration.
Step3:- After all the polygon surfaces forming the object have been considered the value that
is contained in the intensity buffer represents the solution and value is co[pied into the frame
buffer.
A scan-line algorithm consists essentially of two nested loops, an X-scan loop nested within
a Y-scan loop. Y-scan loop considers active edges whose Y-min is equal to Y where active
edges are stored in order of increasing X. X-scan loop processes, from left to right, for each
active edge according to the steps 2&3 of the algorithm.
1) The edge list contains all non-horizontal edges. The edges are sorted by the edge’s
smaller Y coordinate(Y-min). each edge entry in the edge list also contains:
i) The X-coordinate of the end of the edge with the smaller Y-coordinate.
ii) The Y-coordinate of the edge’s other end(Y-max).
iii) The increment ΔX=1/m, which is used in the next scan-line Y+1, for
each remaining active edge, in order to replace X by(X+ ΔX).
iv) A pointer indicating the polygon to which the edge belongs.
i) The equation of the plane within which the polygon lies-used for depth
determination, i.e., to find the Z-value at pixel(X,Y).
ii) An IN/OUT flag, initialized to OUT(this flag is set depending on
whether a given scan-line is in or out of the polygon.
iii) Color information for the polygon.
Q:-1.d) what do you mean by resolution of an image?
Resolution: - The maximum number of points that can be displayed without overlap
on a
CRT is referred to as resolution. A more precise definition of resolution
is the number of points per centimeters that can be plotted horizontally and
vertically, although it is often simply stated as the total number of points
in
each direction.
Image’s Aspect Ratio: - One of the important property of video monitors is aspect
ratio. This number gives the ratio of vertical points to
horizontal points necessary to produce equal length lines
in
both directions on the screen.(sometimes aspect ratio is
stated in terms of the ratio of horizontal to vertical
points.)
An aspect ratio of ¾ means that a vertical line plotted
with
three points has the same length as a horizontal line
plotted
with four points.
Q: -1.a) Explain briefly the RGB and CMY color model?
RGB COLOR MODEL: - Based on the tristimulus theory of version, our eyes perceive
color through the stimulation of three visual pigments
in the cones of the retina. These visual pigments have a
peak sensitivity at wavelengths of about 630 nm(red),
530 nm (green), and 450 nm (blue). By comparing
intensities in a light sources, we perceive the color of
the light. This theory of vision is the basis for
displaying color output on a video monitor using the
three color primaries, red, green, and blue, referred to as
the RGB color model.
CMY COLOR MODEL: - A color model defined with primary colors cyan, magenta, and
yellow (CMY) is useful for describing color output to
hard copy device. Unlike video monitors, which
produce a color pattern by combining light from the
screen phosphors, hard copy device such as plotters
produce a color picture by coating a paper with color
pigments. We see the colors by reflected light, a
subtractive process.
C 1 R
M = 1 - G
Y 1 B
R 1 C
G = 1 - M
B 1 Y
where black is represented in the CMY system as the
unit column vector.
6a)find the eqution of benzier curve which passes through
points(0,0) and (-2,1) and controlled through points(7,5) and
(2,0).
P(t)=[ t3 t2 t 1] │-1 3 -3 1│ │0 0│
│3 -6 3 0│ │7 5│
│-3 3 0 0│ │2 0│
│1 0 0 0│ │-2 1 │
= [ t3 t2 t 1] │13 16│
│-36 -30│
│ 21 15│
│0 0│
=13t3-36t2+21t/xcomponent, 16t330t2+15t/ycomponent
7)
a) Describe the basic MPEG specification for video.
b) What is the difference between HTML and DHTML?
MPEG frames
I
B
B
P
B
B
I
11 2 3 4 5 6 7
I B B P B B I
MPEG frame construction
1) HTML contains static content. Once a web server processes a web page
and sends it to the computer requesting it (called the ‘Client’) it cannot
get any more data from the server unless a new request is made. For this
drawback we use Dynamic HTML (DHTML) which is combining
HTML and a scripting language that sends on the client’s browser to
bring special effects. The scripting language that we will be using is Java
script as most browsers support it. The scripting language can be used to
alter HTML data shown (or present but hidden) on the current page by
manipulating the HTML tag. Basically some script function is called to
execute the request effect when events like “Mouse over”, “Mouse Out”,
“click”, etc occur.
2) DHTML is not a scripting language like HTML. It is a combination of
existing technologies like HTML, CSS and JavaScript.
3) DHTML allow us to make changes to our webpage on the fly (i.e. change
the background color, or font size and font color).