~whereswaldon/galaxy-gio

Simple gravity simulation visualizer
feat: implement simple galaxy visualization

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~whereswaldon/galaxy-gio
read/write
git@git.sr.ht:~whereswaldon/galaxy-gio

You can also use your local clone with git send-email.

#galaxy-gio

This is a gio-based visualization of gonum's barneshut simulation example.

screenshot of galaxy visualization

#About

This program generates a random collection of masses with different starting points and vectors, then simulates their gravitic interactions. Each time you start the program, it uses the current time as the seed, so you will not see the same galaxy twice.

The sizes of the dots represent the mass of the star. The larger the dot, the more massive the star is.

The colors of the dots represent the magnitude of the velocity vector of the star. The more red is apparent in the color, the slower (relative to the average star) that star is going. The more blue is apparent in the color, the faster that star is moving (relative to the average star).

#Features

  • You can play/pause the simulation.
  • You can select regions of the visuzation to zoom in, and there is a button to clear the zoom.

#Licensing

The code adapted from the gonum example is in the file gonum.go, and is licensed under the 3-clause BSD license included in this repo as LICENSE-gonum. The remaining code is dual licensed UNLICENSE/MIT, and the license terms may be found in the file LICENSE.