How neiderpiza/planetas works
This is a small solar-system simulation and visualization project. The main workflow initializes the Sun, planets, and randomized asteroids, advances their positions under gravitational acceleration, writes sampled coordinates to CSV, then loads that CSV to animate the bodies in interior and full-system views. The simulation and visualization are separate programs connected by the shared data file. The source excerpts show the CSV handoff and plotting behavior; user launch steps are not documented, so those initiating links are omitted.
Main entry points: solar_system.cpp Gravity updates · orbits.csv Orbit CSV · visualizar_orbitas.py CSV loading
Components 8
Simulation
- Body setup
solar_system.cpp - Gravity updates
solar_system.cpp - CSV export
solar_system.cpp
Orbit data
- Orbit CSV
orbits.csv
Visualization
- CSV loading
visualizar_orbitas.py - Orbit animation
visualizar_orbitas.py
Other components
- User
- Animation window
Connections 6
- Body setup → Gravity updates: initializes state for
solar_system.cpp - Gravity updates → CSV export: records positions in
solar_system.cpp - CSV export → Orbit CSV: writes
solar_system.cpp - Orbit CSV → CSV loading: is read by
visualizar_orbitas.py - CSV loading → Orbit animation: provides data to
visualizar_orbitas.py - Orbit animation → Animation window: shows
visualizar_orbitas.py