Scan Converting Lines

Raster decomposition of a line is based on sampling with an invariable step according to the axis x, alternatively y. It depends on the inclination of the line, which is represented by the slope m.

$$$APPLET

Applet Value slope m for different the inclination of the line.

Source code

    If |m|<1, then the line's inclination to axis x is smaller than 45 grades, therefore the line is patterned according to axis x with a step of 1 pixel. If  |m|>1, then it is patterned according to axis y. A line with slope 1 is called diagonal and it is patterned by any axis. The axis according to which it is patterned is called operative (main) axis. The name of second axis is incident axis.