Page 1 of 1

Orientation Again

Posted: 04.08.2008, 15:17
by BobHegwood
Just a quick note here concerning planets with retrograde rotations...

I have been playing with a revised Venus Tour, and I have noticed that when I use the CEL GOTO command, Venus remains oriented as it should.
It used to be that this function would cause the planet to be displayed upside-down. In other words, Venus would be rotating in the wrong direction.
It seems that Chris has repaired this particular bug now, and I'd just like to say "Thanks" for that. :wink:

Now though, it seems as if the same problem has not been repaired when using a GOTOLONGLAT command in a CEL script. If I get to Venus via GOTO, and then try to get
to a particular location using the GOTOLONGLAT command, Venus again turns itself upside-down. Am I stating this correctly here?

Is this another fix needed? Or, should I just live with it?

Thanks, Bob

Re: Orientation Again

Posted: 04.08.2008, 16:01
by BobHegwood
Here's a quick test script which you can use to see what I mean here...

Code: Select all

{
select {object "Sol/Venus"}
center {time 5.0}
wait {duration 5.0}
goto {time 5.0 distance 5.0}
wait {duration 5.0}
follow {}
print {text "Welcome to Venus!" row -4 column 1 duration 5.0}
wait {duration 7.0}
renderflags {clear "cloudmaps"}
gotolonglat {time 5.0 distance 3.0 longitude -135.0 latitude 35.0}
wait {duration 5.0}
print {text "Now I'm upside-down!" row -4 column 1 duration 5.0}
wait {duration 7.0}
}


Thanks, Bob

Re: Orientation Again

Posted: 05.08.2008, 16:24
by BobHegwood
No one knows what's going on here? :roll:

Re: Orientation Again

Posted: 05.08.2008, 17:48
by selden
If you care about the orientation of the viewpoint, you probably should consider including an "up" argument for goto or gotolonglat, which specifies the direction of the "up vector" for the goto's viewpoint.

up vector (default vector = [ 0 1 0 ])

My guess is that the following may produce the result you seem to want:

Code: Select all

gotolonglat {time 5.0 distance 3.0 longitude -135.0 latitude 35.0 up [0 -1 0] }

Re: Orientation Again

Posted: 05.08.2008, 19:11
by BobHegwood
selden wrote:If you care about the orientation of the viewpoint, you probably should consider including an "up" argument for goto or gotolonglat, which specifies the direction of the "up vector" for the goto's viewpoint.

up vector (default vector = [ 0 1 0 ])

My guess is that the following may produce the result you seem to want:

Code: Select all

gotolonglat {time 5.0 distance 3.0 longitude -135.0 latitude 35.0 up [0 -1 0] }

As always, thanks very much Selden.
Had no idea that this was even an option. Where can I keep up with changes like this?
I have never had to do this on any other planet either, so my confusion was caused by ignorance on my part I guess. :roll:
The default GOTO behavior is is not a bug?
Was this change made when Chris fixed the original GOTO problem?

Thanks again, Bob

Re: Orientation Again

Posted: 05.08.2008, 19:28
by selden
Bob,

I dunno if or when Chris might have made any change in the default up vector. Sorry.

Re: Orientation Again

Posted: 05.08.2008, 19:43
by BobHegwood
selden wrote:Bob,

I dunno if or when Chris might have made any change in the default up vector. Sorry.

Nope, my fault as usual...
I apologize, but I simply did not know that this capability even existed in Celestia's CEL scripting now.
Obviously, the scripting guides need to be updated. <sigh>

Again, thanks VERY much for this information. Your solution works perfectly. :)
Many thanks to Chris for the changes too. This is great! :D

Re: Orientation Again

Posted: 07.08.2008, 10:46
by Adirondack
BobHegwood wrote:I apologize, but I simply did not know that this capability even existed in Celestia's CEL scripting now.
Obviously, the scripting guides need to be updated. <sigh>
Bob,

the 'up' directive is not new! :D
I do know it at least since 1.3 ...
Take a look in Don's scripting guide ('goto' = page 25 & 'gotolonglat' = page 30) and then you will look :o

Adirondack

Re: Orientation Again

Posted: 07.08.2008, 14:01
by BobHegwood
Adirondack wrote:the 'up' directive is not new! :D
I do know it at least since 1.3 ...
Take a look in Don's scripting guide ('goto' = page 25 & 'gotolonglat' = page 30) and then you will look :o

Adirondack
Well, I'll be damned...
Okay, so now you know why I'm Brain-Dead I guess. Apparently, I never had any need for it, or no one ever understood what I meant
by Venus being "upside-down." Only Selden can understand this Bozo I guess. :wink:

That's alright though. It only took me four years to figure it out. :)

EDIT:
By the way, something WAS done for Venus and the approach to it via GOTO, because even this command used to cause Venus to be displayed upside-down
once you arrived at the planet. That's why my old script used the orbit function to re-right the planet prior to starting the tour. Just FYI... :wink: