Sie sind auf Seite 1von 8

DANIEL KWAME AZUMAH

300621823679
SCHOOL OF TECHNOLOGY
BRUE CREST COLLEGE, ACCRA GHANA
COMPUTER GRAPHICS FINAL ASSESSMENT

Question 1
Computer graphics process offers the information and technology to better picture quality and
vision of systems in quality dimensions.
Computer graphics gives tools for making picture of real-world and synthetic objects like
mathematical surfaces in 4D and data with no inherent geometry like survey result. It can be able
to show moving pictures also called animation. It gives controls to adjust the speed, portion of
picture in assess the amount of element displayed. It gives tools like motion dynamics for
moving objects and observes as per requirement. It gives facilities like update dynamics for
changing the shape color and other properties of object. Audio and graphical feedbacks can be
generated.

Question 2
Raster Scan system the electron beam is swept across the screen, one row at a time, from top to
bottom. Whiles Random Scan system the electron beam is directed only to the parts of screen
where a picture is to be drawn.
Raster scan the resolution is poor because raster system in contrast produces zigzag lines that are
plotted as discrete point sets. Whiles Random Scan the resolution is good because this system
produces smooth lines drawings because CRT beam directly follows the line path.
Raster Scan picture definition is stored as a set of intensity values for all screen points, called
pixels in a refresh buffer area. Whiles Random Scan picture definition is stored as a set of line
drawing instruction in a display file.
Raster scan the pixels are used to draw an image. Whiles Random scan the mathematical
functions are used to draw an image.

Question 3
{(x1,y1),( x2, y2)}
Δx = x2 – x1,
Δy = y2 – y1.
If Δx is greater than Δy, then Step = Δx
Else if Δy is greater than Δx, then Step = Δy
Δx
xinc =
Steps
Δy
yinc =
Steps

a.
MERITS OF DDA ALGORITHM
The algorithm is simple and does not need a special skills for implementation.
For calculating pixel positions it is the fastest method.
DEMERITS
The algorithm is orientation dependent. Hence gives a poor end point accuracy.
The floating point arithmetic is time consuming.

b. . A (2,3) and B (9,11)


x1 = 2, y1 =3, x2 = 9, y2 = 11.
Δx = x2 – x1 = 9 – 2 = 7
Δy = y2 – y1 = 11 – 3 = 8
Δy 8
M= = Steps = 8
Δx 7
Δx 7
xinc = = = 0.9
Steps 8
Δy 8
yinc = = =1
Steps 8
x Y
2 2 3
3 2.9 4
4 3.8 5
5 4.7 6
6 5.6 7
7 6.5 8
7 7.4 9
8 8.3 10
9 9.2 11

c.

Y-Values
12

10

0
1 2 3 4 5 6 7 8 9 10
Question 4
{ X = x1;
Y = y1;
dx = x2 – x1; dy = y2 – y1;
P = 2dx – dy
While (x < = x2)
{ put pixel (x, y);
X++;
If (P < 0)
{P = P + 2dy
{ else P = P + 2dy – 2 dx;
Y++;
} }
}

a. A (3, 4) and B (12, 9)


dx = x2 – x1 = 12 – 3 = 9
dy = y2 – y1 = 9 – 4 = 5
P = 2dy – dx = 2(5) – 9 = 1
P = p + 2dy – 2dx = 1 + 10 – 18 = -7
P = p + 2dy = -7 + 2(5) = 3
P = p + 2dy - 2dx = 3 + 2(5) – 2(9) = -5
P = p + 2dy = -5 + 2(5) = 5
P = p + 2dy – 2dx = 5 + 10 -18 = -3
P = p + 2dy = -3 + 2(5) = 7
P = p + 2dy – 2dx = 7 + 10 – 18 = -1
P = p + 2dy = -1 + 2(5) = 9
P = p + 2dy – 2dx = 9 + 10 – 18 = 1
X Y P
3 4 1
4 4 -7
5 5 3
6 5 -5
7 6 5
8 6 -3
9 7 7
10 7 -1
11 8 9
12 8 1

Y-Values
9
8
7
6
5
4
3
2
1
0
2 3 4 5 6 7 8 9 10 11 12 13
Question 5
Algorithm
Step 1 : Input of Circle Radius = r, (XC,YC)
Step 2: Initial Value X = 0, Y = r
Step 3: Plot Pixel (X + XC , Y + YC )
Step 4: Decision Parameter. PK = 1 – r
Step 5: Start of Loop
Case 1
If PK < 0 then Pk + 1 = PK + 2X + 1
XN = X1 + 1
YN = Y
Plot pixel = (x + xc)(Y + YC)
Case 2
But if PK > 0 then PK + 1 = PK + 2X + 1 – 2Y
XN = X1 + 1
YN = Y1 – 1
Plot pixel = (x + xc)(Y + YC)
(X=Y) Stop. End of loop.

a.
With Radius of 11
Y = 11, Y =r ie radius Y=r=11
(XC,YC) = (0,11)
Decision parameter is PK = 1 – R, 1 – 11 = - 10
PK+1 = PK + 2(XK + 1) + {(Y2K + 1 – YK2} – (YK +1 - YK) + 1
IT (XK ,YK) PK (XK+1 , YK+1)
0 (0,11) -10 (1,11) -10 +2(0+1)+(121-121)-(11-
11)+1=-7
1 (1,11) -7 (2,11 -7 +2(1+1)+(121-121)-(11-11)+1=
-2
2 (2,11) -2 (3,11) -2 + 2(2+1)+(121-121)-(11-11)+1=
5
3 (3,11) 5 (4,10) 5 + 2(3+1)+(100-121)-(10-11)+1=
-6
4 (4,10) -6 (5,10) -6 + 2(4+1)+(100-100)-(10-10)+1 =
5
5Q1(X,Y(5,10)Q2 (-X,Y)
5 (6,9)
Q3 (-X,-Y) 5Q4
+ 2(5+1)+(81-100)-(9-10)+1
(X,- =0
6) (6,9) 0 (7,8) 0Y)
+ 2(6+1)+(64-81)-(8-9)+1 = -1
7(0,11)(7,8) (0,11)-1 (8,8)
(0,11) (0,-11)
(1,11) (-1,11) (-1,-11) (1,-11)
(2,11) (-2,11) (-2,-11) (2,-11)
(3,11) (-3,11) (-3,-11) (3,-11)
(4,10) (-4,10) (-4,-10) (4,-10)
(5,10) (-5,10) (-5,-10) (5,-10)
(6,9) (-6,9) (-6,-9) (6,-9)
(7,8) (-7,8) (-7,-8) (7,-8)
(8,7) (-8,7) (-8,-7) (8,-7)
(9,6) (-9,6) (-9,-6) (9,-6)
(10,5) (-10,5) (-10,-5) (10,-5)
(10,4) (-10,4) (-10,-4) (10,-4)
(11,3) (-11,3) (-11,-3) (11,-3)
(11,2) (-11,2) (-11,-2) (11,-2)
(11,1) (-11,1) (-11,-1) (11,-1)
(11,0) (-11,0) (-11,0) (11,0)
Y-Values
12
11
10
9
8
7
6
5
4
3
2
1
0
-12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12

Question 7
Homogeneous matrix coordinate are used in transformations is to allow convert all
transformation into matrix multiplication.

Das könnte Ihnen auch gefallen