Creating 2-D and 3-D models of the Solar System using physics-based geometries in Java. Brian Tubergen
Purpose/Subject/Goals Create a working simulation of the Solar System Implement Keplerian/Newtonian models to control planetary motion Users interaction with simulation: ability to add customizable solar bodies (comets, planets, etc.) at a given location and see what reaction of Solar System is Transition 2-D simulation into 3-D
Scope of Study Program “action at a distance” gravitation force: F = G*m*M/r^2 Acquire real world position/velocity planetary data or find an equation that can give it to me and compare it with simulation Implement non-coplanar orbits (ie: program a z component of position, velocity, etc.) for 3-D purposes
Similar Projects The basic Solar System part of the project is a visual recreation of the Keplerian model of planetary motion Other Solar System simulations exist, but none that I’ve seen allow user interaction to the extent I’d like to with user addition of solar bodies
Theory/Design Program written in Java (for now, for 2-D) Create a class that essentially handles the creation and management of the panel itself (Animate01_modified) Create a class that can represent a planet and contains data on that planet’s position, velocity, etc. (Sprite)
Theory/Design cont. Update the positions of the planets one at a time and iteratively, where at each step the planet’s acceleration is updated based on the position of each other body a = G*m/r^2 Every solar body’s acceleration is calculated based on every other body, if that makes sense
Testing Acquire real world (or equation based) position and velocity data for each planet and compare to my simulation’s output Verify that my simulation runs more or less correctly
Problems thus far Issues with iterative calculation of forces Planets updating their position incorrectly and too often Solved, as far as I’m aware Issues handling how to let each planet know about the other planets/bodies in the system Necessary to calculate accelerations correctly Solved, as far as I’m aware
Timeline 1 st quarter: Get iterative force/acceleration calculations working for multiple bodies interacting 2 nd quarter: Verify that the equations actually work based on solar system data Implement user interaction with simulation 3 rd quarter: Implement simulation in 3-D 4 th quarter: Continue struggling with 3-D
Results thus far
Results cont. Planets (smaller, multicolored circles) appear to move elliptically, hyperbolically, parabolically, etc. as they should Planets appear to interact as they should depending on their mass Need to assign them real values; current planets have been put in essentially random positions with essentially random masses for testing purposes