Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shrianshchari/prime-spiral

Prime spiral implemented in Python
https://github.com/shrianshchari/prime-spiral

Last synced: 23 days ago
JSON representation

Prime spiral implemented in Python

Awesome Lists containing this project

README

        

# prime-spiral
Prime spiral (also known as Ulam's spiral) implemented in Python using `turtle`

Saw [this video](https://www.youtube.com/watch?v=a35KWEjRvc0) by The Coding Train and thought it looked cool, and reasonable to implement myself.

## Examples:
![Prime spiral with max value 3600 without path lines, and dot radius 10](./images/spiral.png)

Prime spiral with max value 3600 without path lines, and dot radius 10

![Prime spiral with max value 10,000 without path lines, and dot radius 5](./images/spiral2.png)

Prime spiral with max value 10,000 without path lines, and dot radius 5

![Prime spiral with max value 4000 with path lines, and dot radius 10](./images/spiral3.png)

Prime spiral with max value 4000 with path lines, and dot radius 10

It is a bit slow but that's the nature of `turtle` graphics.