Hi r/dataisbeautiful!

I created a simple online visualizer that plots 100,000 prime numbers in 3D space. I got the idea from a previous post here, as well as from a friend who tried plotting it out using a pencil and paper over a decade ago. However, instead of it simply being in 2D, in my model, whenever n is a prime number, I'll alternate turning between the X, Y, and Z axes.

The positions are generated in Python using a simple 3D turtle-graphics idea. Think of an invisible turtle walking one step at a time in 3D space.

  1. The turtle starts at coordinate (0, 0, 0).
  2. It walks forward one unit per step.
  3. Whenever the step count is prime, we record that coordinate and turn.
  4. Turns alternate between relative right and up.

Feel free to give it a try yourself: https://joshumax.github.io/beautiful-prime-numbers/

Posted by joshumax

3 Comments

  1. Practical_Glove_9799 on

    Oh… there it is ! An accurate map of my life decisions. You see it too right?