Today I played a little bit with mathematics. my goal was to calculate the coordinates of stars in a fictive galaxy with spiral arms. The result was a nice looking 2D galaxy with two spiral arms. But this result was mainly achieved by trial and error because I am not a mathematician. So I searched the net and found a nice DOS program from Ben Motz complete with source code. I borrowed the algorithm and converted it to a python script which generates a 2D view from the 3D galaxy and writes it to a PNG. This algorithm is nice because it can be configured in many ways (i.E. the number of spiral arms, arm width, number of stars in the disk and core, etc.)