Skip to content

matheustheus27/SolarSystem-Low-Level-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SolarSystem — CG Simulation 🪐

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.


👥 Team & Faculty

  • Professor: Dr. Glender Brás
  • Students: Filipe Bicalho, Maria Eduarda, Matheus Thiago, and Thiago Freitas

🛠️ Implemented Features

  • 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 F key).
  • 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 V key.
  • 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 E key, 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.

💻 Simulation Controls

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

📦 Dependencies & Prerequisites

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-dev

🚀 Compilation & Execution

You 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 files

Manual Compilation:

gcc SistemaSolar.c -o solar -lGL -lGLU -lglut -lSOIL -lSDL -lSDLmain -lSDL_image -lSDL_mixer -lm
./solar

📺 Video Demonstration

Watch the technical simulation in action to see the camera controls and real-time rendering features:

Watch Simulation Video

About

nteractive 3D Solar System simulation utilizing OpenGL, Freeglut, and SDL for TP2 Computer Graphics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors