Page 1 of 1
Circular orbit script
Posted: 20.09.2008, 01:41
by chris
Here's a useful little script that makes the viewer orbit the currently center object (that is, whatever it is you're following, sync orbiting, etc.)
http://www.celestiaproject.net/~claurel/celest ... orbit.celxPlace it in your scripts folder, start Celestia, activate it (the title is 'Orbit an object'), then sit back and enjoy. When you've had enough, press ESC to regain keyboard and mouse control of the view. The very last line of the script is this:
orbit_object(30)
30 is the number of seconds it will take for each revolution. If you want a more 'stately' motion, change the value to 60 or even higher. I find this script very useful for demos. I keep two versions--one with a 30 second period, the other 60 seconds--in my scripts folder now.
--Chris
Re: Circular orbit script
Posted: 20.09.2008, 06:37
by ElChristou
Nice!
The commented idea of a smooth acceleration in the code is nice; why not implementing it?
Also if I select and object without following, the script won't work. Perhaps a bit of code could automatically turn on the follow attribute?
What about a slightly change of the angle of the orbit during rotation? (this way one would see after a few seconds all the sides of a body?)
Re: Circular orbit script
Posted: 20.09.2008, 21:30
by chris
ElChristou wrote:Nice!
The commented idea of a smooth acceleration in the code is nice; why not implementing it?
Also if I select and object without following, the script won't work. Perhaps a bit of code could automatically turn on the follow attribute?
What about a slightly change of the angle of the orbit during rotation? (this way one would see after a few seconds all the sides of a body?)
Christophe,
Thanks for the feedback. I uploaded a new version of the script that uses the currently selected object as the center if there's no followed object. I've also enabled the smooth acceleration. I deliberately restricted the orbit to a plane, though a different version of the script with a changing orbit plane could also be useful.
--Chris
Re: Circular orbit script
Posted: 20.09.2008, 23:47
by Cham
Chris,
this script would be better if there was also a smooth transition between the initial state of the object on screen, and its final *centered* state on screen. Currently, it's too abrupt.
Also, it would be better if it allows the user to interactively change the orbit orientation (using right-mouse on the object). Currently, it's locked and can't be changed until we cancel the script.
Re: Circular orbit script
Posted: 21.09.2008, 07:04
by ElChristou
It's me or after a time the script stop by itself?
Re: Circular orbit script
Posted: 21.09.2008, 09:45
by ANDREA
Sorry, probably I'm missing or misunderstanding something here.
For what I understand, I obtain exactly the same result as follows:
1- in celestia.cfg I set RotateAcceleration 10.0 (this in what I use always, BTW);
2- after clicking e.g. 3 anf G so the Earth is centered on the screen, I push Shift+rightarrow, and I have a smooth orbit around it;
3- moreover I can use right mouse click to orient the object at will.
This script makes a different thing?
Just a doubt, sorry.
Bye
Andrea

Re: Circular orbit script
Posted: 21.09.2008, 18:48
by ElChristou
ElChristou wrote:It's me or after a time the script stop by itself?
No one confirm? (it's a problem from my side?)
Re: Circular orbit script
Posted: 22.09.2008, 00:07
by chris
ANDREA wrote:Sorry, probably I'm missing or misunderstanding something here.
For what I understand, I obtain exactly the same result as follows:
1- in celestia.cfg I set RotateAcceleration 10.0 (this in what I use always, BTW);
2- after clicking e.g. 3 anf G so the Earth is centered on the screen, I push Shift+rightarrow, and I have a smooth orbit around it;
3- moreover I can use right mouse click to orient the object at will.
This script makes a different thing?
Just a doubt, sorry.
Bye
The script allows you to orbit around an object at rates different than what show get with shift+arrows. And, you don't need to hold any keys down, which is convenient for my usage.
--Chris
Re: Circular orbit script
Posted: 22.09.2008, 06:25
by ElChristou
So... why the hell do the script stop on my config??

Re: Circular orbit script
Posted: 22.09.2008, 06:44
by ANDREA
chris wrote:ANDREA wrote:Sorry, probably I'm missing or misunderstanding something here.
For what I understand, I obtain exactly the same result as follows:
1- in celestia.cfg I set RotateAcceleration 10.0 (this in what I use always, BTW);
2- after clicking e.g. 3 anf G so the Earth is centered on the screen, I push Shift+rightarrow, and I have a smooth orbit around it;
3- moreover I can use right mouse click to orient the object at will.
This script makes a different thing?
Just a doubt, sorry.
Bye
The script allows you to orbit around an object at rates different than what show get with shift+arrows. And, you don't need to hold any keys down, which is convenient for my usage.
--Chris
OK, you are right but, sorry if I'm insisting on this, Chris, this .cel line doesn't obtain the same result?
Code: Select all
orbit {axis [0 1 0] rate 6.0 duration 60.0}
I feel so, but probably I'm wrong, so just trying to understand.
Bye and thank you.
Andrea

Re: Circular orbit script
Posted: 22.09.2008, 07:14
by ElChristou
Andrea, you won't have smooth acceleration with the cel script.
Chris, what about a duration? if set to zero it will be constant, else it will stop smoothly after the time indicated. Possible?
Re: Circular orbit script
Posted: 22.09.2008, 16:52
by chris
ANDREA wrote:chris wrote:ANDREA wrote:Sorry, probably I'm missing or misunderstanding something here.
For what I understand, I obtain exactly the same result as follows:
1- in celestia.cfg I set RotateAcceleration 10.0 (this in what I use always, BTW);
2- after clicking e.g. 3 anf G so the Earth is centered on the screen, I push Shift+rightarrow, and I have a smooth orbit around it;
3- moreover I can use right mouse click to orient the object at will.
This script makes a different thing?
Just a doubt, sorry.
Bye
The script allows you to orbit around an object at rates different than what show get with shift+arrows. And, you don't need to hold any keys down, which is convenient for my usage.
--Chris
OK, you are right but, sorry if I'm insisting on this, Chris, this .cel line doesn't obtain the same result?
Code: Select all
orbit {axis [0 1 0] rate 6.0 duration 60.0}
I feel so, but probably I'm wrong, so just trying to understand.
Bye and thank you.
That cel script is very similar to what my script does. I dislike cel so much that I've forgotten what commands are present

The celx script offers quite a bit more flexibility though. You can have smooth acceleration, modify the distance to the viewer, etc.
--Chris
Re: Circular orbit script
Posted: 22.09.2008, 17:20
by ANDREA
chris wrote:...That cel script is very similar to what my script does. I dislike cel so much that I've forgotten what commands are present

The celx script offers quite a bit more flexibility though. You can have smooth acceleration, modify the distance to the viewer, etc. --Chris
Thank you for your sincerity, Chris, very appreciated.
Obviously I know that celx has a lot of functions that cel will never allow but, as we say here, "just a little is better than nothing at all", so, being absolutely unable to understand the logics that are beyond the celx language (surely for my fault, but may be that something is due to the various manuals, cryptic for me because IMHO they are addressed to programming involved people, more than to absolute newbies, as they should be).
I would be VERY HAPPY to be able to learn how to use celx scripting, but without a simpler manual, starting from the simplest things, it's impossible for me, alas!
On the contrary cel scripting, even with all the missing features, is much simpler and user friendly.
Just my opinion, obviously.
Thank you, Chris.
Bye
Andrea

Re: Circular orbit script
Posted: 22.09.2008, 17:31
by chris
ANDREA wrote:chris wrote:...That cel script is very similar to what my script does. I dislike cel so much that I've forgotten what commands are present

The celx script offers quite a bit more flexibility though. You can have smooth acceleration, modify the distance to the viewer, etc. --Chris
Thank you for your sincerity, Chris, very appreciated.
Obviously I know that celx has a lot of functions that cel will never allow but, as we say here, "just a little is better than nothing at all", so, being absolutely unable to understand the logics that are beyond the celx language (surely for my fault, but may be that something is due to the various manuals, cryptic for me because IMHO they are addressed to programming involved people, more than to absolute newbies, as they should be).
I would be VERY HAPPY to be able to learn how to use celx scripting, but without a simpler manual, starting from the simplest things, it's impossible for me, alas!
On the contrary cel scripting, even with all the missing feattures, is much simpler and user friendly.
Just my opinion, obviously.
Thank you, Chris.
Bye
No disagreement Andrea: we need much better documentation for celx. The reference manual is important, but it's not enough to help a non-programmer learn celx. A standard 'helper library' for celx could also simply some things.
--Chris
Re: Circular orbit script
Posted: 22.09.2008, 17:48
by ANDREA
chris wrote:ANDREA wrote:....may be that something is due to the various manuals, cryptic for me because IMHO they are addressed to programming involved people, more than to absolute newbies, as they should be).

I would be VERY HAPPY to be able to learn how to use celx scripting, but without a simpler manual, starting from the simplest things, it's impossible for me, alas! On the contrary cel scripting, even with all the missing features, is much simpler and user friendly.
Thank you, Chris. Bye Andrea
No disagreement Andrea: we need much better documentation for celx. The reference manual is important, but it's not enough to help a non-programmer learn celx. A standard 'helper library' for celx could also simply some things.
--Chris
Thank you Chris, I'm happy you agree on this.
Let's hope that in the future a
VERY KIND guy will write it.
Bye
Andrea
