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).
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