Skip to content

temhelk/tgrav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tgrav

A simple terminal gravity simulator written in Go

Controls

  • +/- changes the speed of the simulation
  • f enables the rendering of the acceleration magnitude
  • c toggles clearing the screen each frame (allows to see traces behind moving objects)
  • mouse wheel scrolling zooms in and out
  • mouse panning (while holding left mouse button) moves the view around

Notes

  • For better rendering resolution all bodies are drawn as dots using Braille symbols
  • The camera automatically moves with the center of mass of the system
  • I'm running it in Kitty on Linux, it also works on Windows, but can be slow (tested with Windows Terminal)

Demo

A system of 4 bodies showing the acceleration amplitude surrounding them

A system of 3 bodies with the same mass

Gravitational slingshot

About

A simple terminal gravity simulator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages