This project simulates the solar system using OpenGL and glut library in C++. It displays planets orbiting around the sun with realistic rotations based on actual planetary data.
- Realistic Planetary Orbits: Planets orbit around the sun with accurate distances and speeds derived from real data.
- Interactive Controls: Zoom in and out using keyboard controls to observe the solar system up close or from afar.
- Dynamic Lighting: Sun glow effect and dynamically adjusted lighting to enhance visual appeal.
- Starry Background: A starry background adds to the immersive experience of space.
- OpenGL and glut libraries installed on your system.
-
Clone the repository:
git clone https://github.com/SamaRostami/Solar-System-OpenGL.git
-
Navigate to the project directory:
cd solar-system-opengl
- Compile the program (ensure OpenGL and glut libraries are installed):
gcc main.c -o solar_system -lGL -lglut -lm
- Run the program:
./solar_system
- Zoom In: Press
+
key to zoom in. - Zoom Out: Press
-
key to zoom out. - Exit: Press
Esc
orq
to exit the simulation.
This project is licensed under the MIT License.
For any questions or feedback, feel free to contact me at samasky.rostami@gmail.com
.