Skip to content
/ gravity Public

Newtonian gravity acting on a bunch of masses.

Notifications You must be signed in to change notification settings

joksas/gravity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A bank holiday weekend project in which I reimplement a simple gravity simulator that I loved to play with in high school. The original was in Java, and this one is in Go.

The program randomly generates a number masses on the screen. After that, each body simply follows Newton's laws of motion and universal gravitation; also, the masses merge together if they come too close to each other. Even with this basic setup, interesting behaviours can sometimes emerge, e.g. a smaller body orbiting a larger one.

gif

About

Newtonian gravity acting on a bunch of masses.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages