2D Physics Simulator geared for simulations of planets and outer space.
https://theherobrine422.github.io/spaceSim/
Simple 2 body Simulator.
https://theherobrine422.github.io/spaceSim/v1/
- Modifiable framerate and seconds simulated per frame/physics tick
- Modifiable mass, starting x/y position, starting velocity, gravity, and color.
Simulator that can simulate as many bodies as you want. Many added features from v1.
https://theherobrine422.github.io/spaceSim/v2/
Currently it is not possible to change the bodies in the simulation from the UI, and several of the simulation settings. It is possible to overwrite the reset() function or sim variable implemented in main.js to create a new simulation.
If you overwrite reset() all you should have to do is hit the "Reset Simulation" button assuming you wrote your function correctly.
If you overwrite sim directly the animation should instantly start.
Both options require you to overwrite the variable sim with a new instance of the Simulation class and then add bodies to sim through sim.addBod(). If you read over the function reset() in main.js, and the constructors of simulation.js, body.js, and vector.js you should be able to figure out how to create your own simulation.
- All features from v1
- More then just 2 bodies
- modifiable radius, displayed radius scaler, and starting time attributes for bodies
- different collision modes.
- walls on the simulation.
- Better/worse UI
- Real Simulated Time Per Second based on how much time has actually passed (useful in the case that you set the framerate to a number that your computer can not handle.)
- bounce collision mode
- actual UI for creating bodies.
- zoomable camera to allow real world distances
- simualtion presets?
- better seconds simulated per real second display.
- body.combine() velocity fix. When the base planet has a signficantly lower mass than otherPlanet, the velocity becomes ridiculiously large. Example: If Mercury is the base planet and the Sun is otherPlanet from the rogue star inner planets simulation, then the velocity goes up to 3e8 m/s