In this private project I am creating a Physics Simulator in Java from scratch.
The simulator is currently used to simulate gravity in 3D space and is capable of simulating n-body-simulations such as the Sun-Earth-Moon system over years with high accuracy and short runtime.
The simulator comes with a variety of features including
- extensive output/logging
- collision detection and handling (physically accurate inelastic collision)
- easy and centralized customizability in the Setup class
- real-time mode
The project is built with gradle but alternatively can also be run using the makefile.
make
ormake compile
will compile the code into a binary folder- All documentation can be generated by running
make javadoc
. - Use
make run
to generate your own simulation with output to terminal ormake log
to move output into a log file. make clean
will remove docs, binaries and logs
Have a look into the example.log
file and modify the Setup.java
class for your customized simulation. If you need more detailed features, add those to the main Sim.java
class. Please use constants and predefined objects of the Util.java
class.
Example log file:
The current version is fully capable to simulate the collision and gravity segments of the Physics engine but no GUI has been implemented yet (looking into that).