Skip to content

muulti/GravitySimulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A 2D gravity simulation I made on Unity Engine.


So it´s basically a simulation of n-body systems with certain mass that attract each other.
It´s all constructed using the Newton gravity equation F=G*m1*m2/r^2 and force equation F=m*a

SIMPLEGIF

Realtime drawn trajectories


Trajectories drawn having in mind the influence of mass, position, velocity and your personal gravitatory constant haha.

2ORBITGIF

LINERENDERERGIF

Relative point of view


Still working on this. You can choose one planet to center the camera and redraw the way the trajectories would be seen from that planet´s point of view.

RELATIVEGIF

RELATIVEIMG

Other cool stuff


So there´s a beautiful periodical solution to the popular 3-body problem.
Here it is.
8GIF
Here it show how you would see those trajectories from one of the planets view.
W8GIF

-Here´s the paper: https://www.researchgate.net/publication/28135560_A_Remarkable_Periodic_Solution_of_the_Three-Body_Problem_in_the_Case_of_Equal_Masses
-The project was made by me, however, the idea came from this very talented dev: https://www.youtube.com/c/SebastianLague

About

A 2D gravity simulation I made on Unity Engine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages