How did you make these cylindrical 'galaxies'?

They're really cool.

Thank you! The most natural and simple way to make cylindrical or spherical shapes is by using a polar system of coordinates. So I picked the equatorial coordinate system that is communly used in astronomy and that is supported by Universe Sandbox XML language.

The position data of the stars are provided through three parameters:

* The

**distance** from observer: it is generated by a Gaussian distribution centered on the average radius of the cylinder. The standard deviation defines the thickness of the cylinder.

* The

**right ascension** : this is a fully random angle, so that all directions are spanned around the observer

* The

**inclination**: this angle is a gaussian centered around zero, it determines the height of the cylinder.

To obtain a perfect ring you would need to take another more complicated formula for inclination, but the approximation is good enough in most cases.

As for the velocities, I generated a norm for each star that I projected on X, Y and Z axes. The norm must be neither too small nor too big to avoid the galaxy to collapse or to scatter.

Regards,

Chris