CMPS 285 Final, Fall 1995
American University of Beirut · Computer Graphics · 10 pages
More CMPS 285 files
Show the text of this final exam
LIBRARY
American University of Beirut ; oe bene
Faculty of Arts & Science
Dept. of Mathematics
urse: Computer Graphics - 285 “a” Byam: Final
- Term: Fall 1995-96
Time : 2 Hours
Please read clearly all parts before you answer. Keep your answers, clear, clean and well organized.
Good work
General (11pts)
Altmad Nasri
1. Answer by True (Tick) or False (X) each of the following questions:
a)
b)
¢)
d)
e)
f)
8)
h)
i)
)
h)
The video-controller is capable~of modifyirig the contents of the
frame buffer during the fly back time only.
The output of the x and y registers are used to determine the vertical
and the horizontal deflection voltages.
In Moving pen techniques for producing thick primitives, the
thickness problem can be eliminated by the use of a circular footprint.
In weighted area sampling, the intensity of the pixel is obtained by
multiplying the maximum intensity ‘Imax by the area of overlap.
Panning is the process of mapping a variable size window to a
variable size viewport.
In the replicating pixels method for producing thicker primitives,
horizontal lines are thicker than vertical lines.
With a 16 colors that can be displayed ‘simultaneously from a palette
of 64 colors, there are 4 bits per an entry in the color table.
If the number of available colors is 512, there are 8 gray levels among
them.
Using homogeneous coordinates in 2D; the triple [0, -0, 0] may
represent the origin.
Scan Conversion is the process of digitizing a picture into a set of
pixel values for storage in the frame buffer.
In Hardware interaction, the concept of handles is very useful in the
Construction Technique.
Line Drawing and Text (23 pts)
2. Write a function that takes as a parameter a polygon stored in a PHIGS
array P of type wcPoints of 4 points and returns true if that polygon is
a rectangle, false otherwise. It is enough to: provide an algorithm.
wee
3. Give the graphics commands to output. the following polygons
assuming that (*) is given the code 6 and the data points are stored in
WCPoints. The axes are not to be output,
¥
4, The following pixels were generated by the Midpoint Circle Algorithm.
—_
' al
:
Draw the corresponding pixels on the other parts of the circle. 3
5. What is the character up vector to output each word of the text ¥
"PASSING IS EASY" as depicted in the ‘figure below Determine the
corresponding text attributes in each case, (no need to. output the text
itself):
.2/6
PASSING
Fill Area (10 pts) Le
6. Indicate (on the figure) the missing pixels after ‘filling the area specified
by the following polyline. Give also the spans on the scan line
indicated. Give your answer in terms of an ordered set of intervals, e.g.
(11,12[ means all pixels starting from 11 until 12 (12 not included) are
filled.
Scan line
tL a ee, EL RE Be
Fm Ba
2
FSR Le ote
1 oi SE RRB Em! :
7. Show how to split the concave 2D polygon below into convex
polygons using the vector method:
Window and Viewport (8 pts)
8. A rotated window in world coordinates is defined by the view up
vector (-1,1) with one of its corners at the“origin. Write a piece of
PHIGS code to map the contents of this window to the upper left corner
of the screen.
Clipping (6 pts)
9. Using the Cohen Sutherland algorithm for line clipping show how to
clip the following polygon (solid lines)against each of the Left edge of the
window: Oe ;
Left Edge
After clipping against the left edge of the window, show the result of
clipping against the bottom edge.
Sows Ree OnE sab nt ae a pee agit etemer: =) yi ede leone alee Be
Object Representation (7 pts)
10. Give the 3-D representation of the following object. You do not need
to show the coordinates of the vertices.
Transformation and Segment (27pts)
11. In terms of the transformations :
T(a,b) -- Translate by (a,b),
R(q) -- Rotate counter clockwise q degrees about the origin,
S(a,b) - Scale x by a and scale y by.b with respect to the origin.
Shx(a) -- Shearing in the x direction by a.
Shx(b) - Shearing in the y direction by b. . .
ee eee
Give a sequence of transformations that will:
a. take the solid triangle T to the triangle'S as indicated below.
Seb oR oS REE gc og x
b. Consider the reflection about the line (D) which makes an angle
3H
of 7 with the X-axis and whose intercept on each axis is 1.
Determine the equations that relate a point Py) to a point P'
(xy') under this transformation.’
‘
c. The data of a fan of a windmill is storéd in the PHIGS variable Fan
of type wcPoints.
oC
(i) Write in PHIGS a segment structure fan to > display the fan
filled with color of index gray.
SE ce ae ee
Lb 8 Redd
. 6/6
' 4
(ii) Use the structure fan of (i) to write another structure
RotateFan that rotates the fan by an angle Theta degree.
(iii) Write the code to animate the rotation of the fan. What
factors can determine its speed of rotation,
4
Bs
e
x
User Interface (8 pts)
12. Consider the following snapshots of a dialogue for the AudioShop
software. Answer the following questions for-the snapshot indicated:
Snapshot 1.
SRS te aves Sees hate net od,
| Disk Management a
When |Audio CDs __~/ are inserted, automatically
Create new player (J Randomise
EX] Add Tracks : Start playing
p Miscetiansous
when REW
© Partial [2.0¥] when FF
Load track prior to playing
© Whole
Down and Up cycles tracks at playlist ends
I Simulate UU meter for CD Tracks
|
What type of interaction task is used to enter the option Load
Multiply the play rate by
What is the difference between a choice box ‘and a radio button?
Give example of each of them from this dialogue:
choice box : radio button:
Does this dialogue contain an UNDO operation? If. yes what is it?
Does this dialogue contain a variable sized. choice. or a Fixed sized
choice? If yes indicate which menu this set belongs to?
e. Why the OK button is in Bold?
In the following user dialogue, answer each of the following questions:
:
:
:
‘Soap daadatbe naaNABae 2 oc.s ee dn agar a ARE is: =
a: Ghai Sian ee +
ee
Snapshot 2
| Compression Settings ”
;-Compressor
Which task is used to select the quality in compression dialogue
and what feedback is involved?
What task is used to input the number of frames per second in the
compression dialogue?
What style is used to represent the items in the menu
compressor?