Fixed up the latitude problem on the hub generation, and tweaked the blending a bit.
Fixed up the latitude problem on the hub generation, and tweaked the blending a bit.

file:a/Galaxy.cs -> file:b/Galaxy.cs
--- a/Galaxy.cs
+++ b/Galaxy.cs
@@ -40,13 +40,14 @@
 			for (int i = 1; i <= NumStars; ++i)
 			{
 				double Radius = rand.NextDouble() * (double)GalaxyRadius;
+				Radius *= rand.NextDouble();
 				double Phi, Theta;  // Rotational angles for some spherical coordinates.
 				double x, y, z;  // Cartesian coordinates, maybe?
 				
 				// If the radius puts the star outside the Hub (be fuzzy), we need to align it in an arm.
 				if (Radius > (HubRadius + rand.NextDouble() * ( rand.NextDouble() * 2 - 1 ) * ( DiskRadius - HubRadius)))
 				{
-					Radius = Radius * rand.NextDouble();
+
 					// This spiral algorithm was taken from the python Galaxy Generator found here: http://www.ailis.de/~k/archives/29-Galaxy-Generator.html
 					// Rotate the star by the specified number of rotations, then
 					// multiply by the proportional distance from center to give
@@ -71,7 +72,7 @@
 				else
 				{
 					Phi = rand.NextDouble() * TwoPi;
-					Theta = rand.NextDouble() * Math.PI;
+					Theta = Math.Asin(2d * rand.NextDouble() -1) + Math.PI / 2;
 
 					z = Math.Cos(Theta) * Radius;
 					x = Math.Sin(Theta) * Math.Cos(Phi) * Radius;

 Binary files a/bin/Release/CleanExceptionHandler.dll and b/bin/Release/CleanExceptionHandler.dll differ
 Binary files a/bin/Release/NDesk.Options.dll and b/bin/Release/NDesk.Options.dll differ
 Binary files a/bin/Release/galaxy_generator.exe and b/bin/Release/galaxy_generator.exe differ