cloudd901/prime_playground — explained in plain English
Analysis updated 2026-05-18
Explore visual patterns hidden in the sequence of prime numbers.
Compare different turning and step length rules to see how they shape a 3D path.
Use as a learning example for generating an interactive Three.js viewer from a Python script.
Create an eye catching, math based visualization for a presentation or portfolio.
| cloudd901/prime_playground | 0xustaz/streamgate | a-bissell/unleash-lite | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | Python | Python | Python |
| Setup difficulty | easy | hard | hard |
| Complexity | 2/5 | 4/5 | 4/5 |
| Audience | vibe coder | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Requires Python 3.11 or newer, a local server is used because browsers can block module imports from a file opened directly.
Prime Playground turns prime numbers into a shape you can look at and rotate in 3D. A Python script generates a self contained browser page that draws a path connecting one point per prime number, and you view and explore that path with your mouse in a 3D viewer built on Three.js, a JavaScript library for graphics that runs on your graphics card. The path is built one prime at a time. Starting from wherever the path currently points, the program decides how far to step forward and, after placing each new point, chooses a new direction for the next step. You have several options for how that direction changes: some rules always turn around the same axis, keeping the path flat, while others rotate around different axes for different primes, letting the path curve out into three dimensions. Some rules base the turn on a fixed angle you choose, while others calculate the turn from properties of the prime itself, like the gap to the previous prime or the sum of its digits. Separately from direction, you can also control how far each step travels. Some settings make every step the same length, while others make the steps longer or shorter depending on the size of the gap between primes, the digit sum of the prime, or how large the prime number is overall. There is also an optional setting that adds extra up and down movement to each step, layered on top of whichever direction rule you picked. To run it, you need Python 3.11 or newer, and you either run the Python script directly or, on Windows, double click a provided launcher file. Either way, it regenerates the viewer, starts a small local web server on your own computer, and opens the result in your browser. All of the actual path calculation and rendering happens in the browser itself, not in Python. The project is released under the MIT license.
A tool that generates an interactive 3D shape from prime numbers, letting you explore different rules for how the path turns and steps between primes.
Mainly Python. The stack also includes Python, JavaScript, Three.js.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly vibe coder.
This repo across BitVibe Labs
double-check against the repo, no cap.