Drawing a Line on a Digital Display

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram CDF Player or other Wolfram Language products.

Requires a Wolfram Notebook System

Edit on desktop, mobile and cloud with any Wolfram Language product.

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.

Contributed by: Stephen Wolfram and Yu-Sung Chang (March 2011)
Open content licensed under CC BY-NC-SA


Snapshots


Details

Rational slopes lead to repeating patterns; square roots and other quadratic irrationals lead to nested patterns.



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.
Send