An interactive, high-fidelity three-dimensional simulation of the Solar System engineered as a core practical project for the Computer Graphics (TP2) curriculum. This project serves as a comprehensive exploration of real-time 3D rendering pipeline mechanics, utilizing low-level graphics primitives and matrix transformations to model celestial kinematics.
Rather than functioning as a standard game world, the application operates as a mathematically driven simulation environment. It implements hierarchical object modeling to establish stable orbital mechanics, handles dynamic state changes for relative planetary scales, and processes advanced pipeline techniques such as real-time viewport reshaping, custom skybox projection mapping, and localized hardware lighting calculations to realistically render starlight dispersion across orbiting celestial spheres.
- Professor: Dr. Glender Brás
- Students: Filipe Bicalho, Maria Eduarda, Matheus Thiago, and Thiago Freitas
- Sun and Planets: A hierarchical system with the Sun positioned at the center of the universe and the planets orbiting around it.
- Light Source: Computational illumination calculated directly from the Sun, affecting the visible faces of celestial bodies (can be toggled using the
Fkey). - Skybox: An immersive environment mapped inside a skybox container that simulates deep space, reacting seamlessly to mouse movement and perspective changes.
- Visible Orbits: Three-dimensional rendering of planetary trajectories, which can be toggled on or off via the
Vkey. - Reshape Handling: Built-in window reshaping support that adjusts the viewport without distorting or flattening the 3D spheres.
- Object Rescaling: Dynamically changes planetary scales using the
Ekey, allowing users to toggle between realistic proportions relative to the Sun and an enhanced educational scale for easier observation. - Camera Movement: Full freedom to navigate through cosmic space using keyboard controls.
- Background Music: Integrated space-themed audio tracks to enrich the simulation's overall immersion.
| Control | Action Executed |
|---|---|
| Mouse Movement | Rotates and aims the camera's perspective |
W, S, A, D Keys |
Moves the camera's position through space (Free Mode only) |
1 Key |
Activates Free Camera Mode |
2 Key |
Activates Fixed Camera Mode |
V Key |
Toggles the rendering of planetary orbit lines |
F Key |
Toggles the computational solar light source calculation |
E Key |
Increases or decreases the overall scale of the planets |
To compile and run this simulation on Linux (Ubuntu/Debian), make sure to install the following graphics libraries:
# Install SDL libraries (Window Management and Audio)
sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev
# Install SOIL (Texture Loading)
sudo apt-get install libsoil-dev
# Install Freeglut (OpenGL Primitives and Utilities)
sudo apt-get install freeglut3-devYou can compile the project manually or use the included Makefile to automate the routines.
Via Makefile:
make install-libraries # Installs the required libraries
make all # Compiles the project
make run # Runs the compiled simulation
make clean # Removes generated binary/compiled filesManual Compilation:
gcc SistemaSolar.c -o solar -lGL -lGLU -lglut -lSOIL -lSDL -lSDLmain -lSDL_image -lSDL_mixer -lm
./solarWatch the technical simulation in action to see the camera controls and real-time rendering features: