Gravity: Interactive Solar System Simulator
Gravity is an interactive, web-based educational tool designed to visualize the mechanics of the solar system. It transitions from basic Newtonian physics to the concepts of general relativity, providing a guided tour of how gravity shapes celestial bodies and their orbits.
Core Simulation Features
Gravity utilizes a combination of scale models and precise physics to demonstrate orbital motion. The simulator provides several key toggles and views to help users understand the spatial relationships of the solar system:
- Physics Model: The simulator uses analytic two-body orbits based on J2000 elements to ensure positions remain exact and stable over time.
- Visual Scaling: Because actual astronomical distances are vast, the tool uses compressed sizes and distances to keep all celestial bodies visible within a single frame.
- Dimensionality: Users can switch between a 2D view, which flattens the system onto the ecliptic plane, and a 3D view that reveals real orbital inclinations.
- Customization: The interface includes options to toggle orbit paths, labels, and projection lines onto the ecliptic, and allows users to increase the visual mass of moons for better visibility.
The Guided Educational Tour
The simulator is structured as a 23-step guided tour that builds a conceptual understanding of gravity. The curriculum moves through the following phases:
1. Fundamental Gravitational Laws
The tour begins with the basic attraction between two masses, defined by the formula $F = G \cdot \frac{m_1 m_2}{r^2}$. It demonstrates Newton's Third Law, showing that while the Sun and Earth exert equal and opposite forces on each other, the Sun's significantly larger mass (~333,000x heavier) means the Earth is the body that is primarily moved.
2. Orbital Mechanics and Velocity
The simulation explains why the Earth does not fall into the Sun by visualizing the balance between the Sun's gravitational pull and the Earth's sideways velocity (approximately 29.8 km/s). The tour explores different velocity scenarios:
- Sub-orbital speed: The body falls back toward the center of mass.
- Orbital speed: The body achieves a closed loop (the first cosmic velocity).
- Escape velocity: The body achieves the second cosmic velocity and leaves the system.
- Interstellar travel: The third cosmic velocity allows a body to leave the solar system entirely.
3. Complex Systems and 3D Space
The tour expands to include the Earth-Moon system, the concept of the "sphere of influence," and the use of gravity assists (as seen with Voyager 1 and 2). It also corrects common misconceptions by showing that orbits are actually helices because the Sun itself is moving through space.
4. General Relativity
The final stage of the tour introduces Albert Einstein's perspective, presenting gravity not as a force of attraction but as the curvature of spacetime.
Community Feedback and Technical Critiques
Following its release on Hacker News, the community provided several technical critiques regarding the accuracy of the simulation's animations:
Axial Precession and Rotation
Multiple users noted that Step 14, which depicts axial rotation, is misleading. While the Earth rotates daily, the animation depicts axial precession—a process that takes approximately 26,000 years—rather than a stable axis pointing toward Polaris.
Orbital Velocity Accuracy
One user pointed out a potential discrepancy in the Earth's orbital speed at perihelion and aphelion, suggesting the values in Step 5 (21.5 km/s and 39 km/s) are too extreme compared to the actual values of approximately 29.3 and 30.3 km/s.
Theoretical Frameworks
Some users argued that the explicit split between Newtonian and Einsteinian gravity in the educational flow could be confusing, as Newtonian gravity is a limiting case of general relativity when gravitational fields are weak and velocities are much lower than the speed of light.
Visual and UX Improvements
Users suggested several enhancements to improve the educational value:
- Tidal Locking: A request to make the Moon tidally locked so it always faces the Earth with the same side.
- Mobile Optimization: Reports that the popover text obscures the Sun on mobile devices.
- Formation Visuals: Suggestions to show the Earth rotating as particles accumulate to form the planet, rather than using a static image.