5 ms·
Here's a JavaScript/HTML5/Canvas version. You can view the first 100 diagrams in a grid or view the diagram for the N of your choice. There's also an option to
by jonp 14y ago
Here's a JavaScript/HTML5/Canvas version.
You can view the first 100 diagrams in a grid or view the diagram for the N of your choice. There's also an option to view an alternative diagram where the drawing starts with the smallest prime instead of the smallest.
http://jsfiddle.net/FEKX2/3/ http://jsfiddle.net/FEKX2/3/
- cocoflunchy 14y agoArg! You beat me to it.
- Almaviva 14y ago> var PI = 355 / 113; You know about Math.PI?
- gwillen 14y agoI noticed the author speculating about color, so I colorized it based on the identity of the largest prime: http://jsfiddle.net/HEHHj/2/ http://jsfiddle.net/HEHHj/2/ It actually uses the last prime drawn, so it's only useful in 'smallest first' mode. That ought to be fixed, but I was lazy about it. Colorizing the image based on the largest prime makes the pattern intelligible a little bit longer, before it becomes impossible to tell the big primes apart.