tgrav

command module
v0.0.0-...-4051f3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 8 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳