Dda Line Algorithm
Dda Line Algorithm
Computations
- Computations required to calculate pixel positions
SLOPE INTERCEPT LINE EQ:
y = mx + b
m = slope
b = is the y intercept, is called as “slope intercept line
equation.”
Therefore
Slope(m) = dy/dx
Slope(m) = - /-
(DDA) ALGORITHM
step 6: [Obtain the new pixel on the line and plot the
same]
Initialize i to 1
While (i<= L){
= + ∆ x
= + ∆ y
Step 7: Finish
ADVANTAGES
1. It is the simplest algorithm and it does not require
special skills for implementation.