This project showcases a 3D visualization of the solar system using OpenGL with C/C++. The goal was to create an interactive representation of celestial bodies, including the Sun, planets, and Saturn's rings. The project demonstrates OpenGLβs capabilities for dynamic and visually rich simulations, allowing users to explore planetary orbits and characteristics.
Features
- 3D Visualization: Rendering of celestial bodies.
- Interactive Exploration: Navigate the solar system and zoom in/out.
- Dynamic Animation: Planetary orbits and movement simulation.
- Textured Models: Detailed textures for each planet and the Sun.
- User Interaction: Control views and animations with keyboard and mouse inputs.
Demo
https://github.com/user-attachments/assets/7254833b-72d1-460c-934e-1b67b9a80d3d
Getting Started
Prerequisites
- CMake
- OpenGL
- A C++ compiler (e.g., GCC, Clang)
Build and Run
To build and run the simulation, follow these steps:
cd build
cmake ..
cmake --build . && ../bin/main
Controls
--------------------------------------
π Solar System Simulation Commands π
--------------------------------------
β Quit: press 'ESC'
π Toggle orbits: press 'o'
π Zoom in: press 'w'
π Zoom out: press 's'
βΈοΈ Pause animation: press 'p'
π±οΈ Move camera: press and hold the left mouse button and drag
π View all elements: press 'A'
π View individual element:
0οΈβ£ SUN
1οΈβ£ MERCURY
2οΈβ£ VENUS
3οΈβ£ EARTH
4οΈβ£ MARS
5οΈβ£ JUPITER
6οΈβ£ SATURN
7οΈβ£ URANUS
8οΈβ£ NEPTUNE
--------------------------------------
Textures
Earth Texture | Jupiter Texture | Mars Texture |
| | |
Mercury Texture | Neptune Texture | Saturn Texture |
| | |
Sun Texture | Uranus Texture | Venus Texture |
| | |
License
This project is licensed under the MIT License. See the LICENSE file for details.