├── CSS
└── styles.css
├── .gitattributes
├── visualization.html
├── README.md
├── index.php
├── highlighter
├── themes
│ ├── prism-okaidia.css
│ ├── prism-tomorrow.css
│ ├── prism-funky.css
│ ├── prism-dark.css
│ ├── prism.css
│ ├── prism-twilight.css
│ └── prism-coy.css
├── prefixfree.min.js
├── style.css
└── prism.js
├── JS
├── canvas-toBlob.js
├── filesaver.js
└── index.js
└── .gitignore
/CSS/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color:black;
3 | }
4 |
5 | .button {
6 | margin:5px 0px 0px 15px;
7 | background-color:#fb0;
8 | color: black;
9 | border-radius: 3px;
10 | padding:10px;
11 | width:auto;
12 | display:inline-block;
13 | cursor:pointer;
14 | }
15 |
16 |
17 | .save {
18 |
19 | width:100px;
20 | }
21 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/visualization.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Visualization of an irrational number
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
13 | Save as png
14 |
15 |
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Irrational2Chart
2 | =======
3 | *Simple visualize irrational numbers like e and pi*
4 | [github.wikunia.de/Irrational2Chart](http://github.wikunia.de/Irrational2Chart)
5 |
6 | Get variables:
7 |
8 | nods = show ... number of digits (?nods=50 => show 50 digits (empty => 800))
9 |
10 | n = number (?n=e&nods=1000 => show 1000 digits of e (empty => pi))
11 |
12 | with show dots you can see sequences like '99999' in a better way (big dot => long sequence) (?show_dots=false (empty => true))
13 |
14 |
15 | 
16 |
17 | Thanks [@LeaVerou](https://github.com/LeaVerou/prism) for your syntax highlighter!
18 |
19 | Thanks [@Regaddi](https://github.com/Regaddi/Chart.js) for your tooltip function!
20 |
21 | Thanks [@eligrey](https://github.com/eligrey/FileSaver.js) for your FileSaver.js!
22 |
23 | License
24 | ======
25 | [MIT license] (http://opensource.org/licenses/MIT)
26 |
27 |
28 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | Visualization of an irrational number
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | ´
13 |
15 |
16 | Pi
17 | e
18 | Golden ratio
19 | Sqrt(2)
20 |
21 | Save as png
22 |
23 |
24 |
25 |
26 | 2000) { // irrational numbers
30 | echo substr($line,0,45).'...\';';
31 | } else { echo $line; }
32 | }
33 | ?>
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/highlighter/themes/prism-okaidia.css:
--------------------------------------------------------------------------------
1 | /**
2 | * okaidia theme for JavaScript, CSS and HTML
3 | * Loosely based on Monokai textmate theme by http://www.monokai.nl/
4 | * @author ocodia
5 | */
6 |
7 | code[class*="language-"],
8 | pre[class*="language-"] {
9 | color: #f8f8f2;
10 | text-shadow: 0 1px rgba(0,0,0,0.3);
11 | font-family: Consolas, Monaco, 'Andale Mono', monospace;
12 | direction: ltr;
13 | text-align: left;
14 | white-space: pre;
15 | word-spacing: normal;
16 | word-break: normal;
17 |
18 | -moz-tab-size: 4;
19 | -o-tab-size: 4;
20 | tab-size: 4;
21 |
22 | -webkit-hyphens: none;
23 | -moz-hyphens: none;
24 | -ms-hyphens: none;
25 | hyphens: none;
26 | }
27 |
28 | /* Code blocks */
29 | pre[class*="language-"] {
30 | padding: 1em;
31 | margin: .5em 0;
32 | overflow: auto;
33 | border-radius: 0.3em;
34 | }
35 |
36 | :not(pre) > code[class*="language-"],
37 | pre[class*="language-"] {
38 | background: #272822;
39 | }
40 |
41 | /* Inline code */
42 | :not(pre) > code[class*="language-"] {
43 | padding: .1em;
44 | border-radius: .3em;
45 | }
46 |
47 | .token.comment,
48 | .token.prolog,
49 | .token.doctype,
50 | .token.cdata {
51 | color: slategray;
52 | }
53 |
54 | .token.punctuation {
55 | color: #f8f8f2;
56 | }
57 |
58 | .namespace {
59 | opacity: .7;
60 | }
61 |
62 | .token.property,
63 | .token.tag,
64 | .token.constant,
65 | .token.symbol {
66 | color: #f92672;
67 | }
68 |
69 | .token.boolean,
70 | .token.number{
71 | color: #ae81ff;
72 | }
73 |
74 | .token.selector,
75 | .token.attr-name,
76 | .token.string,
77 | .token.builtin {
78 | color: #a6e22e;
79 | }
80 |
81 |
82 | .token.operator,
83 | .token.entity,
84 | .token.url,
85 | .language-css .token.string,
86 | .style .token.string,
87 | .token.variable {
88 | color: #f8f8f2;
89 | }
90 |
91 | .token.atrule,
92 | .token.attr-value
93 | {
94 | color: #e6db74;
95 | }
96 |
97 |
98 | .token.keyword{
99 | color: #66d9ef;
100 | }
101 |
102 | .token.regex,
103 | .token.important {
104 | color: #fd971f;
105 | }
106 |
107 | .token.important {
108 | font-weight: bold;
109 | }
110 |
111 | .token.entity {
112 | cursor: help;
113 | }
114 |
--------------------------------------------------------------------------------
/highlighter/themes/prism-tomorrow.css:
--------------------------------------------------------------------------------
1 | /**
2 | * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
3 | * Based on https://github.com/chriskempson/tomorrow-theme
4 | * @author Rose Pritchard
5 | */
6 |
7 | code[class*="language-"],
8 | pre[class*="language-"] {
9 | color: #ccc;
10 | font-family: Consolas, Monaco, 'Andale Mono', monospace;
11 | direction: ltr;
12 | text-align: left;
13 | white-space: pre;
14 | word-spacing: normal;
15 | word-break: normal;
16 |
17 | -moz-tab-size: 4;
18 | -o-tab-size: 4;
19 | tab-size: 4;
20 |
21 | -webkit-hyphens: none;
22 | -moz-hyphens: none;
23 | -ms-hyphens: none;
24 | hyphens: none;
25 |
26 | }
27 |
28 | /* Code blocks */
29 | pre[class*="language-"] {
30 | padding: 1em;
31 | margin: .5em 0;
32 | overflow: auto;
33 | }
34 |
35 | :not(pre) > code[class*="language-"],
36 | pre[class*="language-"] {
37 | background: #2d2d2d;
38 | }
39 |
40 | /* Inline code */
41 | :not(pre) > code[class*="language-"] {
42 | padding: .1em;
43 | border-radius: .3em;
44 | }
45 |
46 | .token.comment,
47 | .token.block-comment,
48 | .token.prolog,
49 | .token.doctype,
50 | .token.cdata {
51 | color: #999;
52 | }
53 |
54 | .token.punctuation {
55 | color: #ccc;
56 | }
57 |
58 |
59 | .token.tag,
60 | .token.attr-name,
61 | .token.namespace {
62 | color: #e2777a;
63 | }
64 |
65 | .token.function-name {
66 | color: #6196cc;
67 | }
68 |
69 |
70 | .token.boolean,
71 | .token.number,
72 | .token.function {
73 | color: #f08d49;
74 | }
75 |
76 | .token.property,
77 | .token.class-name,
78 | .token.constant,
79 | .token.symbol {
80 | color: #f8c555;
81 | }
82 |
83 | .token.selector,
84 | .token.important,
85 | .token.atrule,
86 | .token.keyword,
87 | .token.builtin {
88 | color: #cc99cd;
89 | }
90 |
91 | .token.string,
92 | .token.attr-value,
93 | .token.regex,
94 | .token.variable {
95 | color: #7ec699;
96 | }
97 |
98 | .token.operator,
99 | .token.entity,
100 | .token.url
101 | {
102 | color: #67cdcc;
103 | }
104 |
105 |
106 | .token.important {
107 | font-weight: bold;
108 | }
109 |
110 | .token.entity {
111 | cursor: help;
112 | }
113 |
--------------------------------------------------------------------------------
/highlighter/themes/prism-funky.css:
--------------------------------------------------------------------------------
1 | /**
2 | * prism.js Funky theme
3 | * Based on “Polyfilling the gaps” talk slides http://lea.verou.me/polyfilling-the-gaps/
4 | * @author Lea Verou
5 | */
6 |
7 | code[class*="language-"],
8 | pre[class*="language-"] {
9 | font-family: Consolas, Monaco, 'Andale Mono', monospace;
10 | direction: ltr;
11 | text-align: left;
12 | white-space: pre;
13 | word-spacing: normal;
14 | word-break: normal;
15 |
16 | -moz-tab-size: 4;
17 | -o-tab-size: 4;
18 | tab-size: 4;
19 |
20 | -webkit-hyphens: none;
21 | -moz-hyphens: none;
22 | -ms-hyphens: none;
23 | hyphens: none;
24 | }
25 |
26 | /* Code blocks */
27 | pre[class*="language-"] {
28 | padding: .4em .8em;
29 | margin: .5em 0;
30 | overflow: auto;
31 | background: url('data:image/svg+xml;charset=utf-8,