Page 1 of 1

Life Zone Option

Posted: 15.01.2005, 07:01
by Space Man Spiff
I love this programme immensely but I little skill in dev. Is there anyone interested in adding an option to show life zones around stars? I know about Lua and someone has mentioned that it might be possible with cmod files like Selden's coordinate grinds. My idea was to make a togglable option for what any pariticular star's LZ would be, based on its characteristics. I am looking Lua but my skills are limited in the dev dept so if someone out there is as interested as I am in seeing where the life zones are, perhaps you could take the torch. I will help where I can. Right now its a lot of reading (Lua).

Best,
SMS

Posted: 15.01.2005, 14:07
by Spaceman Spiff
Brendan wrote:Maybe it could be done with cmod files like Selden's coordinate grinds were.


I recall that the co-ordinate grids of Celestia are set up with radii of a light-year or some other radius so large that it looks like the grid is at infinity. Brendan's idea might give you the quickest fix. If you could create two cmod files with radii appropriate to inner and outer life zone radii, you could have it. I don't know how to do that or create a toggle switch for these two, but Selden documents his stuff well - visit his web pages at http://www.lns.cornell.edu/~seb/celestia/.

If you get that working then all you need is the 'science' for working out the radii. I strongly recommend anyone interested in developing habitable zone criteria for Celestia read this article (old copy in a public library?):

Toon, Owen B., James F. Kasting and James B. Pollack. HOW CLIMATE EVOLVED ON THE TERRESTRIAL PLANETS; Scientific American, February 1988, page 46.

I loved this article: it addressed the 'Goldilocks' and 'Faint Young Sun Paradox' problems of the different climates of Venus, Earth and Mars in one go with the Silicate-Carbonate Cycle theory. It's not a final answer, but what was interesting is that for an Earth sized planet in the Solar System, they showed the cycle can only regulate the climate of a planet while it can keep liquid water on the surface (which could provide a 'definition' of 'habitable zone'), that Venus suffered a wet - not dry - runaway greenhouse crisis, and that Mars was uninhabitable not because it was too far from the sun but because it was too small to keep this cycle going (necessary ongoing volcanic eruptions of carbon dioxide have ceased). From all this they concluded that the inner habitable zone for our Solar System was thus at 0.95 A.U., but that the outer habitable zone was hard to establish. For an Earth sized planet, it could be as far as 2-3 A.U. simply by having a much higher level of carbon dioxide in the atmosphere (as in being the major constituent). Incidently, I noticed that this all meant that most 'habitable' planets (if existing) would have much higher carbon dioxide levels than Earth. That renders them uncolonisable by humans, and could also mean that Earth is uncolonisable to aliens - you can't change the level of carbon dioxide without ruining the climate - that's why the aliens aren't here ;).

You can chase up more interesting 'climate/habitable' stuff from these guys, do a search for TOON KASTING POLLACK.

Spiff.

Life zones

Posted: 17.01.2005, 06:43
by Space (formerly SMS)
Hi Spiff,

Sorry about stealing your handle, I didn't think of it being that popular. So "Space Man Spiff" (space and man separated; i.e. Me) will now just go by Space, unless of course, someone else already legitimately has it (which if that happens, I'll go by my xBox Live handle which is for sure all mine!).

All the dev I've done is laughable I'm sure, I'm self taught with no time to take courses. But I learnt other areas that way fairly well, it just takes time. To clarify some of what I was talking about with my LZ idea: I envisioned a faint (semi-transparent) green ring, much like what is on the exoplanets website (cf. http://www.extrasolar.net/planettour.as ... anetId=158), as a 2D plane ringed around the star, a ring extending from the innermost boundary to the outermost. The togglable part of it was merely to make the thing appear and disappear. That was only because I've found that sometimes there can be too many objects on the screen and I don't want to have things get visually cluttered (like earth is right now in my version of Celestia because of all the sats I have). So to have the LZ appear when I was curious (like the constellation grid or a space craft's orbit) would be good enough for me.

Reading about LZs and how far out they can reach depending on CO2 etc made me realise how advanced this concept was and how difficult this might be. The outer extent of the LZ might be more speculative than anything else. I thought "earth like" climate for what a life zone would be. Aliens can have there CO2 worlds. :wink: So closer to earth-like climate (or perhaps a more conservative LZ) would suit me just fine.

Spiff, you mentioned working on thing procedurally. That would be wicked! I'll be reading Lua still and research cmod, finding help where I can when I need it.

Perhaps tagging on to your handle was a good thing after all,
Space

Posted: 17.01.2005, 20:22
by Spaceman Spiff
Greetings Space,

Space wrote:Sorry about stealing your handle, ...

Don't worry about 'stealing', it was confusion of IDs that needed fixing.

Space wrote:All the dev I've done is laughable I'm sure, I'm self taught with no time to take courses.

Space wrote:Spiff, you mentioned working on thing procedurally. That would be wicked!


Er, I hope I haven't been using a term out of context. By 'procedurally' I meant my programming experience is pre- object oriented programming, as in C++. I tried to master Celestia code, starting with this: http://www.cplusplus.com, and its tutorials. Then, I had a look at some source code at Celestia CVS, and then just as I came to 'classes' (not the lecture things, the coding abstractions) I got interrupted again. Didn't understand anything. Then there's Open GL, and Linux to master. One day. By 'procedural', I refer to code that doesn't use abstractions such as objects or classes. I hope I got that right.

Now, to the matter at hand. Lacking any C++ programming knowhow, I usually try and fudge the .ssc files. I was thinking that you could create a translucent green ring for the Hab Zone by putting a ring (like Saturn's) about the sun or star concerned. Have inner and outer radii appropriate to what you calculate*. I tried making this solar ring, but couldn't remember how to get it to work. I know Rassilon once showed a ring around a star. If you can get this to work, then use a PNG texture for the Hab Zone ring. The PNG can be sized 128?—1 pixels with the first and last a bright green (for the edges), and the rest darker green with an alpha channel setting to create transparency. If you can get that working, then it's just a matter of a lua script to create the ring and allow toggling (but which key would you assign!?). I hope that's OK. Never lua'd myself.

Spiff.

* A quck way to calculate inner and outer Hab Zones based on Earth-like criteria. Taking the case for our sun to be from 0.95A.U. (wet greenhouse runaway) to 1.85A.U. (too difficult to explain why here, but it's based on carbon dioxide being less than 5%, which kills you, a deep sea diver told me), then multiply these figures by the square root of the star's luminosity in solar luminosities (appears in top left corner of Celestia in verbose mode).

Example. Alpha Centauri A. Luminosity = 1.57 suns. Hab Zone edges are:
Inner = 0.95A.U. ?— SQRT(1.57) = 1.19A.U. = 178,100,000km.
Outer = 1.85A.U. ?— SQRT(1.57) = 2.32A.U. = 346,800,000km.

Life Zone idea update

Posted: 22.01.2005, 09:38
by Space
Spiff,

Thanks for the input. I have made the life zone ring and have a few ideas after snooping through other .ssc files. This is my first time, so please bear with me as I might ask simple questions.

One, I was thinking that I could make a planet like object, as a test at least, around Sol. I made two life zones, a and b, a being the 0.95 au and b 1.85 au. I followed, so I thought the tutorials and other .ssc files similar to what I would be doing (like Coruscant from the Star Wars Universe) but nothing's working. Here is one of the .ssc files I made.

#Life Zone A
"Life Zone A" "Sol"

{
texture "lifezonea.png
Mesh "empty.3ds" # an invisible place holder
radius 0.5

}

CustomOrbit
{
EllipticalOrbit
{
Epoch 20021013
Period 0.00000001 # thought it would look cool if the thing spun around Sol once a second
SemiMajorAxis 0.95
Eccentricity 0.0
Inclination 0.0
AscendingNode 0.0
ArgOfPericenter 0.95
MeanAnomaly 0.0
}


I didn't know what to put for radius. In fact, some .ssc files had a longer list than others, making me wonder what was really needed (like mesh). And once I have it all done for Sol, then the new question is how can I make a .ssc file which an object which finds itself around all the stars? I mean, you usually have something like "Jupiter" "Sol" quotaion line up, but can I put "Life Zone A" "Every Star"? And after that, how do I put the square root of the star one is currently looking at? Perhaps I am thick, but putting something like

SemiMajorAxis 0.95 x squ root of current star luminosity

is along my line of thinking but the tutorials have no such space object which would find itself around every star. Is there some quick code I could use?

Alright, now that I have completely embarrassed myself with my lack of dev skills, correct me when you got a moment.

Thanks,
Space

Posted: 22.01.2005, 12:32
by selden
Space,

You need to reread the documentation on SSC files.
There are several "simple" errors in your example.

For example:

1. The {} are not nested properly.

2. CustomOrbit selects an orbit that's defined by C++ code within Celestia. It's ignored for other objects.

Here's your SSC file written "legally", but you'll need to provide an appropriate 3DS or CMOD model, not the empty object. I'd probably use a sphere with its center inside the sun.

Code: Select all

    
#Life Zone A
"Life Zone A" "Sol"

{
texture "lifezonea.png"

Mesh "empty.3ds" # an invisible place holder
radius 0.5

EllipticalOrbit
   {
Epoch 20021013
Period 0.00000001 # thought it would look cool if the thing spun around Sol once a second
SemiMajorAxis 0.95
Eccentricity 0.0
Inclination 0.0
AscendingNode 0.0
ArgOfPericenter 0.95
MeanAnomaly 0.0
   }
}

Posted: 24.01.2005, 16:03
by Spaceman Spiff
Greetings Space,

I'm sorry to say I haven't progressed in my chosen method of implementing a marker ring for habitable zones. I tried all weekend. It seems there is another of those clipping limits in Celestia's code. This one stops you specifying a large ring stretching right across a solar system: as in more than 10,000,000 km across.

Your method seems to be to draw an orbit instead. This could work, but you need two orbits (one for inner and one for outer edges). I see you have benefited from Selden's syntax corrections to your proposed .scc, but there are still problems!

You may have a misconception that .ssc files are code. They're not. They are just 'data' files that are read by the Celestia program to be told what you want drawn. There's an analogy here between HMTL files and Webpage Browsers.

As a result, you can't put equations into .ssc files, you have to put the final answer in. So, you have to work out the numbers first on a calculator (and that includes the square rooting), and then type that number in right.

Also, you can't specify "Any Star", because Celestia expects a specific star to be named. Anyway, you'll have to do this, as each star has a different luminosity and the inner and outer edge distances change each time. I'm afraid it's work, work, work this way... To get Celestia to draw a Habitable Zone marker around all stars and be toggleable means a change to the Celestia code itself...

OK, let's carry on with with your current example as syntactically corrected by Selden (even though I fear you'll be a bit disillusioned now ;) ).

Code: Select all

#Life Zone A
"Life Zone A" "Sol"

{
texture "lifezonea.png"

Mesh "empty.3ds" # an invisible place holder
radius 0.5

EllipticalOrbit
   {
Epoch 20021013
Period 0.00000001 # thought it would look cool if the thing spun around Sol once a second
SemiMajorAxis 0.95
Eccentricity 0.0
Inclination 0.0
AscendingNode 0.0
ArgOfPericenter 0.95
MeanAnomaly 0.0
   }
}


First, I think you are confusing a body with its orbit. The line "texture "lifezonea.png"" would try and paint this graphic image over the body, not the orbit. I mentioned the PNG graphic because I was trying to paint it onto a Ring object, but you are trying to make an Orbit object. If you are trying to make an orbit, not a ring, the texture isn't important.

Second, you apply this texture to the empty mesh. This can't work, because the mesh is empty, so the graphic can't be painted on anything. I think there is such a mesh as "empty.3ds", but even though I don't have it, Celestia drew the whole orbit and labelled where empty.3ds should have been as well. So leave that line, it's OK!

Third, you want the period to be very quick, but while bodies move in orbits, orbits do not rotate. You won't see the orbit spin around the sun every second. If you switch on the planet labels, then you would see the label spin around the sun. That also means the "Epoch 20021013" isn't necessary as well (because you don't care where the invisible body starts off). I found that setting "Period 0.00000001" made the label move so fast it too became invisible, so I set "Period 0.01" instead.

Fourth, you set "ArgOfPericenter 0.95" while "Eccentricity 0.0". Orbits with 0 eccentricity are perfect circles centred on what they orbit, so there is no angle where the argument of pericenter is set. It is also harmless to let "ArgOfPericenter 0.95" when "Eccentricity 0.0", but don't get the idea that this value has to be equal to that in "SemiMajorAxis 0.95"!

After all that, try this in your solarsys.scc. Paste it in at the top so you don't have to scroll all the way down to edit it when you experiment.

Code: Select all

#Life Zone Inner
"Life Zone Inner" "Sol"

{
  Mesh "empty.3ds" # an invisible place holder
  Radius 0.5

  EllipticalOrbit
  {
    Period 0.01
    SemiMajorAxis 0.95
    Eccentricity 0.0
    Inclination 0.0
    AscendingNode 0.0
    ArgOfPericenter 0.0
    MeanAnomaly 0.0
  }
}

#Life Zone Outer
"Life Zone Outer" "Sol"

{
  Mesh "empty.3ds" # an invisible place holder
  Radius 0.5

  EllipticalOrbit
  {
    Period 0.01
    SemiMajorAxis 1.85
    Eccentricity 0.0
    Inclination 0.0
    AscendingNode 0.0
    ArgOfPericenter 0.0
    MeanAnomaly 0.0
  }
}


If you do that, you'll find the orbits are invisible until you select them in the Solar System Browser. You can only select one of them at a time.

Well, it's not ideal, but it's a start.

Spiff.