N body simulation: jaaas bodies (pronounced yaaas )

What it does

This project simulates an arbitrary number of object floating in space, and their gravitational influence on each other. It performs a complete simulation of Newtonian gravity and displays each unique "planet" in space. Additionally, it has a full parallax star-field, full user interactivity via the keyboard, and an unlimited number of procedurally generated universes.

How we built it

This project is implemented using OpenGL and C++, utilizing glm, glfw3, and glew for OpenGL and vector math support. The simulation implemented computes the net force on each object using the concepts of Newton's law of universal gravitation and integrates the resulting acceleration in a fixed time step to find the location of each "planet".

Challenges we ran into

We ran into several challenges during this hackathon - we lost a team member, hours were lost early in the hackathon due to compiler errors, and the force calculations took loads of time to debug. Despite all of this, we ended up with a product we are very proud to present today.

Accomplishments that we're proud of

The final product looks beautiful and works flawlessly. The sky full of stars in the background gives tons of depth that was lacking in early iterations of the project, and the parallax effect on them causes the camera movement to feel very satisfying.

What we learned

In a short list:

  • Linker flags are order-dependent (All)
  • C++ concepts/OOP (Mike)
  • OpenGL (Peter, Shawn)
  • Leapfrog integration (All)

Built With

Share this project: