Page 1 of 1
How to see rotataing objects from TOP by CEL?
Posted: 03.12.2005, 13:09
by dejudicibus
I read several times the CEL Script Guide but I still have no idea how to generate very simple scenes by using scripts.
For example:
I would like to see a galaxy (or a star system) from top, being the galaxy (or planets) rotating around its center. A very simple scene, as if you moved away along an orthogonal axis to galaxy (or system) plane.
But how? I would like to do that for any galaxy or star system, not hardcoding absolute coordinates, but relatively to the selected target.
But how????? I am confused by so manu coordinate modes. I really do NOT understand them.
Posted: 03.12.2005, 13:42
by selden
To look down on the Earth from above the North Pole:
Code: Select all
{
select { object "Earth" }
wait { duration 2 }
gotolonglat { time 1 distance 10 longitude 0 latitude 90 }
wait { duration 2 }
}
Posted: 03.12.2005, 15:26
by dejudicibus
selden wrote:To look down on the Earth from above the North Pole:
Code: Select all
{
select { object "Earth" }
wait { duration 2 }
gotolonglat { time 1 distance 10 longitude 0 latitude 90 }
wait { duration 2 }
}
Thank you. I assume it works for any object.
Posted: 03.12.2005, 15:34
by dejudicibus
No, it does NOT work for any object....
I tried
Code: Select all
select { object "Sol/Earth"}
gotolonglat { time 4 distance 1 longitude 0 latitude 90 }
renderflags { set "orbits" }
wait { duration 1 }
tpo see the Earth rotating around the sun (at center) from top, but I see nothing. I really do NOT understand CEL language.
Posted: 04.12.2005, 14:22
by selden
Code: Select all
{
wait {duration 5 }
renderflags { clear "constellations|boundaries|automag|grid"
set "orbits|cloudmaps|galaxies|planets|stars|nightmaps" }
renderflags { set "markers|eclipseshadows|ringshadows|comettails|atmospheres" }
orbitflags { set "planet" clear "moon|asteroid|comet|spacecraft" }
select { object "Sol" }
gotolonglat { time 1 distance 1000 longitude 0 latitude 90 }
wait { duration 2 }
mark { object "Sol/Earth" size 20 color [1 0.5 0] symbol "triangle" }
select { object "Sol/Earth" }
follow {}
wait { duration 2 }
}
Posted: 06.12.2005, 10:49
by dejudicibus
Thank you, Selden. I tried your script and it works for Sol, apart that I had to change
to
. However, when I tried it with another star having planets, the view was no more from TOP, but slightly from side. I suspect that longitude and latitude refers strictly to our system, are they? How can I set the local longitude and latitude? For example, assume the other star is called
Senna and first planet is
Reta, here is my code:
Code: Select all
select { object "Senna" }
center { time 0 }
goto { time 5 distance 20 }
follow {}
wait { duration 5 }
goto { time 5 distance 200 longitude 0 latitude 90 }
renderflags { set "orbits" }
wait { duration 2 }
select { object "Senna/Reta" }
follow {}
wait { duration 5 }
It works, but not from the TOP perspective
Posted: 06.12.2005, 11:09
by dejudicibus
What I am looking for is a piece of code that works for ANY object. For example:
see galaxy A from top
see star B and planet C from top
see planet D and moons E and F from top
From top means orthogonal to orbit plane, whatever are the two or three (assuming they are on the same plane) object selected
I tried a lot of instructions and coordsys with NO result
Posted: 06.12.2005, 15:08
by selden
Sorry, I really can't help more than I have.
A fully generic subroutine would require CELX programming, which I haven't done. Maybe someone else can help.
Gotolonglat to position yourself above the body's pole is the simplest solution that I know.
Posted: 06.12.2005, 19:27
by cpotting
dejudicibus wrote:What I am looking for is a piece of code that works for ANY object. For example:
see galaxy A from top
see star B and planet C from top
see planet D and moons E and F from top
From top means orthogonal to orbit plane, whatever are the two or three (assuming they are on the same plane) object selected
I tried a lot of instructions and coordsys with NO result
Selden wrote:Sorry, I really can't help more than I have.
A fully generic subroutine would require CELX programming, which I haven't done. Maybe someone else can help.
Gotolonglat to position yourself above the body's pole is the simplest solution that I know.
_________________
Selden
I am at work right now (shhh!
My boss is away) I'll try to remember to write you up something once I get home tonight. Selden is right, it will take CELX to do what you want.
Correct me if the following assumptions are wrong:
a) If only one object is selected then view it from along its axis of rotation (eg. see Earth from above looks down on the north pole).
b) If a second object is chosen and it orbits the first then view them from along a line orthogonal to the orbital plane of the second object (e.g. see Earth and Moon shows the Moon's orbital plane at 90 degrees to the current view)
c) If the second object does not orbit the first, then use view a) for the first object (e.g. view Earth and Mars looks down from above the north pole)
d) If a third object is select then the view is from a line orthogonal to the plane described by the centres of the three objects.
e) More than 3 objects will not be allowed
Posted: 06.12.2005, 21:59
by jdou
Just my 2 cents.
In the last code given by dejudicibus I read :
Code: Select all
goto { time 5 distance 200 longitude 0 latitude 90 }
in place of :
Code: Select all
gotolonglat { time 5 distance 200 longitude 0 latitude 90 }
Can we use "goto" and "gotolonglat" for the same action ?
Posted: 06.12.2005, 22:55
by dejudicibus
cpotting wrote:...
Correct me if the following assumptions are wrong:
...
Well, not exactly, even if you are close. Hoever, if you have some time (little, do not worry) to share, please, write me to [ ddj (at) mclink (dot) it ] and I'll tell you what I am trying to do. I do not want to bother the other participants of this forum with a specific need that is not of general interest.
Posted: 06.12.2005, 23:00
by dejudicibus
jdou wrote:Just my 2 cents.
In the last code given by dejudicibus I read :
Code: Select all
goto { time 5 distance 200 longitude 0 latitude 90 }
in place of :
Code: Select all
gotolonglat { time 5 distance 200 longitude 0 latitude 90 }
Can we use "goto" and "gotolonglat" for the same action ?
My fault. It must be
gotolonglat .