You are on page 1of 22

1|Page

Chapter 2: Scan Conversion in Computer Graphics


“When we represent regular objects in the form of discrete pixels, it is called Scan
Conversion.” Every graphics system must transform the primitives into a collection of pixels.
The scan conversion is also called “Rasterization.” Each pixel in the graphical system has two
states either on or off.
“The Scan Converting rate is a technique that is used in video processing. In this technique,
we can change the horizontal and vertical frequency for many different purposes.” We use
a scan converter to perform scan conversions. We can define a line by its starting and ending
points. On the other hand, we can define a circle by its radius, circle equation, and center point.
Methods of Scan Conversion
We can perform scan conversion by using two methods.
i. Analog Method: It is the best method for analog videos. A large number of delay
cells perform the analog method. The Analog approach is also known as “non-
retentive, memory-less, or real-time method.”
ii. Digital Method: Digital method is also known as a “retentive or buffered
method.” In the digital method, there is a concept of n1and n2 speed. We can save
(Store) the picture in line or frame buffer with n 1 speed. The image can be read
with n2 speed.    
Pixel
“We can define a pixel as a rectangular dot centered at an integral position on an integral grid.” It
is a real point that is addressable. The pixel is also called “picture element (Pel).”
A pixel includes its own:
 Intensity – The intensity of a pixel defines the brightness of the image that appears on
the screen.
 Name or Address- The name or address of a pixel defines the position of the pixel.
We can define the size of any image with a total number of horizontal pixels and the total
number of vertical pixels.
For Example- (512 x 512, 640 x 480, or 1024 x 768).
We can measure the ratio of an image’s width to its height in unit length or number of pixels, is
known as the aspect ratio of the image.

CPU College Computer Graphics Chapter 2


2|Page

For example- A Pixel having a coordinate (8,10).

Advantages of Scan Conversion


 The scan conversion technique is used for various purposes, such as video
Projectors, TV, HDTV, Video capture card, LCD monitor, etc.
 The Scan Conversion technique has wide applications.
 We can efficiently perform scan conversion using high speed integrated circuits.
Disadvantages of Scan Conversion
 We can only apply scan conversion with LSI and VLSI integrated circuit.
 Int the digital scan conversion, the analog video signal has changed into digital
data.

CPU College Computer Graphics Chapter 2


3|Page

DDA (Digital Differential Analyzer) Line Drawing Algorithm


The Digital Differential Analyzer helps us to interpolate the variables on an interval from one
point to another point. We can use the digital Differential Analyzer algorithm to perform
rasterization on polygons, lines, and triangles.
Digital Differential Analyzer algorithm is also known as an incremental method of scan
conversion. In this algorithm, we can perform the calculation in a step-by-step manner. We use
the previous step result in the next step.
Algorithm of Digital Differential Analyzer (DDA) Line Drawing
Step 1: Start.
Step 2: We consider Starting point as (x1, y1), and ending point (x2, y2).
Step 3: Now, we have to calculate Δx and Δy.
              Δx = x2-x1
                     Δy = y2-y1
              m = Δy/Δx               
Step 4: Now, we calculate three cases.
          If m < 1
       Then x change in Unit Interval
                y moves with deviation
              (xk+1, yk+1) = (xk+1, yk+1)
         If m > 1
      Then x moves with deviation
                y change in Unit Interval
              (xk+1, yk+1) = (xk+1/m, yk+1/m)
         If m = 1
       Then x moves in Unit Interval y moves in Unit Interval
              (xk+1, yk+1) = (xk+1, yk+1)
Step 5: We will repeat step 4 until we find the ending point of the line.
Step 6: Stop.

CPU College Computer Graphics Chapter 2


4|Page

Example: A line has a starting point (1,7) and ending point (11,17). Apply the Digital Differential
Analyzer algorithm to plot a line.

Solution: We have two coordinates,

Starting Point = (x1, y1) = (1,7)


Ending Point = (x2, y2) = (11,17)
Step 1: First, we calculate Δx, Δy and m.

           Δx = x2 – x1 = 11-1 = 10


             Δy = y2 – y1 = 17-7 = 10
              m = Δy/Δx = 10/10 = 1
Step 2: Now, we calculate the number of steps.

              Δx = Δy = 10

Then, the number of steps = 10

Step 3: We get m = 1, Third case is satisfied.   Now move to next step.

 xk   yk          xk+1    yk+1     (xk+1, yk+1)


1 7 2 8 (2, 8)

    3 9 (3, 9)

    4 10 (4, 10)

    5 11 (5, 11)

    6 12 (6, 12)

    7 13 (7, 13)

    8 14 (8, 14)

    9 15 (9, 15)

    10 16 (10, 16)

CPU College Computer Graphics Chapter 2


5|Page

    11 17 (11, 17)
Step 4: We will repeat step 3 until we get the endpoints of the line.
Step 5: Stop.

Advantages of Digital Differential Analyzer

 It is a simple algorithm to implement.


 It is a faster algorithm than the direct line equation.
 We cannot use the multiplication method in Digital Differential Analyzer.
 Digital Differential Analyzer algorithm tells us about the overflow of the point when the
point changes its location.

Disadvantages of Digital Differential Analyzer

 The floating-point arithmetic implementation of the Digital Differential Analyzer is time-


consuming. 
 The method of round-off is also time-consuming.
 Sometimes the point position is not accurate.

Problem (DDA Algorithm)


1. Calculate the points between the starting point (5, 6) and ending point
(8, 12).
2. Calculate the points between the starting point (1, 7) and ending point
(11, 17).

CPU College Computer Graphics Chapter 2


6|Page

Bresenham’s Line Drawing Algorithm in Computer Graphics

This algorithm was introduced by “Jack Elton Bresenham” in 1962. This algorithm helps us to perform
scan conversion of a line. It is a powerful, useful, and accurate method. We use incremental integer
calculations to draw a line. The integer calculations include addition, subtraction, and multiplication.

In Bresenham’s Line Drawing algorithm, we have to calculate the slope (m) between the starting point
and the ending point.

As shown in the above figure let, we have initial coordinates of a line = (xk, yk) The next coordinates of a
line = (xk+1, yk+1)

The intersection point between yk and yk+1 = y Let we assume that the distance between y and yk = d1

The distance between y and yk+1 = d2 ,Now, we have to decide which point is nearest to the intersection
point.

Algorithm of Bresenham’s Line Drawing Algorithm


Step 1: Start.
Step 2: Now, we consider Starting point as (x1, y1) and ending point (x2, y2).
Step 3: Now, we have to calculate Δx and Δy.
              Δx = x2-x1
                    Δy = y2-y1
              m = Δy/Δx               
Step 4: Now, we will calculate the decision parameter pk with following formula.
                       pk = 2Δy-Δx
Step 5: The initial coordinates of the line are (xk, yk), and the next coordinatesare (xk+1,
yk+1). Now, we are going to calculate two cases for decision parameter pk

CPU College Computer Graphics Chapter 2


7|Page

 Case 1:  If
                         pk < 0
              Then
                          pk+1 =pk +2Δy
                          xk+1 = xk +1
                          yk+1 = yk                           
Case 2:  If
                         pk >= 0
              Then
                          pk+1 =pk +2Δy-2Δx
                          xk+1 =xk +1
                          yk+1 =yk +1                          
Step 6: We will repeat step 5 until we found the ending point of the line and the total
number of iterations =Δx-1.
Step 7: Stop.
Example: A line has a starting point (9,18) and ending point (14,22). Apply the
Bresenham’s Line Drawing algorithm to plot a line.
Solution: We have two coordinates,
Starting Point = (x1, y1) = (9,18)
Ending Point = (x2, y2) = (14,22)
Step 1: First, we calculate Δx, Δy.
           Δx = x2 – x1 = 14-9 = 5
             Δy = y2 – y1 = 22-18 = 4
Step 2: Now, we are going to calculate the decision parameter (pk)
   pk = 2Δy-Δx
                  = 2 x 4 – 5 = 3
             The value of pk = 3
Step 3: Now, we will check both the cases.
               If
                   pk >= 0
Then
         Case 2 is satisfied. Thus
                    pk+1 = pk +2Δy-2Δx =3+ (2 x 4) - (2 x 5) = 1
                     xk+1 =xk +1 = 9 + 1 = 10
           yk+1 =yk +1 = 18 +1 = 19
Step 4: Now move to next step. We will calculate the coordinates until we reach the end
point of the line. 
Δx -1 = 5 – 1 = 4

CPU College Computer Graphics Chapter 2


8|Page

          pk          pk+1          xk+1           yk+1

9 18

3 1 10 19

1 -1 11 20

-1 7 12 20

7 5 13 21

5 3 14 22

Step 5: Stop.

The Coordinates of drawn lines are-


P1 = (9, 18),P2 = (10, 19), P3 = (11, 20), P4 = (12, 20) P5 = (13, 21) ,P6 = (14, 22)

Advantages of Bresenham’s Line Drawing Algorithm


 It is simple to implement because it only contains integers.
 It is quick and incremental

CPU College Computer Graphics Chapter 2


9|Page

 It is fast to apply but not faster than the Digital Differential Analyzer (DDA) algorithm.
 The pointing accuracy is higher than the DDA algorithm.
Disadvantages of Bresenham’s Line Drawing Algorithm
 The Bresenham’s Line drawing algorithm only helps to draw the basic line.

 The resulted draw line is not smooth.


Problem (Brensenham Line drawing algorithm)
1. Calculate the points between the starting coordinates (9, 18) and ending coordinates
(14, 22).
2. Calculate the points between the starting coordinates (20, 10) and ending
coordinates (30, 18).

Mid-Point Line Drawing Algorithm in Computer Graphics


The Mid-point Subdivision algorithm is the extension of the Cyrus-Beck algorithm. The Mid-
Point line plotting algorithm was introduced by “Pitway and Van Aken.” It is an incremental line
drawing algorithm. In this algorithm, we perform incremental calculations. The calculations are
based on the previous step to find the value of the next point. We perform the same process for
each step. By using the mid-point subdivision algorithm, we can draw a line with close
approximation between two points. The mid-point subdivision line drawing algorithm subdivides
the line at its midpoints continuously.

The Mid-point Subdivision algorithm helps to compute or calculate the visible areas of lines that
appear in the window. This line plotting algorithm follows the bisection method to divide the line
into equal partitions.

CPU College Computer Graphics Chapter 2


10 | P a g e

Algorithm of Mid-Point Subdivision Line Drawing

 Step 1: Start.

 Step 2: Consider the starting point as (x1, y1) and ending point as (x2, y2).

 Step 3: Now, we will calculate Δd.


Δd = 2 (Δy -Δx)

 Step 4: Now, we will calculate the decision parameter di with the following formula.
di = 2Δy - Δx

 Step 5: The increment of x or y coordinate depends on the following two cases-

o Case 1: If di < 0 Then

xk+1 =xk +1 , yk+1 = yk dn = di + 2Δy

o Case 2: If di >= 0 Then

xk+1 =xk +1 yk+1 =yk +1 dn = di +?d

 Step 6: We will repeat step 5 until we found the ending point of the line.

 Step 7: Stop.

Example: A line has a starting point (6,10) and ending point (13,17). Apply the Mid-point
Line Drawing algorithm to draw a line. (Exercise). The final answers, Coordinates of drawn
lines are- P1 = (6, 10), P2 = (7, 11), P3 = (8, 12), P4 = (9, 13), P5 = (10, 14), P6 = (11, 15), P7 =
(12, 16), P8 = (13, 17).

Scan Conversion of a Circle Computer Graphics

CPU College Computer Graphics Chapter 2


11 | P a g e

A circle is an eight-way symmetric shape. All quadrants of a circle are the same. There are two octants in
each quadrant of a circle. If we know the value of any point, then we can easily calculate the values of the
remaining seven points by using the eight-way symmetry method. A circle is a shape consist of a line
called the circumference. All the straight lines drawn from a particular point within the circle to the
circumference are always equal. A circle is a round shape that has no corner or sides.

If we want to draw a circle, then we will consider it by its origin point. Let us assume a point
P1(R, S) then we can represent the other seven points as follows-P2(R, -S), P3(-R, -S), P4(-R, S),
P5(S, R), P6(S, -R), P7(-S, -R), P8(-S, R).

Example: Let, we have taken a point (4, 6) of a circle. We will calculate the remaining seven
points by using of reflection method as follows- The seven points are – (4, -6), (-4, -6), (-4, 6),
(4, 6), (4, -6), (-4, -6), (-4, 6)

Algorithms used in Circle Drawing


There are the following two algorithms used to draw a circle.
 Bresenham’s Circle drawing Algorithm
 Mid-point Circle Drawing Algorithm

Bresenham’s Circle Drawing Algorithms


Bresenham’s algorithm is also used for circle drawing. It is known as Bresenham’s circle
drawing algorithm. It helps us to draw a circle. The circle generation is more complicated than

CPU College Computer Graphics Chapter 2


12 | P a g e

drawing a line. In this algorithm, we will select the closest pixel position to complete the arc. We
cannot represent the continuous arc in the raster display system. The different part of this
algorithm is that we only use arithmetic integer. We can perform the calculation faster than other
algorithms. 
Let us assume we have a point p (x, y) on the boundary of the circle and with r radius satisfying
the equation fc (x, y) = 0

Algorithm of Bresenham’s Circle Drawing


Step 1: Start.
Step 2: First, we allot the starting coordinates (x1, y1) as follows-
             x1 = 0
             y1 =r
Step 3: Now, we calculate the initial decision parameter d0 -
                                                                 d0 = 3 – 2 x r

Step 4: Assume, the initial coordinates are (xk, yk).The next coordinates will be (xk+1,
yk+1) 
Now, we will find the next point of the first octant according to the value of the decision
parameter (dk).      
Step 5: Now, we follow two cases-
Case 1: If
                  dk < 0
         then
                  xk+1 =xk + 1
                  yk+1 =yk
                  dk+1 = dk + 4xk+1 + 6
Case 2: If
                  dk >= 0
         then

CPU College Computer Graphics Chapter 2


13 | P a g e

                  xk+1 =xk + 1
                  yk+1 =yk –1
                  dk+1 = dk + 4(xk+1 – yk+1)+ 10
Step 6: If the center coordinates (x1, y1) is not at the origin (0, 0), then we will draw the
points as follow-
X coordinate = xc + x1
y coordinate = yc + y1              {xc and yc represents the current value of x and y coordinate}
Step 7: We repeat step 5 and 6 until we get x>=y.
Step 8: Stop.

Example: The radius of a circle is 8, and center point coordinates are (0, 0). Apply Bresenham’s
circle drawing algorithm to plot all points of the circle.

Solution:  
Step 1: The given stating points of the circle (x1, y1) = (0, 0)
              Radius of the circle (r) = 8
Step 2: Now, we will assign the starting point (x1, y1) as follows-
             x1 = 0
             y1 = r (radius) = 8     
Step 3: Now, we will calculate the initial decision parameter (d0)
d =3–2xr
                  0 

          d0 = 3 – 2 x 8
          d0 = -13
Step 4:  The value of initial parameter d0 < 0. So, case 1 is satisfied.
Thus,
                   xk+1 =xk + 1 = 0 + 1 = 1
           yk+1 =yk = 8
           dk+1 = dk + 4xk+1 + 6 = -13 + (4 x 1) + 6 = -3
Step 5: The center coordinates are already (0, 0) so we will move to next step.
Step 6: Follow step 4 until we get x >= y.
Table for all points of octant 1:

                 dk                dk+1            (xk+1,yk+1)

CPU College Computer Graphics Chapter 2


14 | P a g e

                   (0, 8)

                 -13                   -3                (1, 8)

                  -3                   11                (2, 8)

                  11                    5                (3, 7)

                   5                    7                (4, 6)

                   7                  (5, 5)

Now, we will calculate the coordinates of the octant 2 by swapping the x and y coordinates.

        Coordinates of Octant 1         Coordinates of Octant 2

                  (0, 8)                       (5, 5)

                  (1, 8)                       (6, 4)

                  (2, 8)                       (7, 3)

                  (3, 7)                       (8, 2)

                  (4, 6)                       (8, 1)

                  (5, 5)                       (8, 0)

Thus, we will calculate all points of the circle with respect to octant 1.  

Quadrant 1 (x,
Quadrant 2 (-x, y) Quadrant 3 (-x, -y) Quadrant 4 (x, -y)
y)

               (0, 8)              (0, 8)             (0, -8)             (0, -8)

CPU College Computer Graphics Chapter 2


15 | P a g e

               (1, 8)             (-1, 8)             (-1, -8)             (1, -8)

               (2, 8)              (-2, 8)                (-2, -8)                (2, -8)

               (3, 7)              (-3, 7)                (-3, -7)                (3, -7)

               (4, 6)              (-4, 6)                (-4, -6)                (4, -6)

               (5, 5)              (-5, 5)                (-5, -5)                (5, -5)

               (6, 4)               (-6, 4)                (-6, -4)                (6, -4)

               (7, 3)               (-7, 3)                (-7, -3)                (7, -3)

               (8, 2)               (-8, 2)                (-8, -2)                (8, -2)

               (8, 1)               (-8, 1)                (-8, -1)                (8, -1)

               (8, 0)                (-8, 0)                (-8, 0)                (8, 0)

Advantages of Bresenham’s Circle Drawing Algorithm


 It is simple and easy to implement.
 The algorithm is based on simple equation x2 + y2 = r2.
Disadvantages of Bresenham’s Circle Drawing Algorithm
 The plotted points are less accurate than the midpoint circle drawing.
 It is not so good for complex images and high graphics image

Midpoint Circle Drawing Algorithm

Algorithm of Midpoint Circle Drawing


Step 1: Start.
Step 2: First, we allot the center coordinates (p0, q0) as follows-
             P0 = 0
             q0 =r
Step 3: Now, we calculate the initial decision parameter d0 -

CPU College Computer Graphics Chapter 2


16 | P a g e

d =1–r
                                                                  0 

Step 4: Assume, the starting coordinates = (pk, qk)


                  The next coordinates will be (pk+1, qk+1) 
Now, we find the next point of the first octant according to the value of the
decision parameter (dk).      
Step 5: Now, we follow two cases-
Case 1: If
                  dk < 0
         then
                  pk+1 =pk + 1
                  qk+1 =qk
                  dk+1 = dk + 2 pk+1 + 1
Case 2: If
                  dk >= 0
         then
                  pk+1 =pk + 1
                  qk+1 =qk –1
                  dk+1 = dk - 2 (qk+1 + 2 pk+1)+ 1
Step 6: If the center coordinate point (p0, q0) is not at the origin (0, 0) then we will
draw the points as follow-
For x coordinate = xc + p0
For y coordinate = yc + q0     {xc and yc contains he current value of x and y
coordinate}
Step 7: We repeat step 5 and 6 until we get x>=y.
Step 8: Stop.

Example: The center coordinates are (0, 0), and the radius of the circle is 10. Find all
points of the circle by using the midpoint circle drawing algorithm?
Solution:
Step 1: The given center coordinates of the circle (p0, q0) = (0, 0)
              Radius of the circle (r) = 10
Step 2: Now, we will determine the starting coordinates (p0, q0) as follows-
             P0 = 0
             q0 = r (radius) = 10
Step 3: Now, we will determine the initial decision parameter (d0)

CPU College Computer Graphics Chapter 2


17 | P a g e

d = 1 –r
                                 0 

                    d0 = 1 –10


                    d0 = -9
Step 4: The initial parameter d0 < 0 then, case 1 is satisfied.
           pk+1 =pk + 1 = 0 + 1 = 1
                  qk+1 =qk = 10
                  dk+1 = dk + 2 pk+1 + 1 = -9 + 2(1) + 1 = -6
Step 5: The center coordinates of circle are already (0, 0). So, move to next step.
Step 6: We will execute step 4 until we get x >= y.
The table for coordinates of octant 1-
                 dk                dk+1            (pk+1,qk+1)

                   (0, 10)

                 -9                   -6                (1, 10)

                 -6                   -1                (2, 10)

                 -1                    6                (3, 10)

                   6                    -3                (4, 9)

                   -3                    8                (5, 9)

                   8                    5                (6, 8)


Now, we will determine the coordinates of the octant 2 by swapping the p and q
coordinates.
      Points of Octant 1     Points of Octant 2

               (0, 10)                (8, 6)

               (1, 10)                (9, 5)

               (2, 10)                (9, 4)

               (3, 10)                (10, 3)

               (4, 9)                (10, 2)

CPU College Computer Graphics Chapter 2


18 | P a g e

               (5, 9)                (10, 1)

               (6, 8)                (10, 0)


Thus, we can find all the coordinates of the circle for all quadrants.
Quadrant 1 (p, q) Quadrant 2 (-p, q) Quadrant 3 (-p, -q) Quadrant 4 (p, -q)

               (0, 10)                (0, 10)                (0, -10)                (0, -10)

               (1, 10)                (-1, 10)                (-1, -10)                (1, -10)

               (2, 10)                (-2, 10)                (-2, -10)                (2, -10)

               (3, 10)                (-3, 10)                (-3, -10)                (3, -10)

               (4, 9)                (-4, 9)                (-4, -9)                (4, -9)

               (5, 9)                (-5, 9)                (-5, -9)                (5, -9)

               (6, 8)                (-6, 8)                (-6, -8)                (6, -8)

               (8, 6)                (-8, 6)                (-8, -6)                (8, -6)

               (9, 5)                (-9, 5)                (-9, -5)                (9, -5)

               (9, 4)                (-9, 4)                (-9, -4)                (9, -4)

               (10, 3)                (-10, 3)                (-10, -3)                (10, -3)

               (10, 2)                (-10, 2)                (-10, -2)                (10, -2)

               (10, 1)                (-10, 1)                (-10, -1)                (10, -1)

               (10, 0)                (-10, 0)                (-10, 0)                (10, 0)


Advantages of Midpoint circle drawing algorithm

 It is a powerful and efficient algorithm.


 The midpoint circle drawing algorithm is easy to implement.
 It is also an algorithm based on a simple circle equation (x2 + y2 = r2).
 This algorithm helps to create curves on a raster display.

 Disadvantages of Midpoint circle drawing algorithm

CPU College Computer Graphics Chapter 2


19 | P a g e

 It is a time-consuming algorithm.
 Sometimes the points of the circle are not accurate.

Scan Conversion of an Ellipse:


An ellipse can be defined as a closed plane curve, which is a collection of points. It is the
cause of the intersection of a plane over a cone. The ellipse is a symmetric shape figure.
It is similar to a circle, but it contains four-way symmetry. We can also define an ellipse
as a closed curve created by the points moving in such an order that the total of its
distance from two points is constant. These two points are also called “foci.” 

Midpoint Ellipse Drawing Algorithm

We can understand ellipse as an elongated circle. In the midpoint ellipse drawing algorithm, we
will determine the plotting point (p, q). Let us suppose that the center point of the ellipse is (0,
0).

Algorithm of Midpoint Ellipse Drawing    

Step 1: First, we read rp and rq.

Step 2: Now we initialize starting coordinates as follow-

              p = 0 and q =rq

Step 3: Wecalculate the initial value and decision parameter for region 1 as follow-

                dk1 = r2q - r2p r2q + ¼ r2p

Step 4: Now, we initialize dp and dq as follows-

CPU College Computer Graphics Chapter 2


20 | P a g e

     dp = 2r2qp

    dq = 2r2pq

Step: 5 Now, we apply Do-while loop

 Do

{plot (p, q)

If (dk1 < 0)

     (p= p+1 and q = q)

dp = dp + 2r2q

dk1 = dk1 – dp + r2q

[dk1 = dk1 + 2r2qp +2r2q + r2q]

Else

              (p= p+1 and q = q -1)

dp = dp + 2r2q

dq = dq - 2r2p

dk1 = dk1 + dp - dp + r2q

         [dk1 = dk1 + 2r2qp +2r2q – (2r2pq - 2r2p) + r2q]

} while (dp < dq)

Step 6: Now ,we calculate the initial value and decision parameter for region 2 as follow-

dk2 = r2q (p + 1/2)2 + r2p (q-1)2 – r2p r2q

Step 7: Now, we again apply Do-while loop

Do

CPU College Computer Graphics Chapter 2


21 | P a g e

{plot (p, q)

If (dk2 < 0)

     (p= p and q = q - 1)

dq = dp - 2r2p

dk2 = dk2 – dq + r2p

[dk2 = dk2 – (2r2pq - 2r2p) + r2p]

Else

              (p= p+1 and q = q -1)

   dq = dq - 2r2p

   dp = dp + 2r2q

dk2 = dk2 + dp – dq + r2p

         [dk2 = dk2 + 2r2qp +2r2q – (2r2pq - 2r2p) + r2q]

} while (q < 0)

Step 8: Thus, we calculate all the points of other quadrants.

Step 9: Stop.

Review exercise

1. Given the centre point coordinates (4, -4) and radius as 10, generate all the
points to form a circle. Using mid-point circle drawing algorithm.
2. Plot the ellipse centered at (0, 0) with radius rx = 8 and ry = 6, using mid-
point ellipse drawing algorithm.

CPU College Computer Graphics Chapter 2


22 | P a g e

3. Implement the DDA algorithm to draw a line from (0,0) to (6,6). M = (6-0)/
(6-0) =6/6 =1 XK+1=Xk+1 YK+1=Yk+m = Yk+1 Xk=0 Yk=0

CPU College Computer Graphics Chapter 2

You might also like