# Tupper's self-referential formula

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 Tupper's 2001 SIGGRAPH paper on reliable two-dimensional computer graphing algorithms.[1] This paper discusses methods related to the GrafEq formula-graphing program developed by Tupper.[2]

Although the formula is called "self-referential", Tupper did not name it as such.[3]

## Formula

The formula is an inequality defined as:

${\displaystyle {\frac {1}{2}}<\left\lfloor \mathrm {mod} \left(\left\lfloor {\frac {y}{17}}\right\rfloor 2^{-17\lfloor x\rfloor -\mathrm {mod} \left(\lfloor y\rfloor ,17\right)},2\right)\right\rfloor }$
where ${\displaystyle \lfloor \dots \rfloor }$ denotes the floor function, and mod is the modulo operation.

## Plots

Let ${\displaystyle k}$ equal the following 543-digit integer:

960939379918958884971672962127852754715004339660129306651505519271702802395266424689642842174
350718121267153782770623355993237280874144307891325963941337723487857735749823926629715517173
716995165232890538221612403238855866184013235585136048828693337902491454229288667081096184496
091705183454067827731551705405381627380967602565625016981482083418783163849115590225610003652
351370343874461848378737238198224849863465033159410054974700593138339226497249461751545728366
702369745461014655997933798537483143786841806593422227898388722980000748404719

Graphing the set of points ${\displaystyle (x,y)}$ in ${\displaystyle 0\leq x<106}$ and ${\displaystyle k\leq y which satisfy the formula, results in the following plot:[note 1]

The formula is a general-purpose method of decoding a bitmap stored in the constant ${\displaystyle k}$, and it could be used to draw any other image. When applied to the unbounded positive range ${\displaystyle 0\leq 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 itself, but this is not remarkable, 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.[4]

The constant ${\displaystyle k}$ is a simple monochrome bitmap image of the formula treated as a binary number and multiplied by 17. If ${\displaystyle k}$ is divided by 17, the least significant bit encodes the upper-right corner ${\displaystyle (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 ${\displaystyle k}$ is the number whose binary digits form the plot. The following plot demonstrates the addition of different values of ${\displaystyle k}$. 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 ${\displaystyle k}$.[5]

## References

### Footnotes

1. ^ The axes in this plot have been reversed, otherwise the picture would be upside-down and mirrored.

### Notes

1. ^
2. ^ "Pedagoguery Software: GrafEq". www.peda.com. Archived from the original on 2021-02-24. Retrieved 2007-09-09.
3. ^ Narayanan, Arvind. "Tupper's Self-Referential Formula Debunked". Archived from the original on 24 April 2015. Retrieved 20 February 2015.
4. ^ "Selfplot directory". Pedagoguery Software. Retrieved 2022-01-15.
5. ^ "Tupper's-Function". Github. Aesthetic Function Graphposting. 2019-06-13. Retrieved 2019-07-07.