
Cosmic ballet
Background.
Inspired by this reddit post by u/mtimetraveller I decided to do some research and make my own simulation using Processing (now p5.js). I was fascinated by the spirograph-like patterns it was making and the correlation between the planets and the sun. I attempted to stick to the relative sizes, speeds and distances just for a little bit of extra challenge. Certain values had to be modified so that everything could fit on screen!
The result is beautiful and I intend to revisit this and extend on the complexity and visualization.
Demo here (p5j.orgs).
Code here (GitHub).