Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.5 KB

README.md

File metadata and controls

56 lines (38 loc) · 1.5 KB

Solar System Simulation with OpenGL

Solar System Simulation

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.

Features

  • 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.

Installation

Prerequisites

  • OpenGL and glut libraries installed on your system.

Clone

  1. Clone the repository:

    git clone https://github.com/SamaRostami/Solar-System-OpenGL.git
  2. Navigate to the project directory:

    cd solar-system-opengl

Build

  1. Compile the program (ensure OpenGL and glut libraries are installed):
    gcc main.c -o solar_system -lGL -lglut -lm

Run

  1. Run the program:
     ./solar_system

Controls

  1. Zoom In: Press + key to zoom in.
  2. Zoom Out: Press - key to zoom out.
  3. Exit: Press Esc or q to exit the simulation.

License

This project is licensed under the MIT License.

Contact

For any questions or feedback, feel free to contact me at samasky.rostami@gmail.com.