N-body Gravitational Simulation    Physics project

Project Description

In my College Physics class, I was learning about gravitational forces and the motion of bodies and planets through space. Intrigued by the apparent impossibility of analytically calculating the motion of three or more bodies under gravitational attraction, I turned to the Java Processing library to help me quickly whip up a simulation.

This program defines a few "planets", initalizes them to arbitrary positions and initial velocities, and then simulates their motion.

Project Details

  • Easily extensible number of objects
  • Adjustable "G" (universal gravitational constant)
  • Modifiable parameters such as simulation speed
View Project on GitHub