On a computer screen, the pixels indicating a slanted line are selected with Bresenham's algorithm, developed in 1962 while at IBM.
Bresenham's Line Algorithm
See also
AntialiasingThis entry contributed by Ed Pegg, Jr. (author's link)
Explore with Wolfram|Alpha
References
Flanagan, C. "The Bresenham Line-Drawing Algorithm." http://www.cs.helsinki.fi/group/goa/mallinnus/lines/bresenh.html.Referenced on Wolfram|Alpha
Bresenham's Line AlgorithmCite this as:
Pegg, Ed Jr. "Bresenham's Line Algorithm." From MathWorld--A Wolfram Web Resource, created by Eric W. Weisstein. https://mathworld.wolfram.com/BresenhamsLineAlgorithm.html