Thursday, August 9, 2012

Making new Solar Systems (for Celestia)

World Building


This is both a walk-through and a tutorial on how I develop credible fictional star systems to be rendered in Celestia. 

 The stories take place over 30,000 light-years away. Because Celestia places stars based on parallax, I use positions from the eight to the tenth decimal place for greater accuracy. Of course, I have no idea how accurate this depiction of our galaxy is, but it's the one that's all over the internet.

First I use a combination of Rhinoceros 3D modeling software to place my stars in virtual space, then Microsoft Excel spreadsheets to calculate the star's position as seen from Earth, and to generate random attributes such as spectral class and brightness.

Step 1. Virtual space placement.

 Here is a Rhino view of all the non-random stars I have placed into my fictional universe. I use a spreadsheet to generate random background stars based on the centers of these stars, a process I'll discuss in a later post.

Here the stars are in relation to the Milky Way. I had overlain an image of the galaxy from Celestia and they don't quite match, by an order of over 2000 light-years. I played around with adding in the distance to force it to match, then decided that perhaps Celestia's cotton-ball galaxy isn't perfect in its presentation of spiral arms. I'll trust the numbers. I have over 32 stars, each in its own layer, allowing me to turn off all the stars I'm not working on and declutter the workspace. That why all those measurements are on top of one another.

My principal protagonist Mil Kariden comes from a world called Tullis, far outside the Expanse. Previously, I had placed his world into the rhino model, but had not plotted its position.

I draw a line snapped to points from Earth to Tullis.

I take a measure of the angle between Earth to the galactic center, and Earth to Tullis.

In this cropped composite image, I am showing that I then sweep the Earth to Tullis line to align with the Y axis for my next measurements. Since Rhino measures against the background, I rotate the line to avoid measuring a false foreshortened line. I have learned that to get the declination correct, I have to mirror the line along the Y axis. As the Earth's equator is not aligned with the galactic plane, the galactic center's position in our sky is the reference I'm measuring against. I don't understand the mathematics that requires me to mirror the line, but if I don't, the stars end up on the opposite side of the galactic plane, and thus the Celestia representation will not match the Rhino model. It took me some time to figure out how to fix that. Mirroring solves the problem. To avoid cluttering and confusion, I typically do not copy the mirrored line, so that I only have one to work with, I've included it here for visual reference.

Step 2: Calculating Position

There are two coordinate systems in play here: the Earth's Equatorial Coordinate System (ECS) and a galactic coordinate system and reference plane imposed by virtual space in the rhino model. Celestia positions stars in the ECS, so I need to know where the galactic center lies in the sky. Wikipedia tells me where the galactic center is, and you can follow the link to see for yourself. As those numbers are in degrees-minutes-seconds, I had to convert them to decimals. The declination reference line and the 255.761122 number come from that calculation. Recently I discovered I had made and error and was using 266.4051 and all my stars were shifted to the left. Mercator's sun was the only star I had plotted and was no problem to change, but what was worst was the multitude of random background stars that clustered around it. It would be easier to make new clusters than try to fix all those stars. It's important to make sure you have all your numbers right.

In my spread sheet, the blue fields are in the inputs, and the numbers come from the rhino model measurements. Column D holds modifiers, the right ascension (RA) of the galactic center, and a -1 to define the position as being in the southern hemisphere's sky below the Earth's equator. Column E are the results of subtraction for RA and multiplication for Declination (Dec). It should be a rule of thumb that any distant system within the spiral arms should correlate to the Milky Way as seen in the sky. The correct declination is important for putting the stars in their expected place, especially if they are as distant as these. At such great distances even a few degrees equates to a difference in hundreds of light-years.
I have three random functions for subdwarfs, main sequence, and giant stars. Since Tullis is to have a habitable, near Earth-like world, I chose the main sequence F5V star, a little hotter and brighter than the sun, with a shorter life-span. I hold the opinion that Earth is in just the right spot to support life, so all my life supporting planets (and they are rare) will have attributes close to Earth's. If I don't like the values, I press F9 to recalculate the functions.

The Excel functions that I use are LOOKUP and RANDBETWEEN. The Absolute Magnitudes are a little more complicated requiring nested IF and RAND functions. They can't be any number, so I used the Hertzsprung-Russell diagram to give me the random function ranges. The logic string is basically: if it is this class of star, then this range, else if it is this class of star . . . and so one to the last one.

What is also being calculated is the star's luminosity, it's mass, and where it's habitable zone is, if it has one. Some giants do not. Always research before you do something that should be impossible. More on that later.

Step 3: Generating a Celestia .stc file.

The output fields in the spreadsheet are formatted for Celestia's stc file type, which is created and edited in either Wordpad or Notepad. I use Notepad.

I copied the pertinent fields into the stc file where I have the rest of the principal Expanse stars.

Step 4: Testing the results.

With Celestia up and running, we find the Greater Pavonan Expanse is in the Centaurus constellation. Tullis appears to be below Agena.

Here is in in reference to the rest of the Expanse. Celestia shows both star and star name (when toggled on) by apparent magnitude, so in order to see the dimmer stars I have to switch the auto-magnitude off, and ramp up the magnitude to its highest setting. And it still will not show all of them if I'm not close to the dimmest stars. The cluster of purple star names are random generated stars around Mercator, Pavona, and Cenestria. Plenty more to add. The lines represent trade routes, but are actually an edit to Celestia's asterim.dat file which tells the program which stars to draw lines to show the constellations. Again, from Earth, so that while I do have this "constellation" named, you can only see the name from the solar system. Celestia is primarily an astronomy toy/tool, and not made for world building per se, though many use it for just that.

Here's a look down view of Tullis and the Expanse, and a heap of stars around the sun. It's right were it should be, in the same vicinity as the Rhino model.

If things aren't where you think they should be, go back over your numbers. I copy and paste or type to transfer values from one application to another (Rhino to Excel to Notepad) and a misplaced decimal point can cause misplacement.

About those other stellar properties. . . .

Knowing the mass of the star is essential for when its time to put planets around it. Before I found the formula that calculates a ballpark figure, I just made a mass up. In doing so I got Mercator's sun Boiler wrong. It was too small. I had to repair the solar system. Mercator and Pavona are the only two planets that I had to back-calculate and arrive at stellar attributes to match what I had previously decided for those planets; in other words, I was forcing the setting to match the story. For Pavona I had decided upon its year, which means it is a certain distance from its sun, so I had to play with absolute magnitude values until I got the star I needed. I had a little more flexibility with Mercator and ended up extending its revolution around the sun by several years. That had no impact on anything I had planned.

The difficulty in this method is that these are not real stars from which a brightness can be determined. Usually absolute magnitude is derived by apparent magnitude, which is how bright a star looks from down here on Earth. Here, I'm inventing an absolute magnitude to tell Celestia how to render the star. Because I want my fictional worlds to be represented as realistically as possible around their fictional suns, I need to know the mass of the sun. To find that I need to know the luminosity of the star. The calculation I use is at the bottom of this page: computing bolometric magnitude, the inversion to be precise, which summed up states that the luminosity of my make-believe star is 10 raised to the difference of our sun's magnitude divided by 2.5. I could not do any of this without the internet. My numbers match Celestia's numbers so I know I'm doing it right.

Mass is a bit easier, although this will make your head explode. Essentially I'm taking the 3.5 root of the luminosity and arriving at mass. It's a ballpark figure. It's best to calculate stellar mass by how other objects are gravitationally reacting to it, such as in a binary system. The mass I use for Mercator's sun is close to the calculated value, but I changed it to match the expected values for the system. A little more or a little less is okay, and as the wikipedia page shows, a different root is needed if you think your star is going to be a certain mass range more or less than the sun.

The Habitable Zone represents were water should be able to exist in all three states of ice, liquid, and vapor. While I know there should be a maximum near and maximum far, I've only found through research that taking the square root of the luminosity gives you a distance in astronomical units. We know that energy is inversely proportional to distance so I know there are ways to calculate exact distances, but this will suffice. Tull is 2.208 times brighter than the sun, and Tullis should be in the neighborhood of 1.5 AUs. Since luminosity is energy, it goes to reason that dimmer stars will have habzones closer to them, and brighter stars will have zones farther away. And some really bright supergiants will have zones so far away as to be beyond their gravitational reach.

This is quite a bit of work and it does take away from writing, and in most cases none of the specifics that I calculate will ever be used as mentioned specifics in the stories. But if I have a greater understanding of these systems, then I can better accurately describe them; I'll know how long year is, or what type of seasons to expect, or where a moon or planet is in the sky at a particular time of day. Sci-fi fans are the nit-pickiest. If you don't have it together, they will let everyone know.

1 comment:

  1. If only the average science fiction author went to such pains for their worlds. Now the call is for more storytelling, I think you have the infrastructure nailed. ;-)