I realized that my cluster galaxy algorithm only lets me make roughly spherical galaxies--where's the fun in that? I'm going to tweak it a bit to let me generate elliptical galaxies as well, following math here for a 2D ellipse, then creating a random (appropriately scaled) projection along the z-axis to add a 3rd dimension. I'll probably have to collision check all the stars, so it might take a bit longer, but it's worth a shot.
Other than that, I've been hacking away at the universe creation routine. This is the thing that makes the galaxy--and actually, it now makes multiple galaxies! I figured that while a 10,000 star galaxy is unwieldy in 3D (issues with seeing into it, navigating around, etc.), 10 galaxies with 1,000 stars each could be quite manageable if they're separated enough. I just need to figure out a good way to randomly arrange them--will work on that tomorrow if I have time after work.
Biggest annoyance today: the Java Vector3f class doesn't seem to have a rotate() method or anything like that. Have to do it all "by hand."
No comments:
Post a Comment