Star Tour

General discussion about Celestia that doesn't fit into other forums.
Topic author
hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Star Tour

Post #1by hank » 16.10.2005, 16:33

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
Last edited by hank on 16.10.2005, 20:15, edited 1 time in total.

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Re: Star Tour

Post #2by t00fri » 16.10.2005, 17:23

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

Topic author
hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Re: Star Tour

Post #3by hank » 16.10.2005, 17:33

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

Topic author
hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Re: Star Tour

Post #4by hank » 16.10.2005, 17:37

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

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Post #5by t00fri » 16.10.2005, 17:46

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

Topic author
hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #6by hank » 16.10.2005, 18:31

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

Topic author
hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #7by hank » 16.10.2005, 18:40

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

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Post #8by ElChristou » 16.10.2005, 18:42

Hank, Tx for thoses script, they are really cool!! With the 2m stars database it's a real pleasure... :P
Image

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Post #9by t00fri » 16.10.2005, 19:10

Hank,

I suggest you also show some orbiting binaries , action, action... ;-) , not just the compagnons.


Bye Fridger

Topic author
hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #10by hank » 16.10.2005, 19:23

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

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #11by Cham » 16.10.2005, 19:29

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 ! ;-)
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Topic author
hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #12by hank » 16.10.2005, 19:39

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

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #13by Cham » 16.10.2005, 19:42

I used the last script above.

I'll try the other one.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #14by Cham » 16.10.2005, 20:01

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) ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Topic author
hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #15by hank » 16.10.2005, 20:11

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

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #16by Cham » 16.10.2005, 20:16

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).
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Topic author
hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #17by hank » 16.10.2005, 20:24

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

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #18by Cham » 16.10.2005, 20:28

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've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Topic author
hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #19by hank » 16.10.2005, 20:35

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


Return to “Celestia Users”