Primes numbers are shown circularly with the following algorithm:
-
let
na prime number, starting at2. -
let
displayed_primethe number of primes already on the circle -
plot
n, at the following polar coordinates:r, the radius, n/20 (20 here is a zooming factor)θthe angle, (n * 2 * π) / (displayed_prime - 1);- increase
displayed_prime - go to next prime number following
n
sudo apt-get install libsdl2-dev
git clone [email protected]:rybus/pircle.git
make
./main X Y
Xis the number of primes you want to displayYis the expension factor for the spiral (use 1)- the file
primes.txtcontains the list of the first million of prime numbers
./main generate X > primes.txt
X is the number of prime numbers you want to generate.
