Dda Line Drawing Algorithm
Dda Line Drawing Algorithm
The line (vector) generation algorithms which determine the pixels that should be
turned ON are called as digital differential analyzer (DDA). It is one of the
techniques for obtaining a rasterized straight line. DDA algorithm is an
incremental scan conversion method. Here we perform calculations at
each step using the results from the preceding step. The characteristic of
the DDA algorithm is to take unit steps along one coordinate and compute
the corresponding values along the other coordinate.
In DDA algorithm we have to find the new point xi+1 and yi+1 from the
existing points xi and yi. As a first step here we identify the major axis and
the minor axis of the line to be drawn. Once the major axis is found we
sample the major axis at unit intervals and find the value in the other axis
by using the slope equation of the line.
Disadvantage:
1. This algorithm is meant for basic line drawing only Initializing is not a
part of Bresenham's line algorithm.