Page 1 of 1

wTc Star Maker 4.00 for Celestia, HTML, BBCode, and Tikiwiki

Posted: 03.11.2012, 02:19
by Mneme
I'm releasing the current stable version of the wTc Star Maker, 4.00. Its purpose is to generate random, mostly-realistic star systems for Celestia and also export these systems as HTML, BBCode, and Tikiwiki code. Version 5.00, when I get that far, will involve rebuilding the starfunctions.php to more closely match the values (e.g. stellar temperature) found in Celestia itself.

The discussion thread for it is found here: http://f.tarazedi.com/viewtopic.php?f=6&t=22
The download for the program and the texture pack (used in Celestia) is found here: http://f.tarazedi.com/viewtopic.php?f=7&t=28
You may run the program here: http://www.tarazedi.com/starmaker/ however, please be aware that concurrent users may obliterate each others' batches; if you have a MySQL/PHP-capable webspace, I ask that you install your own copy.

Re: wTc Star Maker 4.00 for Celestia, HTML, BBCode, and Tiki

Posted: 03.11.2012, 14:43
by Goofy
Hi mneme.
First of all my appreciation for the huge work you did.
I just tried it, and here some considerations:
1- I've been unable to obtain the solar systems, i.e. planets and moons ssc data, my fault or it's not working yet?
2- the obtained star group has a normal "round" shape when viewed from the top, but
when seen from the side it has a "flat" shape;
3- moreover as you see there is a conspicuous central condensation that I feel a bit unsuitable with the overall shape.
Please remember that my feeling is just due to "aesthetic" reasons (perhaps it's scientifically correct, but I haven't the needed background to judge this).

Just a suggestion: can you put a command like "select all" for copying the resulting data, instead of scrolling thousands of lines as it is actually needed ? (if it's already there, sorry, I missed it). :oops:
And some examples and/or a little help on how to use it? :wink:

And could you please restore what we discussed about the very nice results about globular clusters, making them possible as before, but with a round shape and following Fridger's suggestions from here
viewtopic.php?f=6&t=17126
in order to give a scientifically correct overall distribution?
Beg your pardon Fridger, but this way we can show plausible globular clusters and navigate within them with our student, while waiting for your Celestia-Sci incredible globulars.
Thank you once again, waiting for #5 release.
Bye

Goofy :D

Re: wTc Star Maker 4.00 for Celestia, HTML, BBCode, and Tiki

Posted: 03.11.2012, 16:02
by t00fri
Goofy wrote:Hi mneme.
...
3- moreover as you see there is a conspicuous central condensation that I feel a bit unsuitable with the overall shape.
Please remember that my feeling is just due to "aesthetic" reasons (perhaps it's scientifically correct, but I haven't the needed background to judge this).
...
And could you please restore what we discussed about the very nice results about globular clusters, making them possible as before, but with a round shape and following Fridger's suggestions from here
viewtopic.php?f=6&t=17126
in order to give a scientifically correct overall distribution?
Beg your pardon Fridger, but this way we can show plausible globular clusters and navigate within them with our student, while waiting for your Celestia-Sci incredible globulars.
Thank you once again, waiting for #5 release.
Bye

Goofy :D

It is obvious that the stars generated randomly by Mneme correspond to a completely WRONG probability distribution.

Unfortunately, advanced insight into statistics is required to get this right.

Many computer languages have a function built in that can generate random numbers within a certain prescribed range. If Mneme used it straightforwardly, the result cannot be right.

These built-in random generators are just the computer analogs of throwing the dice, i.e. the resulting random numbers follow a uniform (i.e. constant!) probability distribution.

Every child knows that in case of throwing the dice (possible random numbers 1,2,3,4,5,6), the probability to throw any number out of the 6 possibilities is identical, namely the constant 1/6.

The distribution of surface brightness and thus of GC stars as function of the radial distance r (replacing now the discrete numbers 1...6 of the dice example) is NOT constant. It rather equals the King function f(r). And that's Mneme's severe statistics fault!

Let us transform both the (stochastic) variable of the dice example and the GC task to a single dimensionless variable ? = {1/6, 2/6, 3/6, 4/6, 5/6, 1} with 0 <= ? <= 1 for the dice example and ? = r / r_t for the GCs following King's notation. Since the tidal radius r_t is the largest possible (star) distance from the GC center, obviously also here 0 <= ? <= 1.

Now we can directly compare: after throwing dice 1000 times, say, and counting how often each number has been thrown, you find a constant as function of ?, as stated before.

On the other hand, if you throw the "dice" (aka random stars ;-) ) according to the peaked probability function of King, then counting the thrown stars in each bin of ? will give you this probability function instead of a constant:

[Click on image by all means!]
king1.jpg


The thick red curve is the original King function versus ?. The blue histogram you get after counting the actually generated stars in bins of ?. So you see that this time the number distribution of random stars in ? follows precisely the desired theoretical curve by Ivan King.

++++++++++++++++++++++++++++
The big math task for you is then how to generate random data that follow a certain given probability function. Well, let me know if you consider trying it, then I'll help you further...

The trick of the famous mathematician Von Neumann was to use initially the [b]uniform random generators
in the computer, BUT we must throw away certain generated stars. The accepted stars then correspond to the right probability. That's why Von Neumann's method is also known among experts as the Acceptance-rejection method. It is the basis for the many Monte Carlo generators e.g. in my field of research...

But to do this in practice is not all that easy...
++++++++++++++++++++++++++++

That's not all: In order to generate the full spherical distribution of stars, you must use 3D polar coordinates (to make sure that the result is spherically symmetric!). The r-dependence is given by the above King values, while you must still generate UNIFORMLY the 2 missing angles (polar and azimuthal). Also here there is a trap...But for now, I leave it as an exercise to find out or to Google ;-) how a uniform distribution of points on a unit sphere needs to be stochastically generated.

The end result with the above ? dependence following King then must look like this in x,y,z, with -0.5<=x,y,z <= +0.5:

[Click on image by all means!]
king3d.jpg


Good luck,
Fridger

PS: And once you have done all this, you must remember that the brightness of GC stars also follows a statistical pattern that is described by the so-called luminosity function d nStars/ d M_V. It has been measured for many GCs and needs to be fitted by a smooth mathematical function. Here is mine for celestia.Sci:

lumi.jpg


This function then is responsible for a realistic mixture of dim and bright stars. M_V is the absolute visual magnitude of a star. Again one generates stars randomly with this luminosity function as probability distribution.

Finally you need to generate color....

Re: wTc Star Maker 4.00 for Celestia, HTML, BBCode, and Tiki

Posted: 03.11.2012, 17:53
by Mneme
1. Planets and moons are rendered after the stars, in a separate box to the right. If your query is sufficiently large, it may be timing out before these are rendered. Alternatively, you may have selected the stars-only option when making your query.

2/3. There should be no centralized distribution; it should be completely random within a cube.

I make no claim of scientific or statistical accuracy in distributions or positions. I did not have globular clusters in mind when I made this, though a set of separate queries of decreasing size may make aesthetically-useful clusters, as you have noticed.

This is where star position and classes come from:

random RA within requested range
random Dec within requested range
random Distance within requested range

random $n (1, 1000000) for spectral class; number is multiplied by a random (0, 1) $x times where $x is the blueskew input. If $n is less than the threshold number for a class, the star is bumped up to that class. These threshold numbers are based on estimates of the spectral class distributions of the solar neighborhood.

random $n (1, 1000000) for luminosity class; number is multiplied by a random (0, 1) $x times where $x is the giantskew input. If $n is less than the threshold number for a class, the star is bumped up to that class. (There is a 10% chance of overriding this class and making the star a white dwarf.)

random $n (0, 9) for subclass.

Re: wTc Star Maker 4.00 for Celestia, HTML, BBCode, and Tiki

Posted: 12.11.2012, 19:18
by Mneme
I am working on 5.00. Instead of stars being calculated according to ranges, there is now a base data table for the various stellar classes. The new version uses more stellar classes and uses the temperature, bolometric correction, and rotation from Celestia's source files combined with a similar table of masses and absolute visual magnitudes from another source. Star types will be weighted toward higher multiplicity by mass (e.g. an O class will have a high chance of being in a multiple star system whereas an M will have a low chance.)

As for probability. I have no idea how to do it, but I would love to make it so a randomly-generated star is put on the main sequence and then given a random age appropriate to the input, and then have its spectral type adjusted accordingly. This would require a chain of evolutionary spectral types with the age they hit each one for each main sequence star type, e.g. M9V, M8V, etc. Does this sort of data exist anywhere that a non-astronomer/statistician/mathematician could use it with some degree of ease?