https://github.com/ernanej/solar-system-opengl
3D visualization of the solar system using OpenGL with C/C++
https://github.com/ernanej/solar-system-opengl
3d c cpp opengl solar-system
Last synced: 2 months ago
JSON representation
3D visualization of the solar system using OpenGL with C/C++
- Host: GitHub
- URL: https://github.com/ernanej/solar-system-opengl
- Owner: ErnaneJ
- License: mit
- Created: 2024-07-11T04:25:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-11T19:18:56.000Z (almost 2 years ago)
- Last Synced: 2024-12-06T23:43:26.186Z (over 1 year ago)
- Topics: 3d, c, cpp, opengl, solar-system
- Language: C++
- Homepage: https://ernanej.github.io/solar-system-opengl/
- Size: 3.67 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π Solar System - OpenGL
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:
```bash
cd build
cmake ..
cmake --build . && ../bin/main
```
## Controls
```sh
--------------------------------------
π 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](./LICENSE) file for details.