Graphics Algorithms Simulator
Visualize and understand computer graphics algorithms step by step

Interactive Visualization

Click to set start point, click again to set end point and run algorithm

Algorithm Information

DDA Line Algorithm

Uses incremental calculation to draw lines by calculating intermediate points along the line path using floating-point arithmetic.

Pseudocode:

1. Initialize x, y
2. Calculate dx = x2 - x1, dy = y2 - y1
3. Calculate steps = max(|dx|, |dy|)
4. Calculate x_increment = dx/steps, y_increment = dy/steps
5. For i = 0 to steps:
Plot(round(x), round(y))
x = x + x_increment
y = y + y_increment