cannot Orbit the way I wish, getting crazy! help

All about writing scripts for Celestia in Lua and the .cel system
Topic author
m3ntol
Posts: 29
Joined: 23.02.2008
With us: 16 years 11 months
Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster

cannot Orbit the way I wish, getting crazy! help

Post #1by m3ntol » 23.02.2008, 23:15

Hi,
I've started with celestia scripts two days ago. I'm trying to make a simple tour, it's almost done but the last point doesn't work!

1. start in the Earth, make some orbits to the equator (Earth looks south to north as usual) (ok)

2. Move far away, out of the galaxy (I've used the changedistance script, very powerful) (ok)

3. make some orbits around the Milky Way (ok)

4. return Earth and orbit again the equator (BAD, why)

The 4th point orbits in any direction, Earth it's not oriented South-North as usual. I've tryed to use lot of commands but no way.

This is my script

Code: Select all

{

 set { name "FOV" value 50.0 }
   timerate { rate 0 }
   labels { clear "planets|minorplanets|stars|constellations" }
   renderflags { set "stars|planets|cloudmaps"
                      clear "constellations|orbits" }

 select { object "Sol/Earth" }

   center { time 5 }
   wait { duration 5 }

   goto { time 5 distance 5 upframe "equatorial" up [0 1 0] }
   wait { duration 5 }

   orbit { axis [ 0 1 0 ] rate 30 duration 16.0 }

   changedistance { duration 10.0 rate 3.2 }
   select { object "Milky Way" }

   orbit { axis [ 1 0 0 ] rate 30 duration 16.0 }


   select { object "Sol/Earth" }
   goto { time 20 distance 5 upframe "equatorial" up [0 1 0] }
   wait { duration 20 }
   orbit { axis [ 0 1 0 ] rate 30 duration 16.0 }

   wait { duration 3.0 }

}


what I'm doing wrong?

Thanks

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 8 months
Location: Rome, ITALY

Re: cannot Orbit the way I wish, getting crazy! help

Post #2by ANDREA » 24.02.2008, 00:19

m3ntol wrote:Hi,
I've started with celestia scripts two days ago. I'm trying to make a simple tour, it's almost done but the last point doesn't work!
1. start in the Earth, make some orbits to the equator (Earth looks south to north as usual) (ok)
2. Move far away, out of the galaxy (I've used the changedistance script, very powerful) (ok)
3. make some orbits around the Milky Way (ok)
4. return Earth and orbit again the equator (BAD, why)
The 4th point orbits in any direction, Earth it's not oriented South-North as usual. I've tryed to use lot of commands but no way.
This is my script:
what I'm doing wrong?
Thanks


Hello m3ntol, simply you forgot to tell to Celetsia to go to the Milky Way.
This works:

{
set { name "FOV" value 50.0 }
timerate { rate 0 }
labels { clear "planets|minorplanets|stars|constellations" }
renderflags { set "stars|planets|cloudmaps"
clear "constellations|orbits" }

select { object "Sol/Earth" }

center { time 5 }
wait { duration 5 }

goto { time 5 distance 5 upframe "equatorial" up [0 1 0] }
wait { duration 5 }

orbit { axis [ 0 1 0 ] rate 30 duration 16.0 }

changedistance { duration 10.0 rate 3.2 }
select { object "Milky Way" }

goto { time 5 distance 5}
wait { duration 5 }

orbit { axis [ 1 0 0 ] rate 30 duration 16.0 }

select { object "Sol/Earth" }
goto { time 20 distance 5 upframe "equatorial" up [0 1 0] }
wait { duration 20 }
orbit { axis [ 0 1 0 ] rate 30 duration 16.0 }
wait { duration 3.0 }
}


A suggestion: for Milky Way try this command:
orbit { axis [ 1 1 1 ] rate 30 duration 16.0 }
It's much more "Dynamic", IMHO.
Enjoy! :wink:
Bye

Andrea :D
"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

Topic author
m3ntol
Posts: 29
Joined: 23.02.2008
With us: 16 years 11 months
Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster

Post #3by m3ntol » 24.02.2008, 11:56

Thanks Andrea
I've try your solution but it doesn't work :(

When the view return to Earth and starts to Orbit, Earth orientation is not South-North.

Finally I've found the solution. Instead of use goto 've used gotolonglat. If fct I've used both because it's more impressive. This is the final script.

Code: Select all

{

  set { name "FOV" value 50.0 }
  set { name "AmbientLightLevel"       value 0.0 }
   timerate { rate 0 }
   labels { clear "planets|minorplanets|stars|constellations" }
   renderflags { set "stars|planets|cloudmaps"
                      clear "constellations|orbits" }

select { object "Sol/Earth" }
   center { time 5 }
   wait { duration 5 }
        goto { time 5 distance 5 upframe "equatorial" up [0 1 0] }
   wait { duration 5 }
   orbit { axis [ 0 1 0 ] rate 30 duration 16.0 }
   
   changedistance { duration 10.0 rate 3.2 }
   select { object "Milky Way" }
   center { time 1 }
   wait { duration 1 }
   goto {time 1 }
   wait { duration 1 }
   orbit { axis [ 1 1 1 ] rate 30 duration 24.0 }

   select { object "Sol/Earth" }
   center { time 1 }
   wait { time 1 }
   goto { time 15 distance 5 upframe "equatorial" up [0 1 0] }
   wait { duration 15 }
   gotolonglat { time 1 distance 5 up [0 1 0] longitude 90 latitude 0 }
   wait { duration 1 }
   orbit { axis [ 0 1 0 ] rate 30 duration 16.0 }
   print { text "Demo completed." row -3}
   wait { duration 3.0 }

}

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 8 months
Location: Rome, ITALY

Post #4by ANDREA » 24.02.2008, 14:02

m3ntol wrote:Thanks Andrea
I've try your solution but it doesn't work :(
When the view return to Earth and starts to Orbit, Earth orientation is not South-North.
Finally I've found the solution. Instead of use goto 've used gotolonglat. If fct I've used both because it's more impressive. This is the final script.

Sorry, I misunderstood your problem, happy you found the solution.
Bye

Andrea :D
"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

Topic author
m3ntol
Posts: 29
Joined: 23.02.2008
With us: 16 years 11 months
Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster

Post #5by m3ntol » 25.02.2008, 08:51

Thanks anyway Andrea,
I'm happy to get my script working. :D


Return to “Scripting”