navbar-top.gif
btn_spacer.gifHomeTopicsLatestRandomAboutFAQsParticipateAuthoring Areabtn_spacer.gif

Drawing a Line on a Digital Display

Lines at an angle have to be approximated on a digital display by picking a certain sequence of pixels to turn on. The optimal choice has a structure that depends on issues in number theory. Antialiasing can be done by grouping neighboring pixels and weighing them by the distances from the actual line.

Rational slopes lead to repeating patterns; square roots and other quadratic irrationals lead to nested patterns.
Powered by Wolfram Mathematica
Contact The Wolfram Demonstrations Project Team    Site Index    Wolfram Research
©  2008 The Wolfram Demonstrations Project & Contributors    Terms of Use    Privacy Policy    RSS    Atom