A Visualisation of an Archimedean Spiral Using Prime Numbers
$ go run main.go
Key | Action |
---|---|
Space | Toggle Generation |
s | Skip Generation |
r | Reset |
z | Toggle automatic zooming |
x | Toggle rotation (can cause performance issues when using a high prime count) |
You can scroll to zoom in and out. Hold Ctrl to be more precise.
- Don't use
rl.DrawCircle
- Optimize performance when rendering a high prime count
- Sliders for adjusting speed of rotation and zooming after launching
- Reimplement Eratosthenes' Sieve to be more effecient
- Zooming in under cursor (would require changing the origin of rendering)
- Stop zooming out earlier (compute offset from edges of the spiral to the borders of the screen)
- Render to video (?)