Discover Tupper’s Formula: How One Inequality Can Draw Any Image
This article explains Jeff Tupper’s 2001 formula—a simple inequality that, by selecting an appropriate integer range, can reproduce its own bitmap and generate virtually any two‑dimensional picture, with examples and a handy online tool.
Mathematics contains many fascinating formulas, and one of the most intriguing is Tupper’s formula, which can generate its own bitmap image and, with appropriate adjustments, render virtually any two‑dimensional picture.
The formula was proposed by computer scientist Jeff Tupper in 2001. It involves the floor function ⌊·⌋ and the modulo operation, allowing one to test an inequality for integer pairs (x, y) within a chosen range.
When the vertical coordinate range is set from N to N+17, the inequality’s solutions trace the shape of the formula itself, producing the iconic image shown below.
By choosing a sufficiently large integer N (for example a 543‑digit number), the formula can encode any desired picture, such as the Euler formula image or a simple smiley face, as demonstrated by the following examples.
The website https://tuppers-formula.ovh/ allows users to draw images with Tupper’s formula and to convert a drawn image back to its corresponding N value, making experimentation easy and accessible.
Feel free to try it out and explore the limitless visual possibilities of this remarkable mathematical inequality.
Model Perspective
Insights, knowledge, and enjoyment from a mathematical modeling researcher and educator. Hosted by Haihua Wang, a modeling instructor and author of "Clever Use of Chat for Mathematical Modeling", "Modeling: The Mathematics of Thinking", "Mathematical Modeling Practice: A Hands‑On Guide to Competitions", and co‑author of "Mathematical Modeling: Teaching Design and Cases".
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.