You are on page 1of 3

Computer graphics

Assignment one

Name - Abdulaziz Temam Abajebel


Id no. – RU3029/09
Part one.
1. Computer graphics, Image Processing and Computer Art are defines as follows:
 Computer Graphics is the algorithms and hardware required to produce useful or
realistic images on a computer.
 Image Processing is a method to perform some operations on an image to get an
enhanced image and extract some useful information from it.
 Computer Art is any art in which a computer plays role in the production or display
of the artwork.
2. Applications of computer graphics
 Computer Aided Design (CAD): used for design of buildings, automobiles, aircrafts,
watercrafts, spacecraft, computers, textiles etc. It can be used by virtual reality
system designers for simulation purposes.
 Graphs and Charts: are mostly used for visualizing data. They are widely used for
visualizing relationships and trends in scientific, mathematical, financial and
economic data.
 Education and Training: computer graphics can be very beneficial in education. It
can be used for training applications using simulator. It can also be very helpful in
visualizing physical, financial, and economical system models.
 Entertainment: computer graphics is used in entertainment for making motion
pictures, music videos, and television shows. Graphical objects can be displayed by
themselves or can be combined with the actors and live scenes.
3. Difference between each line algorithms
- The DDA algorithm involves floating point values, but in Bresenham’s algorithm,
only integer values are included. This is the major reason that made the
computation in DDA difficult than the Bresenham’s algorithm.
- Bresenham’s algorithm is more efficient and accurate than DDA algorithm.
- Bresenham’s algorithm is optimized. DDA is not, and less expensive.
- DDA uses multiplication and division operations, but Bresenham’s algorithm
involves addition and subtraction causing less consumption of time. Therefore, DDA
is slower than Bresenham.
- The values in DDA never round off. As of Bresenham, it rounds off the value to the
closest integer value.

1
Part two.
4. Given end points (1,1) and (5,9)
Slope m = ∆y/∆x = y1 - y0 / x1 – x0 = (9 - 1) / (5 - 1) = 8 / 4 = 2
dy = y1 – y0 = 8 , dx = x1 – x0 = 2
So, y increments faster.
Since m > 1, we take ∆y = 1;
We compute successive x and y by taking Xk+1=Xk+1/m and Yk+1=Yk+1

Calculation X Y X plotted Y plotted


1 1 1 1
Y1 = y0 + 1 = 1+1 = 2
1.5 2 2 2
X1 = x0 + 1/m = 1+1/2 = 1.5
Y2 = y1 + 1 = 2+1 =3
2 3 2 3
X2 = x1 + 1/m = 1.5+1/2 = 2
Y3 = y2 + 1 = 3+1 = 4
2.5 4 3 4
X3 = x2 + 1/m = 2+1/2 = 2.5
Y4 = y3 + 1 = 4+1 = 5
3 5 3 5
X4 = x3 + 1/m = 2.5+1/2 = 3
Y5 = y4 + 1 = 5+1 = 6
3.5 6 4 6
X5 = x4 + 1/m = 3+1/2 = 3.5
Y6 = y5 + 1 = 6+1 = 7
4 7 4 7
X6 = x5 + 1/m = 3.5+1/2 = 4
Y7 = y6 + 1 = 7+1 = 8
4.5 8 5 8
X7 = x6 + 1/m = 4+1/2 = 4.5
Y8 = y7 + 1 = 8+1 = 9
5 9 5 9
X8 = x7 + 1/m = 4.5+1/2 = 5

5. The surface-face table and edge table for the given polygon is:

Edge Table Surface-face Table


E1: V1, V2 E4: V3, V4 S1: E1, E2, E3
E2: V2, V3 E5: V4, V5 S2: E3, E4, E5, E6
E3: V1, V3 E6: V1, V5

You might also like