Page 1 of 1
Star Tour
Posted: 16.10.2005, 16:33
by hank
I've been having fun with this little CELX script:
Code: Select all
-- star tour
celestia:print("Hello, Universe!", 5, 0, 0, 0, 0)
obs = celestia:getobserver()
stars = celestia:getstarcount()
for i = 1,stars do
j = math.random(stars)
obj = celestia:getstar(j)
obs:goto(obj,20)
while obs:travelling() do wait(0.5) end
celestia:print(" Welcome to "..obj:name(), 2, 0, 0, 0, 0)
end
(Just cut and paste the script code into a text file with a ".celx" file type. Then double-click on the file to launch Celestia and it will run the script.)
It's especially nice with FT galaxies in the background.
- Hank
Re: Star Tour
Posted: 16.10.2005, 17:23
by t00fri
hank wrote:I've been having fun with this little CELX script:
Code: Select all
-- star tour
celestia:print("Hello, Universe!", 5, 0, 0, 0, 0)
obs = celestia:getobserver()
stars = celestia:getstarcount()
for i = 1,stars do
j = math.random(stars)
obj = celestia:getstar(j)
obs:goto(obj,20)
while obs:travelling() do wait(0.5) end
celestia:print(" Welcome to "..obj:name(), 2, 0, 0, 0, 0)
end
How about a GALAXY tour with 2m stars in the background
Bye Fridger
It's especially nice with FT galaxies in the background.
- Hank
Re: Star Tour
Posted: 16.10.2005, 17:33
by hank
I've made a few improvements. The script now selects Earth at the start so you can see the changing distance from Earth in the info display as you travel, and a red marker indicates where Earth is. Also, after reaching each star, the camera turns to show you what the sun looks like from that distance. (Usually, you can't see it. Good thing for that red marker.) I also tweaked the timing just a bit.
- Hank
Code: Select all
-- star tour
celestia:print("Hello, Universe!", 5, 0, 0, 0, 0)
home = celestia:find("Sol/Earth")
celestia:select(home)
obs = celestia:getobserver()
stars = celestia:getstarcount()
for i = 1,stars do
j = math.random(stars)
obj = celestia:getstar(j)
obs:goto(obj,20)
wait(17)
celestia:print(" Welcome to "..obj:name(), 3, 0, 0, 0, 0)
wait(3)
obs:center(home,3)
wait(3)
end
Re: Star Tour
Posted: 16.10.2005, 17:37
by hank
t00fri wrote:How about a GALAXY tour with 2m stars in the background ;-)
Bye Fridger
That would be nice. But I don't think we have CELX support for deep sky objects yet.
- Hank
Posted: 16.10.2005, 17:46
by t00fri
Hank,
just tried it out. VERY nice. I like those amazing "star flows". But clearly there is an essential aspect missing:
Visits of
++++++++++++++
binary or even multiple star systems!
++++++++++++++
In FT1.1 you have
visualbins.stc
spectbins.stc
and nearstars.stc
An easy way to pick neat multiple systems is to open the GUI star browser and look out for star labels ending with A B C! Click them and you are there.
I think displaying some fancy orbiting suns in-between would create a substantially new degree of freedom in your script.
Cheers,
Bye Fridger
Posted: 16.10.2005, 18:31
by hank
t00fri wrote:...
But clearly there is an essential aspect missing:
Visits of
++++++++++++++
binary or even multiple star systems!
++++++++++++++
Cheers,
Bye Fridger
Fridger,
Here's a script that visits only (well, mostly) multiple body systems.
- Hank
Code: Select all
-- multiple-star tour
celestia:print("Hello, Universe!", 5, 0, 0, 0, 0)
home = celestia:find("Sol/Earth")
celestia:select(home)
obs = celestia:getobserver()
stars = celestia:getstarcount()
for i = 1,stars do
c=0
repeat
j = math.random(stars)
obj = celestia:getstar(j)
children = obj:getchildren()
c = c+1
kids=false
for index,obj in ipairs(children) do -- gotta be a better way...
kids=true
break
end
until c>100000 or kids
obs:goto(obj,20)
wait(17)
celestia:print(" Welcome to "..obj:name(), 3, 0, 0, 0, 0)
wait(3)
celestia:select(obj)
for index,obj in ipairs(children) do
obs:goto(obj,6)
wait(3)
celestia:print(" ...and its companion "..obj:name(), 3, 0, 0, 0, 0)
wait(4)
end
celestia:select(home)
obs:center(home,3)
wait(3)
end
Posted: 16.10.2005, 18:40
by hank
hank wrote:Here's a script that visits only (well, mostly) multiple body systems.
But it looks like it's not working with barycenters... :-(
So it's mostly touring exoplanets.
- Hank
Posted: 16.10.2005, 18:42
by ElChristou
Hank, Tx for thoses script, they are really cool!! With the 2m stars database it's a real pleasure...
Posted: 16.10.2005, 19:10
by t00fri
Hank,
I suggest you also show some
orbiting binaries , action, action...
, not just the compagnons.
Bye Fridger
Posted: 16.10.2005, 19:23
by hank
t00fri wrote:Hank,
I suggest you also show some orbiting binaries , action, action... ;-) , not just the compagnons.
Bye Fridger
Now you're asking me to do some real work! Sorry, this was just intended to show off something quick and dirty.
What you want could be done, of course. One would need to use the orbital parameters to choose a suitable observation point, time flow rate, etc. And it would be nice if orbits could be displayed for stars (I think that's not working yet).
So maybe some day, but not this afternoon.
- Hank
Posted: 16.10.2005, 19:29
by Cham
Hank,
this script is a great idea. However, I'm experiencing a problem with it : it goes first directly in my pulsar database which contains several hundreds of pulsars ! And many of them are very far away from us, so I end with a black screen most of the time !
This could do a great screen saver, by the way !
Posted: 16.10.2005, 19:39
by hank
Cham wrote:this script is a great idea. However, I'm experiencing a problem with it : it goes first directly in my pulsar database which contains several hundreds of pulsars ! And many of them are very far away from us, so I end with a black screen most of the time ! :-(
The stars are supposed to be selected at random, so I'm not sure why it would be going to your pulsar database, unless you're using the multiple-star tour and you've got a lot of your pulsars in multi-body systems.
- Hank
Posted: 16.10.2005, 19:42
by Cham
I used the last script above.
I'll try the other one.
Posted: 16.10.2005, 20:01
by Cham
Hank,
can you make a script which do EXACTLY the same thing as the first one, but ONLY to visit all systems which have some planets (exoplanets and fictious ones) ?
Posted: 16.10.2005, 20:11
by hank
Cham wrote:Hank,
can you make a script which do EXACTLY the same thing as the first one, but ONLY to visit all systems which have some planets (exoplanets and fictious ones) ?
How would what you want be different from my multi-body system tour?
- Hank
Posted: 16.10.2005, 20:16
by Cham
Well, I would love to have a script which does the same as your scripts, but only on the stars with a planet around. The script should visit each planet, but not the asteroids (too much of them scatered everywhere).
Posted: 16.10.2005, 20:24
by hank
Cham wrote:Well, I would love to have a script which does the same as your scripts, but only on the stars with a planet around. The script should visit each planet, but not the asteroids (too much of them scatered everywhere).
You should learn CELX. Then you could write you own scripts to do whatever you want!
- Hank
Posted: 16.10.2005, 20:28
by Cham
Sorry Hank, but I don't have time. I'm placing all my free time on other Celestia developments (models, textures, black holes)...
Please ?
Posted: 16.10.2005, 20:35
by hank
Cham wrote:Sorry Hank, but I don't have time. I'm placing all my free time on other Celestia developments (models, textures, black holes)...
Please ?
Well, I will probably fiddle around with this some more, and I'll let you know if I come up with something for you. But please understand that I can't make any guarantees.
- Hank