Jump to content

Tupper's self-referential formula: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Undid revision 1065656760 by Betseg (talk) — i tried some styles and templates and none of them work sadly
added content
Tags: Mobile edit Mobile web edit
 
(16 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{Short description|Formula that visually represents itself when graphed}}
{{missing information|truly self-referential (encodes and prints the large number) versions in Tupper 2007 "selfplot" and Jakob Trávnik 2011|date=October 2021}}
{{missing information|truly self-referential (encodes and prints the large number) versions in Tupper 2007 "selfplot" and Jakob Trávnik 2011|date=October 2021}}
'''Tupper's self-referential formula''' is a [[formula]] that visually represents itself when graphed at a specific location in the (''x'', ''y'') plane.
'''Tupper's self-referential formula''' is a [[formula]] that visually represents itself when graphed at a specific location in the S point, E point, and X point.


== History ==
== History ==
Line 13: Line 14:


<math display=block>\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</math>
<math display=block>\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</math>
where <math>\lfloor \dots \rfloor</math> denotes the [[Floor and ceiling functions|floor function]], and mod is the [[modulo operation]].
or, as plaintext,
:{{code|1/2 < floor(mod(floor(y/17)*2^(-17*floor(x)-mod(floor(y),17)),2))}}


== Plots ==
where ⌊&nbsp;⌋ denotes the [[Floor and ceiling functions|floor function]], and mod is the [[modulo operation]].
Let <math>k</math> equal the following 543-digit integer:<!--Thinspace is used per [[MOS:DIGITS]]-->

Let <math>k</math> equal the following 543-digit integer:


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


[[File:Tupper_formula_constant_derivation.svg|thumb|91px<!-- 91px gives acceptable text rendering with least overshoot or ugly gaps -->|Derivation of ''k'']]
If one [[Graph of a function|graphs]] the set of points <math>(x, y)</math> in <math>0 \le x < 106</math> and <math>k \le y < k + 17</math> satisfying the inequality given above, the resulting graph looks like this (the axes in this plot have been reversed, otherwise the picture would be upside-down and mirrored):

[[Graph of a function|Graphing]] the set of points <math>(x, y)</math> in <math>0 \le x < 106</math> and <math>k \le y < k + 17</math> which satisfy the formula, results in the following plot:{{NoteTag|1=The axes in this plot have been reversed, otherwise the picture would be upside-down and mirrored.}}


[[File:Tupper's self referential formula plot.svg]]
[[File:Tupper's self referential formula plot.svg]]
[[File:Tupper_formula_constant_derivation.svg|thumb|91px<!-- 91px gives acceptable text rendering with least overshoot or ugly gaps -->|Derivation of ''k'']]


The formula is a general-purpose method of decoding a bitmap stored in the constant&nbsp;''k'', and it could actually be used to draw any other image. When applied to the unbounded positive range 0&nbsp;≤&nbsp;''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.<ref>{{Cite web |url=http://www.peda.com/selfplot/selfplot3big.png |title=Archived copy |access-date=2012-01-23 |archive-date=2015-02-20 |archive-url=https://web.archive.org/web/20150220145820/http://www.peda.com/selfplot/selfplot3big.png |url-status=live }}</ref><ref>{{Cite web |url=http://www.peda.com/selfplot/selfplot2.png |title=Archived copy |access-date=2012-01-23 |archive-date=2015-06-20 |archive-url=https://web.archive.org/web/20150620230719/http://www.peda.com/selfplot/selfplot2.png |url-status=live }}</ref><ref>{{Cite web |url=http://www.peda.com/selfplot/selfplot.png |title=Archived copy |access-date=2012-01-23 |archive-date=2015-06-20 |archive-url=https://web.archive.org/web/20150620230518/http://www.peda.com/selfplot/selfplot.png |url-status=live }}</ref>
The formula is a general-purpose method of decoding a bitmap stored in the constant <math>k</math>, and it could be used to draw any other image. When applied to the unbounded positive range <math>0 \le y</math>, 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.<ref>{{Cite web |url=http://www.peda.com/selfplot/ |website=Pedagoguery Software |title=Selfplot directory |access-date=2022-01-15}}</ref>


The constant ''k'' is a simple [[1-bit color|monochrome]] [[bitmap|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'',&nbsp;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.
The constant <math>k</math> is a simple [[1-bit color|monochrome]] [[bitmap|bitmap image]] of the formula treated as a binary number and multiplied by 17. If <math>k</math> is divided by 17, the [[least significant bit]] encodes the upper-right corner <math>(k, 0)</math>; 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 binary number that forms the plot in base 10. The following plot demonstrates the addition of different values of k. In the fourth subplot the k value of "AFGP" and "Aesthetic Function Graph" are added to get the resultant graph, where both the 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.<ref>{{Citation|title=Tupper's-Function|date=2019-06-13|url=https://github.com/AEFGP/Tupper-s-Function|publisher=Aesthetic Function Graphposting|access-date=2019-07-07}}</ref>
It fundamentally describes a way to plot points on a two-dimensional surface. The value of <math>k</math> is the number whose binary digits form the plot. The following plot demonstrates the addition of different values of <math>k</math>. 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 <math>k</math>.<ref>{{cite web |title=Tupper's-Function |date=2019-06-13 |url=https://github.com/AEFGP/Tupper-s-Function |publisher=Aesthetic Function Graphposting |access-date=2019-07-07 |website=Github}}</ref>


[[File:Tuppers-formula-test.png|center|thumb|Addition of different values of k]]
[[File:Tuppers-formula-test.png|center|thumb|Addition of different values of k]]


== See also ==
==See also==

* [[Bitmap]]
* {{annotated link|Bitmap}}
* [[Quine (computing)]]
* {{annotated link|Elementary function}}
* [[Recursion]]
* {{annotated link|Quine (computing)}}
* [[Strange loop]]
* {{annotated link|Recursion}}
* {{annotated link|Strange loop}}


== References ==
== References ==
===Footnotes===
{{notefoot}}

===Notes===
===Notes===
{{Reflist}}
{{Reflist}}
Line 54: Line 59:


== External links ==
== External links ==
* {{official|http://www.dgp.toronto.edu/~mooncake/ }}
* {{official|http://www.dgp.toronto.edu/~mooncake/|Jeff Tupper's official website}}
* [http://www.peda.com/selfplot/ Extensions of Tupper's original self-referential formula]
* [http://www.peda.com/selfplot/ Extensions of Tupper's original self-referential formula]
* [https://rosettacode.org/wiki/Tupper%27s_self-referential_formula Tupper's self-referential formula in Rosetta Code], implementation in several programming languages
* [https://amcrae.github.io/TupperPlot/TupperPlot.html TupperPlot], an implementation in JavaScript
* [https://amcrae.github.io/TupperPlot/TupperPlot.html TupperPlot], an implementation in JavaScript
* [https://web.archive.org/web/20130319093833/http://www.pypedia.com/index.php/Tupper_self_referential_formula Tupper self referential formula], an implementation in Python
* [https://web.archive.org/web/20130319093833/http://www.pypedia.com/index.php/Tupper_self_referential_formula Tupper self referential formula], an implementation in Python

Latest revision as of 05:27, 31 December 2024

Tupper's self-referential formula is a formula that visually represents itself when graphed at a specific location in the S point, E point, and X point.

History

[edit]

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

[edit]

The formula is an inequality defined as:

where denotes the floor function, and mod is the modulo operation.

Plots

[edit]

Let equal the following 543-digit integer:

960939379918958884971672962127852754715004339660129306651505519271702802395266424689642842174350718121267153782770623355993237280874144307891325963941337723487857735749823926629715517173716995165232890538221612403238855866184013235585136048828693337902491454229288667081096184496091705183454067827731551705405381627380967602565625016981482083418783163849115590225610003652351370343874461848378737238198224849863465033159410054974700593138339226497249461751545728366702369745461014655997933798537483143786841806593422227898388722980000748404719
Derivation of k

Graphing the set of points in and 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 , and it could be used to draw any other image. When applied to the unbounded positive range , 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 is a simple monochrome bitmap image of the formula treated as a binary number and multiplied by 17. If is divided by 17, the least significant bit encodes the upper-right corner ; 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 is the number whose binary digits form the plot. The following plot demonstrates the addition of different values of . 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 .[5]

Addition of different values of k

See also

[edit]

References

[edit]

Footnotes

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

Notes

[edit]
  1. ^ * Tupper, Jeff. "Reliable Two-Dimensional Graphing Methods for Mathematical Formulae with Two Free Variables" Archived 2019-07-13 at the Wayback Machine
  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.

Sources

[edit]
[edit]