Circular orbit script
-
Topic authorchris
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 23 years 1 month
- Location: Seattle, Washington, USA
Circular orbit script
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.celx
Place 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
http://www.celestiaproject.net/~claurel/celest ... orbit.celx
Place 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
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 20 years
Re: Circular orbit script
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?)
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?)
-
Topic authorchris
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 23 years 1 month
- Location: Seattle, Washington, USA
Re: Circular orbit script
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
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.
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.
"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!"
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 20 years
Re: Circular orbit script
It's me or after a time the script stop by itself?
Last edited by ElChristou on 21.09.2008, 18:36, edited 1 time in total.
Re: Circular orbit script
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

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

"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 20 years
Re: Circular orbit script
ElChristou wrote:It's me or after a time the script stop by itself?
No one confirm? (it's a problem from my side?)
-
Topic authorchris
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 23 years 1 month
- Location: Seattle, Washington, USA
Re: Circular orbit script
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
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 20 years
Re: Circular orbit script
chris wrote: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.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
--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

"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 20 years
Re: Circular orbit script
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?
Chris, what about a duration? if set to zero it will be constant, else it will stop smoothly after the time indicated. Possible?
-
Topic authorchris
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 23 years 1 month
- Location: Seattle, Washington, USA
Re: Circular orbit script
ANDREA wrote:chris wrote: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.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
--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
Thank you for your sincerity, Chris, very appreciated.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

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

Last edited by ANDREA on 22.09.2008, 17:53, edited 1 time in total.
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO
-
Topic authorchris
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 23 years 1 month
- Location: Seattle, Washington, USA
Re: Circular orbit script
ANDREA wrote:Thank you for your sincerity, Chris, very appreciated.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![]()
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
Thank you Chris, I'm happy you agree on this.chris wrote: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.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
--Chris
Let's hope that in the future a VERY KIND guy will write it.

Bye
Andrea

"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO