SolarSystem
An OpenGL project that will accurately simulate our Solar System. It will accurately represent the speed and orbitital pattern of each planet.
Install / Use
/learn @rrozema12/SolarSystemREADME
OpenGL Simulation of our Solar System
Description of the Goal and how to Execute
The goal of the project is to create a program in OpenGL that will accurately animate our Solar System.
Requirements - Download, Install and Run:
- CodeBlocks (any version 13 or higher)
- OpenGL plug-in for CodeBlocks
- The math library for OpenGL
Details about Files
There are many files in this project. See the description of these files given below.
-
main.cpp
This is the main driver for the program. It starts the program and does most of the work
-
sphere.cpp & sphere.h
When these files work together they generate a sphere in OpenGL. These spheres are used for a couple different objects in the Solar System, such as each planet and the body of the alien space ship.
-
torus.cpp & torus.h
When these files work together they generate a torus (or a ring) in OpenGL. These toruses are used for the asteroid belt, the rings for Saturn and Uranus, and the other part of the body of the space ship.
-
light.h, shader.cpp, shader.h, material.cpp, & material.h
All of these files working together will simulate light emitting from the Sun. There will be specular light on the sun that will make it look shiny (look for the white spot).
-
ship.cpp & ship.h
The "Ship" is a new OpenGL object that we created. It is just a sphere sitting inside a torus, which makes it look like an alien space ship.
-
fragmentShader.glsl & vertexShader.glsl
Since this entire project uses VBOs, or Vertex Buffer Objects, we needed fragment and vertex shaders to bind the colors to the color buffer. This allowed us to make each of the planets different colors. It helps the viewer distinguish between the planets easier.
Interaction
This program is intended to visually and factually represent our Solar System. These key presses will allow the user to interact with the program. They will be able see facts about each planet and the asteroid belt. Similarly, they will be able to see what the pilot of the ship is saying and simulate an apocalypse for fun. See the key press definitions below.
Press space to toggle between animation on and off.
Press 0 to display facts about the Sun.
Press 1 to display facts about Mercury.
Press 2 to display facts about Venus.
Press 3 to display facts about Earth.
Press 4 to display facts about Mars.
Press 5 to display facts about Jupiter.
Press 6 to display facts about Saturn.
Press 7 to display facts about Uranus.
Press 8 to display facts about Neptune.
Press 9 to display facts about Pluto.
Press a to display facts about the Asteroid belt.
Press s to display what the pilot of the ship is saying.
Press and hold the END key to simulate the apocalypse.
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
