Page 1 of 1

Playing with >7000 Asteroids

Posted: 26.05.2002, 11:13
by t00fri
When I proposed to generate by means of Perl a huge file with O(10000) asteroid data some time ago, I had essentially 2 reasons in mind.

Firstly, it is highly instructive to be able to study a virtually
complete and very large set of astronomical objects with the graphical power of Celestia. I come to some beautiful applications right below.

Secondly --as Chris immediately had also pointed out-- such a monster file represents some sort of ultimate benchmark for Celestias handling of the mathematics of moving objects as incorporated /right now/. The typical 5-8 fps, most uf us are getting with the asteroids incorporated, clearly indicate that some essential modifications are required if one wants to continue in this /very promising direction/ of
being able to simulate new large sets of objects! I am thinking since some time in this direction and have already a number of concepts for modifications of the code that I am presently examining in practice.

Now, Bruckner has yesterday made for us such a monster asteroid file
(asteroid_IMPS.ssc) by means of Perl, and so let me return here to the first kind of application: "instructive fun";-).

In order that we can adequately visualize the asteroids, we just have to make them more luminous temporarily by a huge factor 1.0E+8=100 000 000;-) (remember, the apparent magnitude of an object and thus its dot-size in Celestia involves the /log/ of its luminosity). How do you
make O(10000) objects more luminous with the present Celestia code?
Sure, again: Perl! Since the luminosity is proportional to the reflected energy, the /Albedo/, we simply have to multiply the Albedo parameter in Bruckner's asteroids by a factor 1.E+8.

Here is the trivial Perl-script that does exactly this:
--------asteroids.pl---------

#!/usr/bin/perl
while (<>) {
if (/Albedo/){
@line=split(" ");
$line[1]=$line[1]*1.E+8;
print " $line[0] $line[1]\n";
}else{
print $_;
}

}
-------------------------------
Unix/Linux people simply have to make the file asteroids.pl executable with

chmod +x asteroids.pl

move it to the 'extras' dir where Bruckners asteroid_IMPS.ssc is
'waiting', and then type

asteroids.pl < asteroid_IMPS.ssc > asteroid_bright.ssc
mv asteroid_IMPS.ssc asteroid_IMPS.ssc.org

To the Windows friends I can only recommend to install Perl
(free...);-). Then you only have to appropriately modify the first line of
asteroids.pl, according to the location of Perl.


Now you are ready to enjoy! For best visualizing the asteroid belt,
increase the field of view somewhat (45 ->90 degrees, perhaps) and you
may also decrease the star brightness ([ key) to a maximal magnitude of 6 say. You may e.g. beam yourself to the earth surface, center the asteroid 'Ceres' in your field and you see another 'milky way' composed of asteroids this time! Further amazing views are from space, look at Earth, Mars, Jupiter. Display the orbits of the inner planets and look at them from an angle 0f 45 degrees above.

Much fun with this new toy,

Bye Fridger

Image of asteroid belt at Bruckner's

Posted: 26.05.2002, 16:46
by t00fri
At Bruckner's galery you may inspect an image of the entire asteroid belt that was obtained with the above described method of increasing the Albedo of all 7300 asteroids by a factor 10^6 by means of a Perl script. Changing this factor to your preferences is of course a matter of seconds given the script...

Bye Fridger