Image:Pi digits distribution update.png

From Wikipedia, the free encyclopedia

[edit] Summary

This image shows a colored distribution of repeating digits of pi. Double digits are highlighted yellow, triple digits are highlighted green, and the Feynman point is highlighted orange.

This image was produced by the uploader using a PHP script:

<HTML>
<HEAD>
<STYLE type="text/css">
.x6 { background-color: #f99; }
.x3 { background-color: #9fc; }
.x2 { background-color: #ff9; }
body { font-size: 10px; }
</STYLE>
</HEAD>
<BODY>
</BODY><?php
$s = <<<PI
3.14159265358979323846264338327950288419716939937510582097494459230781640628620899
8628034825342117067982148086513282306647093844609550582231725359408128481117450284
1027019385211055596446229489549303819644288109756659334461284756482337867831652712
0190914564856692346034861045432664821339360726024914127372458700660631558817488152
0920962829254091715364367892590360011330530548820466521384146951941511609433057270
3657595919530921861173819326117931051185480744623799627495673518857527248912279381
8301194912983367336244065664308602139494639522473719070217986094370277053921717629
3176752384674818467669405132000568127145263560827785771342757789609173637178721468
4409012249534301465495853710507922796892589235420199561121290219608640344181598136
2977477130996051870721134999999837297804995105973173281609631859502445945534690830
2642522308253344685035261931188171010003137838752886587533208381420617177669147303
5982534904287554687311595628638823537875937519577818577805321712268066130019278766
1119590921642019893809525720106548586327886593615338182796823030195203530185296899
5773622599413891249721775283479131515574857242454150695950829533116861727855889075
0983817546374649393192550604009277016711390098488240128583616035637076601047101819
429555961989467678374494482553797747268471040475346462080466842590694912...
PI;
 
$lst = $str[0];
$n = 0;
for($i = 0; $i < strlen($s); $i++) {
        if ($s[$i] == "\n") echo "<br>";
        if ($lst != $s[$i]) {
                echo "<span class='x{$n} g'>";
                for($j = 0; $j < $n; $j++) echo "<span class='c'>{$lst}</span>";
                echo "</span>";
                $n = 0;
        }
        $lst = $s[$i];
        $n++;
}
 
?>
...
</BODY>
</HTML>

[edit] Licensing

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current07:42, 13 February 2008419×196 (23 KB)TechnoGuyRob (Talk | contribs) (This image shows a colored distribution of repeating digits of pi. Double digits are highlighted yellow, triple digits are highlighted green, and the Feynman point is highlighted orange. This image was produced by the uploader using a PHP script: <sourc)
07:41, 13 February 2008419×196 (23 KB)TechnoGuyRob (Talk | contribs) (his image shows a colored distribution of repeating digits of pi. Double digits are highlighted yellow, triple digits are highlighted green, and the Feynman point is highlighted orange. This image was produced by the uploader using a PHP script: <source)

The following pages on the English Wikipedia link to this file (pages on other projects are not listed):