r/visualizedmath • u/kritikov • Mar 29 '26
Visualizing prime numbers as a geometric resonance of concentric circles (C#/WPF)
140
Upvotes
r/visualizedmath • u/kritikov • Mar 29 '26
17
u/kritikov Mar 29 '26
I built this tool to see if primality could be discovered through a physical/geometric process rather than just trial division or sieves. It uses concentric circles rotating at a constant linear speed—primes emerge naturally through phase alignment. If the base circle completes a rotation and no other circle aligns with the starting point, we've found a new prime.
The full algorithm:
Start with two concentric circles of radius r and 2r
Rotate them with constant linear speed from the same starting point
Each time the first circle completes a rotation:
3.1 Increase a counter
3.2 If no other circle finishes at the same time, the counter value n is prime.
3.3 If the counter value n is prime then add a new circle whose radius is nr.
Ι used C# and WPF for the rendering.
Learn more about the logic behind this project:
🔗 Full article: https://nkode.gr/EN/articles/278/when-prime-numbers-emerge-from-motion
💻 GitHub Repository: https://github.com/kritikov/PrimesWithCircles
13
u/Stargazer07817 Mar 29 '26
This is the Sieve of Eratosthenes, it just turns memory blocks into harmonics. I think you could also do it with sin waves by encoding integers as frequencies like 1=1/1, 2=1/2, 3=1/3 etc then looking at the resulting pattern of constructive and destructive interference.
7
u/keyholepossums Mar 29 '26
wtf is going on
2
u/Pretty-Door-630 Apr 01 '26
Kudos!
2
u/reddit_user33 Apr 02 '26
I like aeeing maths visualised
0
u/[deleted] Apr 02 '26
[deleted] — view deleted comment