ArticleslgStudy

mathematics

Tupper's self-referential formula

Tupper's self-referential formula is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Tupper's self-referential formula rather than just read about it. In short: Tupper's self-referential formula is a formula that visually represents itself when graphed at a specific location in the (x, y) plane. History The formula was defined by Jeff Tupper and appears as an example in his 2001 SIGGRAPH paper on reliable two-dimensional computer graphing algorithms.

Tupper's self-referential formula — main illustration
Tupper's self-referential formula — illustration

Key takeaways

  • Tupper's self-referential formula belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Tupper's self-referential formula to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Tupper's self-referential formula from memory before moving on to harder problems.

Reference excerpt

Tupper's self-referential formula is a formula that visually represents itself when graphed at a specific location in the (x, y) plane.

History The formula was defined by Jeff Tupper and appears as an example in his 2001 SIGGRAPH paper on reliable two-dimensional computer graphing algorithms. This paper discusses methods related to the GrafEq formula-graphing program developed by Tupper.

Formula The formula is an inequality defined as: 12<⌊mod(⌊y17⌋2−17⌊x⌋−mod(⌊y⌋,17),2)⌋ where ⌊…⌋ denotes the floor function, and mod is the modulo operation.

Plots Let k equal the following 543-digit integer:

960 939 379 918 958 884 971 672 962 127 852 754 715 004 339 660 129 306 651 505 519 271 702 802 395 266 424 689 642 842 174 350 718 121 267 153 782 770 623 355 993 237 280 874 144 307 891 325 963 941 337 723 487 857 735 749 823 926 629 715 517 173 716 995 165 232 890 538 221 612 403 238 855 866 184 013 235 585 136 048 828 693 337 902 491 454 229 288 667 081 096 184 496 091 705 183 454 067 827 731 551 705 405 381 627 380 967 602 565 625 016 981 482 083 418 783 163 849 115 590 225 610 003 652 351 370 343 874 461 848 378 737 238 198 224 849 863 465 033 159 410 054 974 700 593 138 339 226 497 249 461 751 545 728 366 702 369 745 461 014 655 997 933 798 537 483 143 786 841 806 593 422 227 898 388 722 980 000 748 404 719

Graphing the set of points (x,y) in 0≤x<106 and k≤y<k+17 which satisfy the formula, results in the following plot:

The formula is a general-purpose method of decoding a bitmap stored in the constant k, and it could be used to draw any other image. When applied to the unbounded positive range 0≤y, the formula tiles a vertical swath of the plane with a pattern that contains all possible 17-pixel-tall bitmaps. One horizontal slice of that infinite bitmap depicts the drawing formula since other slices depict all other possible formulae that might fit in a 17-pixel-tall bitmap. Tupper has created extended versions of his original formula that rule out all but one slice. The constant k is a simple monochrome bitmap image of the formula treated as a binary number and multiplied by 17. If k is divided by 17, the least significant bit encodes the upper-right corner (k,0); the 17 least significant bits encode the rightmost column of pixels; the next 17 least significant bits encode the 2nd-rightmost column, and so on. It fundamentally describes a way to plot points on a two-dimensional surface. The value of k is the number whose binary digits form the plot. The following plot demonstrates the addition of different k values. In the fourth subplot, the k-value of "AFGP" and "Aesthetic Function Graph" is added to get the resultant graph, where both texts can be seen with some distortion due to the effects of binary addition. The information regarding the shape of the plot is stored within k.

See also Recursion – Process of repeating items in a self-similar way Strange loop – Cycles going through a hierarchy

References

Footnotes

Notes

Sources

External links Jeff Tupper's official website Extensions of Tupper's original self-referential formula Tupper's self-referential formula in Rosetta Code, implementation in several programming languages TupperPlot, an implementation in JavaScript Tupper self referential formula, an implementation in Python The Library of Babel function, a detailed explanation of the workings of Tupper's self-referential formula Tupper's Formula Tools, an implementation in JavaScript Trávník's formula that draws itself close to the origin

Illustrations

Tupper's self-referential formula illustration
Tupper's self-referential formula: Addition of different values of k
Addition of different values of k

Worked examples

Example 1 — a first encounter with Tupper's self-referential formula

Start with the simplest possible case. Write down what Tupper's self-referential formula claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Tupper's self-referential formula before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Tupper's self-referential formula ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Tupper's self-referential formula

In research
Tupper's self-referential formula appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Tupper's self-referential formula in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Tupper's self-referential formula is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2001 introductions, Computer graphics, Inequalities (mathematics), so understanding it makes those chapters shorter.
In everyday life
Look for Tupper's self-referential formula outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Tupper's self-referential formula” →

How to study Tupper's self-referential formula in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Tupper's self-referential formula means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Tupper's self-referential formula out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Tupper's self-referential formula in simple terms?

Tupper's self-referential formula is a formula that visually represents itself when graphed at a specific location in the (x, y) plane. History The formula was defined by Jeff Tupper and appears as an example in his 2001 SIGGRAPH paper on reliable two-dimensional computer graphing algorithms.

Why does Tupper's self-referential formula matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Tupper's self-referential formula?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Tupper's self-referential formula.

Tags

  • 2001 introductions
  • Computer graphics
  • Inequalities (mathematics)
  • Self-reference

Keep exploring