Nov/Dec 2008 CS1354 Answer Key B.E / B.Tech Degree Examination Nov/Dec 2008 R 3261 CS1354 Computer Graphics and Multimedia Part A
Nov/Dec 2008 CS1354 Answer Key B.E / B.Tech Degree Examination Nov/Dec 2008 R 3261 CS1354 Computer Graphics and Multimedia Part A
1
B.E / B.Tech Degree Examination Nov/Dec 2008
R 3261
CS1354 Computer Graphics and Multimedia
Class : III CSE Staff Name : Ms.V.Pushparani
Part A
1. Write an algorithm for the Midpoint circle drawing algorithm in which decision
parameter P is updated using xi
+1 and
y
i+1
instead of x
i
and y
i
p
k+1
=f
circle
(x
k+1
-1,y
k+1
-1/2) =[( x
k
+1)+1]
2
+( y
k+1
-1/2)
2
-r
2
p
k+1
=p
k
+2(x
k
+1)+(y
2
k+1
-y
2
k
)-(y
k+1
-y
k
)+1
2. A Polygon has 4 vertices loaced at A(20,10),B(60,10),C(60,30), d(20,30) Indicate a
Transformation matrix to double the size of the polygon with point A located at
the same place.
3. Distinguish between Parallel and perspective projections
Objection descriptions are projected to the view plane
a. Parallel projection
b. Perspective projection
4. List any four Animation techniques
- Squash and stretch
- Timing
(
=
(
y s
x s
y
x
s
s
y
x
y
x
0
0
(
=
(
cos sin
sin cos
cos sin
sin cos
y x
y x
y
x
(
+
+
=
(
+
(
y
x
y
x
t y
t x
y
x
t
t
id14496890 pdfMachine by Broadgun Software - a great PDF writer! - a great PDF creator! - http://www.pdfmachine.com http://www.broadgun.com
Nov/Dec 2008 CS1354 answer key
2
- Anticipation
- Follow-through actions
- Staging
5. Write the Elements of multimedia systems
- Facsimile
- Document images
- Photographic images
- Geographic information systems maps
- Audio messages
- Video messages
- Full motion stored and live video
- Holographic images
- Fractals
6. What is Run length encoding?
Run length encoding is a compression technique used to store the intensity values in
the frame buffer, which stores each scan line as a set of integer pairs. One number
each pair indicates an intensity value, and second number specifies the number of
adjacent pixels on the scan line that are to have that intensity value
7. What is the Purpose of list chunks in RIFF file format?
- RIFF chunk defines the contents of the RIFF file
- List chunk allows embedding additional information
- Subchunk allows adding more information to a primary chunk
8. Write down the various Seek latencies associated with storage devices
- Overlapped seek
- Mid transfer seek
- Elevator seek
9. What are the Issues in image object display?
- Scaling
- Zooming
- Rubber banding
- Panning
10. What are the Components of a distributed multimedia system?
Application s/w, Container object store, Image and still video store, Audio and video
component store, Object directory service agent, Component service agent, User
interface service agent, Networks.
Nov/Dec 2008 CS1354 answer key
3
Part B
11. a. i. Derive and write the Midpoint ellipse drawing algorithm ` (12)
Refer May 2007 11.a
12. a. ii. When Four way symmetry is used to obtain a full ellipse from pixel
coordinates generated for first quadratic does overstrike occur? Where?(4)
We only need to calculate the values on the border of the circle in the first octant. The
other values may be determined by symmetry. Assume a circle of radius r with center at
(0,0).
(a,b)
(b,a)
(a,-b)
(b,-a)
(-a,-b)
(-a,b)
(-b,-a)
(-b,a)
Consider only the first octant of a circle of radius r centered on the origin. We begin
by plotting point (r,0) and end when x < y.
The decision at each step is whether to choose the pixel directly above the current
pixel or the pixel which is above and to the left (8-way stepping).
x=y
x + y - r = 0
2 2 2
Assume P
i
= (x
i
, y
i
) is the current pixel.
T
i
= (x
i
, y
i
+1) is the pixel directly above
S
i
= (x
i
-1, y
i
+1) is the pixel above and to the left.
f(x,y) = x
2
+ y
2
- r
2
= 0
f(x
i
- 1/2 + e, y
i
+ 1)
= (x
i
- 1/2 + e)
2
+ (y
i
+ 1)
2
- r
2
= (x
i
- 1/2)
2
+ (y
i
+1)
2
- r
2
+ 2(x
i
-1/2)e + e
2
= f(x
i
- 1/2, y
i
+ 1) + 2(x
i
- 1/2)e + e
2
= 0
Let d
i
= f(x
i
- 1/2, y
i
+1) = -2(x
i
- 1/2)e - e
2
If e < 0 then d
i
> 0 so choose point S = (x
i
- 1, y
i
+ 1).
d
i+1
= f(x
i
- 1 - 1/2, y
i
+ 1 + 1) = ((x
i
- 1/2) - 1)
2
+ ((y
i
+ 1) + 1)
2
- r
2
= d
i
- 2(x
i
-1) + 2(y
i
+ 1) + 1 = d
i
+ 2(y
i+1
- x
i+1
) + 1
If e 0 then d
i
0 so choose point T = (x
i
, y
i
+ 1).
d
i+1
= f(x
i
- 1/2, y
i
+ 1 + 1) = d
i
+ 2y
i+1
+ 1
Nov/Dec 2008 CS1354 answer key
4
The initial value of d
i
is
d
0
= f(r - 1/2, 0 + 1) = (r - 1/2)
2
+ 1
2
- r
2
= 5/4 - r {1-r can be used if r is an integer}
When point S = (x
i
- 1, y
i
+ 1) is chosen then
d
i+1
= d
i
+ -2x
i+1
+ 2y
i+1
+ 1
When point T = ( x
i
, y
i
+ 1) is chosen then
d
i+1
= d
i
+ 2y
i+1
+ 1
11.b.i. Explain Cohen sutherland line clipping algorithm in detail (12)
Basic idea: every point (x,y) is coded using four bits to denote the position of the point
w.r.t the window: [above,below,right,left]. For example: 1001 above and to the left
1001 1000 1010
0001 0000 0010
0101 0100 0110
Strategy:
1. Accept the line if both endpoints P1, P2 are inside:
CODE(P1) == 0 && CODE(P2) == 0
2. If both endpoints are to the left or above or then reject the line:
CODE(P1) & CODE(P2) 0
3. Compare an outside endpoint to a clipping boundary in order to see how much of the
line can be discarded. Sometimes the whole line is discarded. Proceed in boundary
order left, right, bottom, top
4. Given xclip and m = (y2-y1)/(x2-x1) calculate y = y1 + m(xclip-x1)
5. Given yclip calculate x = x1 + (yclip-y1)/m
Nov/Dec 2008 CS1354 answer key
5
11.b.ii. At R be Rectangular window whose lower left head corner is at L(-3,1) and
upper right head corner is at R(2,6). Find the region codes for the endpoints A(-
4,2),B(-1,7),C(-1,5),D(3,8),G(1,-2),H(3,3),I(-4,7) and J(-2,10). (4)
Nov/Dec 2008 CS1354 answer key
6
12.a.i. Define Tilting as a rotation about x axis followed by a rotaion about y axis.
Find the tilting matrix? Does the order of performing tilting matters (8)
- The axis of rotation is from the origin and through the point r
- The rotation is counterclockwise about the axis
-
- Rotate the axis of rotation so it lies on some major axis.
- Apply specified rotation about major axis.
- Apply inverse rotation to return axis or rotation to original orientation.
- First, compute a unit vector pointing in the same direction as the axis of rotation.
- Now we can compute the rotation directly from the unit vector.
- First, rotate u into the xz-plane rotation around the x-axis.
- We can temporarily ignore the x component of u to do this:
- Second, rotate u onto the z-axis rotation around the y-axis.
12.a.ii. Compare Bezier curve and B splines (8)
Properties of Bezier Curve
Approximative splines
Defined for n+1 control points
z y x
z y x
r r r
r r r
u
, ,
, ,
=
2 2
, , 0
, ,
c b d u
c b u
c b a u
+ = = '
= '
=
d
b
d
c
u u
u u
z
z
=
=
'
'
=
sin
cos
(
(
(
(
(
1 0 0 0
0 0
0 0
0 0 0 1
d
c
d
b
d
b
d
c
1
, 0 ,
= ' '
= ' '
u
d a u
(
(
(
(
1 0 0 0
0 0
0 0 1 0
0 0
d a
a d
a
d
u u
u u
z
z
=
=
' '
' '
=
sin
cos
Nov/Dec 2008 CS1354 answer key
7
Pass though the first and last control point, the boundary conditions at the two ends of
the curve are P(0)=p
0
, P(1)=p
n
A change in one control point affects the full curve
Bezier curve can be fitted to any number of control points
It was within the convex hull of the control points. The sum of Bezier blending function
is always one.
Any position is simply the weighted sum of the control point position.
Properties for B-splines:
B-splines are degree d-1 polynomials and Cd-2 (higher order discontinuities at uk)
For n+1 control points we have n+1 blending functions
Each blending function Bk,d(u) is defined over d subintervals in the knot vector,
starting at uk
The knot vector has n+d+1 values, with n+d subintervals
With the labelling {u0, u1, ... , un+d} for the knot vector, the resulting B-spline is
defined only for u [ud-1,un+1].
Each section of the B-spline curve between [uj,uj+1] is influenced by d control points.
Any control point affects the shape of (atmost) d curve sections
for u [ud-1,un+1] we have: Sk=0,n Bk,d(u) = 1
12.b.i. Derive the Outline projection of coordinate position(x,y,z) to position (x0,y0)
on the view plane (8)
Center of Projection on the negative z-axis with viewplane in the x-y plane.
x
projected
= xd/(d+z) = x/(1+(z/d))
y
projected
= yd/(d+z) = y/(1+(z/d))
12.b.ii. Compare HLS and HSV color models (8)
HSV Colour Model
more intuitive colour specification
colour ordering system
derived from the RGB colour model:
when the RGB colour cube is viewed along the diagonal from white to black, the
colour cube outline is a hexagon
(
(
(
(
+
+
=
(
(
(
(
+
=
(
(
(
(
(
(
(
(
1
0
)) / ( 1 /(
)) / ( 1 /(
) / ( 1
0
1 1 / 1 0 0
0 0 0 0
0 0 1 0
0 0 0 1
d z y
d z x
d z
y
x
z
y
x
d
Nov/Dec 2008 CS1354 answer key
8
color components:
hue (H) [0, 360]
saturation (S) [0, 1]
value (V) [0, 1]
HLS Color Model
color components:
hue (H) [0, 360]
lightness (L) [0, 1]
saturation (S) [0, 1]
13.a. Explain Multimedia system architecture in detail (16)
Refer May 2007 13.b.ii
13.b. Discuss on the need for Data compression in multimedia systems (16)
Refer May 2007 14.b
14.a. Esplain MPEG file format for motion picture compression (16)
Standard developed by the Moving Pictures Experts Group for digital representation
of moving pictures and associated audio
MPEG is a real-time video compression algorithm. (Moving Picture Experts Group)
MPEG-4 (1998-1999) includes numerous multimedia capabilities and is a preferred
standard.
MPEG-7 (2002) (or Multimedia Content Description Interface) integrates information
about motion video elements with their use.
MPEG 21 under development
MPEG (stands for Moving Picture Experts Group) is also a joint ISO and
CCITT working group for developing standards for compressing still images
The MPEG video compression standard became an international standard in 1993
MPEG uses technology defined in other standards, such as JPEG and H.261 It
defines a basic data rate of 1.2Mbits/sec
It is suitable for symmetric as well asymmetric compression It follows the reference
scheme that consists of four stages of processing:
1. Preparation
2. Processing
Nov/Dec 2008 CS1354 answer key
9
3. Quantisation
4. Entropy Encoding
In the preparation stage, unlike JPEG, MPEG defines the format of the images.
Each image consists of three components
YUV
The luminance component has twice as many samples in the horizontal and
vertical
axes as the other two components (known as colour sub-sampling
The resolution of the luminance component should not exceed 768 pixels for
each component, a pixel is coded with eight bits
14.b. Discuss on the Usage of optical storage media for storing multimedia
objects. (16)
o CDROM standards
CD-DA(DD-Digital audio) Red book
CD-ROM Mode 1 Yellow book
CD-ROM Mode 2 Yellow book
CD-I Green book
CD-ROM XA
CD-MO orange book Part I
CD-R Orange Book Part II
o Mini disk
o WORM optical drives
Recording of information
Reading information from disk
Worm drive applications
o Rewritable optical disk technologies
Magnetic optical
Phase change
15.a.i Discuss on Hypermedia message components in details (8)
Refer May 2008 15.b.i
15.a.ii Discuss about the various Authoring tools depending on the application
design (8)
Object oriented authoring tool
Offers pre-defined object that can be programmed to perform desired functions
For example: a button might represent one kind of object within a system.
Including an authoring tools that use metaphors >> timeline, cards and flow line
For example: Macromedia Director, Asymetrics ToolBooks, Macromedia Authorware
Advantage: save time
Disadvantage: limited command set for scripting specific functions
Time based
Elements and events are organized along a timeline with resolution >= 1/30 second
Best to use when you have a message with a beginning and an end
Sequentially organized graphic frames are played back at a speed that you can set
Other element (audio/video) are triggered at a given time or location in the sequence
of events
Let programmers to jump to any location in a sequence, adding navigation and
interactive control.
Nov/Dec 2008 CS1354 answer key
10
Example: Director, Flash
Programming Language
Development tools such as C, C++, BASIC and Pascal offer extensive and powerful
command sets.
Advantage:
offers extensive teaching capabilities quick execution >> minimal computer
platforms software costs >> low
Disadvantage:
require long learning times
15.b.i Object linking and embedding (5)
- OLE provides an object oriented framework for compound documents. When a
user double clicks or clicks on an icon for an embedded object, the application
that created the object starts, and allows the user to view and or the object.
- Embedding causes the object to be stored with the container document, while
linking allows it to be stored in a specialized object server.
15.b.ii Managing distributed objects (6)
- Inter server communication
- Object server architecture
- Object identification
- Object directory services
- Multimedia object retrieval
- Database replication techniques
- Object migration schemes
- Optimizing object storage
15.b.iii. Multimedia databases (5)
- Multimedia data typically means digital images, audio, video animations and graphics
together with text data.
- It provides facilities for the easy manipulation of query and retrieval of highly
relevant information from huge collections of stored data.
o Multimedia storage and retrieval
o Database management system for multimedia systems
o Database organisations for multimedia applications
o Transaction management for multimedia system.