This galaxy generator uses the density wave theory to create and animate the motion of stars in the galaxy.
Interested in the maths? Go to the Density Wave Theory on Wikipedia https://en.wikipedia.org/wiki/Density…
And a very good explanation on how to practically apply the theory to visualize it. I’ve translated the C++ implementation found here http://beltoforion.de/article.php?a=s… to C# and got it to run in Unity.