Friday, September 16, 2016

Star system generation

I took a break from working on the planets program to look at star system generation.  There's a set of programs that have been floating around the net for decades that do that, based upon a pair of astronomy articles from the 1970's.  As I understand it, the accretion model used is known to be wrong (or at least incomplete) based upon some of the exoplanet data that has been collected over the past twenty years.  Unfortunately, everything I can find about simulations of newer models suggests that they're computationally expensive, requiring much code to be written and much time to execute each time.  I was considering going that route anyhow, when a saying I'd heard in the past came to mind:  "All models are wrong.  Some models are useful."  In this case, the accretion model is useful for quickly generating fictional star systems that aren't entirely arbitrary.





I created a quick and dirty C# star system generator based upon one of the simpler variants I found on the net, a Java applet called Accrete that was written by Ian Burrell in 1997.  Based upon a class of star (e.g. spectral type K1) it generates planets with some minimal data: orbit, mass, and whether it is a gas giant.  There's a rather more complex variant called StarGen which looks to deal with planetary details in greater depth, like atmosphere, more planet types, etc.  I'll be taking a look at that at some point.  A program like this could be useful for feeding details into the planets program I've been tinkering with, about which there are other posts here.

In its own right, StarGen is worth taking a look if you want a star system and aren't picky about the visual details (it has a fixed image for each planet type).  If you're an author, or designing a game of some sort, or a role-playing game campaign, you might find it useful.  It won't generate new pretty images of planets or maps for terrestrial worlds, but it will generate a nice batch of somewhat useful information about the planets in the star systems it generates.

No comments:

Post a Comment