Random SSC generator.

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 8 months
Location: Altair

Random SSC generator.

Post #1by Rassilon » 18.05.2004, 03:11

Yup Ive decided to do another one this time in C++...I have a small question though about generating random orbital parameters...Lets say you have a mass relitave to Sol say 2.8...And another star say a red giant with a mass of 20...Now in order to compute random orbital paremeters one would have to compensate for the size of the planet as well as the gravity of the star?

I suppose I need a rather comprehensive formula on computing orbits...How are they generally figured? Like in our solar system, orbits get wider the further out...is this only because the planets are larger?

Heres a dump of random AU based on # of planets and mass of star...

mass 3 planets 10:

Planet: 0.04054651
Planet: 0.36491860
Planet: 0.85147673
Planet: 1.13530230
Planet: 1.94623252
Planet: 2.55443018
Planet: 4.13574410
Planet: 5.06831385
Planet: 6.93345335
Planet: 8.59586029

mass 20 planets 10:

Planet: 0.23025851
Planet: 1.15129255
Planet: 3.68413615
Planet: 5.75646273
Planet: 10.59189143
Planet: 15.42732012
Planet: 20.03249031
Planet: 21.87455838
Planet: 31.31515726
Planet: 45.59118484

These values are based on a planet 1000 k in diameter...This would vary given the planet radius....possibly...

Any suggestions?
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 8 months
Location: Altair

Post #2by Rassilon » 19.05.2004, 17:06

Well does anyone know the formula Celestia uses for stellar radius?

I currently use R = (T/5860)^2 * (L)^0.5...Where R is the radius. T is the temp of the star in question and L is the luminosity of the star in question.
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Cormoran
Posts: 198
Joined: 28.07.2003
With us: 21 years 2 months
Location: Slartibartfast's Shed, London

Post #3by Cormoran » 19.05.2004, 19:25

Rassilon,

As far as I am aware, the fact that the spacing of the planets increases with distance is not related to their size.

Systems created with programs like ACRETE exhibit similar spacing to our solar system ('Bode's 'Law''), but I'm not sure whether thats due to a fiddle factor (ie: a calculation deliberately biased in favour of expected results).

I'm not sure whether anyone has postulated a reasonable spacing principle for orbits.

What I am sure of is that someone who knows better will undoubtedly correct my layman's statements above :)

As for sizes of stars, I use look-up tables rather than any calculations. This gives reasonable results if one includes a degree of random variability in radii for stellar classes Ia, Ib, II and III (supergiants and giants)

Maybe the illustrious Dr. G of the Evilness can shed some light (pardon the slight pun)

Cormoran
'...Gold planets, Platinum Planets, Soft rubber planets with lots of earthquakes....' The HitchHikers Guide to the Galaxy, Page 634784, Section 5a. Entry: Magrathea

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 21 years 10 months

Post #4by granthutchison » 19.05.2004, 22:27

Rassilon wrote:I currently use R = (T/5860)^2 * (L)^0.5...Where R is the radius. T is the temp of the star in question and L is the luminosity of the star in question.
That's not going to work ... have you missed out a minus sign? It should be:

R = (T/5860)^-2 * (L)^0.5

where T is in kelvin and R and L are in solar units. L has to be the bolometric luminosity (the total energy output of the star), rather than the visual luminosity. Celestia uses visual luminosities, and converts to bolometric with a look-up table before performing a calculation similar to the above.

Grant

Guest

Post #5by Guest » 19.05.2004, 22:53

Thanks grant your awsome!...

The formula I was recieving on the net failed to place the '-' sign on the formula...grrr...

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 8 months
Location: Altair

Post #6by Rassilon » 20.05.2004, 00:50

There is one small problem...I am unable to raise negative numbers to the power of fractions or decimals...C returns garbage...

How do I do this or better yet how did chris calculate this in Celestia?
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 21 years 10 months

Post #7by granthutchison » 20.05.2004, 07:42

Rassilon wrote:There is one small problem...I am unable to raise negative numbers to the power of fractions or decimals...C returns garbage...
Why would you do that? Neither the temperature nor the luminosity can sensibly be negative. You're raising the temperature component to a negative power, is all.

Grant

marc
Posts: 426
Joined: 13.03.2002
With us: 22 years 6 months
Location: Outback Australia

Post #8by marc » 20.05.2004, 13:48

I think Rass means C cant handle to a negative power.
Here is an equivalent method, I'm a bit rusty on my math so anyone correct me if I'm wrong.

x^-2 = 1/(x^2)

(T/5860)^-2 * (L)^0.5 = 1/((T/5860)^2) * (L)^0.5

Guest

Post #9by Guest » 20.05.2004, 14:24

marc wrote:I think Rass means C cant handle to a negative power.
Cripes, that's a pretty random limitation. Stengthens my resolve to continue ignoring C.

marc wrote:(T/5860)^-2 * (L)^0.5 = 1/((T/5860)^2) * (L)^0.5
That'll do it. Or you can get a more compact expression by just flipping the fraction:

(T/5860)^-2 * (L)^0.5 = 1/((T/5860)^2) * (L)^0.5 = (5860/T)^2 *(L)^0.5

This is the form Celestia uses in star.cpp. (Probably should have offered this originally, but I was trying to a imagine a single typing error that might have led to Rass's original mistaken rendering. Sorry.)

Grant

Guest

Post #10by Guest » 20.05.2004, 19:59

The absolute magnitude is negative for some stars such as Rigel...The bolometric correction is also negative...When added they both produce a negative absolute luminosity unless Im mistaken in assuming this is how Celestia achieves this....

L = AbsMag + BoloMCorrect...

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 8 months
Location: Altair

Post #11by Rassilon » 20.05.2004, 20:03

Nevermind NOW I see it....

boloLum = (float) exp((solarBMag - bmag) / LN_MAG);

Ive looked over that ccp file 100 times and there it was right under my nose...geez!

Thanks everyone for your help...Im sure Ill be back with more dumb questions :P
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 21 years 10 months

Post #12by granthutchison » 20.05.2004, 20:48

Ah right.
Yes, you've first got to make the conversion from the logarithmic absolute magnitude scale (which is negative for bright stars) to the proportional luminosity scale (which takes only positive values).

Grant

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 8 months
Location: Altair

Post #13by Rassilon » 21.05.2004, 00:32

Now that Ive gotten around most of the heavy maths...Ive come up with a rather nice random planet naming convention that will be rather nice for the real sci-fi enthuiast...

Heres a dump from the random name generator of 100 planets...

Planet: Iolovlejome
Planet: Apej
Planet: Eqisoker
Planet: Qolropr
Planet: Uuoiihroiinp
Planet: Krehras
Planet: Uiaeinooe
Planet: Nihlifliio
Planet: Opep
Planet: Upejipoiolu
Planet: Iiigeloiaoen
Planet: Oponpooopr
Planet: Jrelrue
Planet: Hruseiujo
Planet: Hruioooyukru
Planet: Iekrijr
Planet: Nohiln
Planet: Lohiquijuo
Planet: Lnouiplitz
Planet: Elno
Planet: Onip
Planet: Unrerohiku
Planet: Mjeoojruia
Planet: Oei
Planet: Eqileloxeeue
Planet: Flolile
Planet: Jitigofonop
Planet: Nrohl
Planet: Nrojimjirh
Planet: Ulne
Planet: Obafolu
Planet: Jhegeyeswisi
Planet: Eqivep
Planet: Nijrofro
Planet: Eknuquaoumokn
Planet: Eeiknyjhirh
Planet: Lnol
Planet: Hikrigisuo
Planet: Hloiijapromj
Planet: Iselrekroeusw
Planet: Yje
Planet: Hro
Planet: Ifomnioei
Planet: Ouhi
Planet: Haouswiro
Planet: Upopome
Planet: Sonpu
Planet: Ylaiiuenomo
Planet: Inigro
Planet: Oryrhobotokr
Planet: Ehlamjijo
Planet: Iiiqzerh
Planet: Ijomj
Planet: Eoupi
Planet: Efr
Planet: Oofeie
Planet: Ilnomj
Planet: Ruiefl
Planet: Erhioimerh
Planet: Qeiooukujr
Planet: Olnomemeqoli
Planet: Mokiqurihl
Planet: Froxipliqzo
Planet: Uhojolequoi
Planet: Munr
Planet: Iknoprerho
Planet: Krofihlij
Planet: Ioueukotx
Planet: Oeinr
Planet: Swosoqu
Planet: Mjoswoqipu
Planet: Aqi
Planet: Oroseouiiditz
Planet: Kofinolro
Planet: Ioiji
Planet: Kridiq
Planet: Iigomurh
Planet: Ronrorhywhi
Planet: Ogosuhrinat
Planet: Iiom
Planet: Giniquyp
Planet: Jrifamni
Planet: Eoomopoj
Planet: Pogranpo
Planet: Fukrimjeoeq
Planet: Oeisoieg
Planet: Olomjiw
Planet: Apreuitzojhu
Planet: Ukodolohr
Planet: God
Planet: Anetoqi
Planet: Ioielriienr
Planet: Jimomjirh
Planet: Ojej
Planet: Okofreplo
Planet: Dhisuoim
Planet: Uniouru
Planet: Iilrogoeiwh
Planet: Uoi

Not too bad but could always use improvement...

I will of course allow one to choose to generate random names or a set naming convention such as Alpha Centauri I II and II or the like depending on the name of the star...So you will have the choice of random names or roman numerals ;)
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Avatar
piellepi M
Posts: 124
Joined: 25.09.2003
Age: 69
With us: 21 years
Location: Rome, Italy

Post #14by piellepi » 21.05.2004, 08:32

Hi Rassilon
IMHO there is something strange in the algorithm that generates random names :(
For italian people (like me :wink: ) there are too many consecutive wovels inside the names (an example is "Uuoiihroiinp": it seems like a finnish or danish name) and too many strange consonants: remember that in our alphabet we have no "j", "k", "w", "x" and "y". We only use them for words of foreign languages. :oops:
I'm not an expert, but I suppose that every language has a set of rules based on the frequency of vowels and consonants in the words: I would be very interested in learning more on this subject! :D

BTW, as an example, for us the Moon is "Luna", the sun is "sole", jupiter is "Giove" : as you can see in these few examples there is a quite complete balance between the number or vowels and consonants: I must confess that I am perplexed about the new names assigned to recent satellites (expecially Jupiter and Saturn). Those names are quite unpronunciable here in Italy!
Even the newest object in the solar system ("Sedna") for us has a very strange name: no italian word in fact contains the letters "dn" inside it.

Obviously we do accept these names!! :D

Some times ago I tried to build a routine to generate random names, but if I remember well, I was not satisfied at all and so I abandoned the project! :cry:

Thanks for your attention!
Pierluigi

Cormoran
Posts: 198
Joined: 28.07.2003
With us: 21 years 2 months
Location: Slartibartfast's Shed, London

Post #15by Cormoran » 21.05.2004, 11:04

I'm not sure that we would be able to even pronounce (or in some cases perceive) the names of worlds discovered or inhabited by other civilisations. Its a certainty that we will see some very weird vowel and consonant combinations even in those languages we can pronounce...

Given these facts, Rass's name generator method is as valid as any other method.

Personally I think human explorers would name planets as they saw fit no matter what they were called when they got there. Of course, its also very likely that we would know of the existence of these worlds before we got there, and the discoverer would have named them. Personally I think assigning numbers to any object in lieu of a name lacks a certain poetry.

Would Roy Batty's speech in Bladerunner have sounded so good if he'd said.. 'I've seen C-beams... glitter in the dark.... near the DM-45 2321 gate'?

In conclusion, I think naming is a matter of personal taste, but Rass's name generator allows rapid population of system names, which you'll always be able to change afterwards anyway...

Just my 1.23 pence...


Cheers,

Cormoran
'...Gold planets, Platinum Planets, Soft rubber planets with lots of earthquakes....' The HitchHikers Guide to the Galaxy, Page 634784, Section 5a. Entry: Magrathea

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 21 years 10 months

Post #16by granthutchison » 21.05.2004, 11:05

piellepi wrote:I must confess that I am perplexed about the new names assigned to recent satellites (expecially Jupiter and Saturn). Those names are quite unpronunciable here in Italy!
Even the newest object in the solar system ("Sedna") for us has a very strange name: no italian word in fact contains the letters "dn" inside it.
The new Saturnians are Inuit and Norse names (plus a few old Celtic) and Sedna is an Inuit goddess - so it's often difficult for speakers of Latin-descended languages to know how to pronounce them. I think we're going to see more of this problem as the pool of classical Greek and Roman mythology is exhausted. Even the Greek stuff is a problem, since the IAU nomenclature commitee have deliberately dropped the vowel accents that are a guide to pronounciation - presumably to simplify the spelling a little, but I think it's a huge mistake.
A while ago for my own use I put together a pronounciation guide for the various solar system moons, including the recently-named bodies. I could post it on the forum, if anyone's interested.

Grant

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 8 months
Location: Altair

Post #17by Rassilon » 21.05.2004, 20:17

The naming convention isnt any specific language...just based around a mix of anglo-saxon language rules which should fall in the area of english, french, german and some italian and spanish...Its all based around what we as earth dwellers are familiar with in a language...If I really want to be alien in a sense I may refer to wingdings and the upper ascii table for alien hieroglyphics...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 1 month

Post #18by ajtribick » 21.05.2004, 20:55

There's a rather nifty generator at http://www.ruf.rice.edu/~pound/ which produces fairly decent results based on an input vocabulary if you're interested.

Topic author
Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 8 months
Location: Altair

Post #19by Rassilon » 26.05.2004, 13:17

chaos syndrome wrote:There's a rather nifty generator at http://www.ruf.rice.edu/~pound/ which produces fairly decent results based on an input vocabulary if you're interested.


I found this to be quite helpful...Thanks...In those links there was a javascript based name generator for planets that I will port over to C++...as Im not happy with mine...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!


Return to “Development”