Story Details

  • Orbit Spirograph (2019)

    Posted: 2025-01-23 16:28:07

    This blog post explores creating spirograph-like patterns by simulating gravitational orbits of multiple bodies. Instead of gears, the author uses Newton's law of universal gravitation and numerical integration to calculate the paths of planets orbiting one or more stars. The resulting intricate designs are visualized, and the post delves into the math and code behind the simulation, covering topics such as velocity Verlet integration and adaptive time steps to handle close encounters between bodies. Ultimately, the author demonstrates how varying the initial conditions of the system, like the number of stars, their masses, and the planets' starting velocities, leads to a diverse range of mesmerizing orbital patterns.

    Summary of Comments ( 2 )
    https://news.ycombinator.com/item?id=42805421

    HN users generally praised the Orbit Spirograph visualization and the clear explanations provided by Red Blob Games. Several commenters explored the mathematical underpinnings, discussing epitrochoids and hypotrochoids, and how the visualization relates to planetary motion. Some users shared related resources like a JavaScript implementation and a Geogebra applet for exploring similar patterns. The potential educational value of the interactive tool was also highlighted, with one commenter suggesting its use in explaining retrograde motion. A few commenters reminisced about physical spirograph toys, and one pointed out the connection to Lissajous curves.