Page 1 of 1

How do you create a movie of a rotating galaxy?

Posted: 15.08.2010, 02:11
by eris
Hello all. New to the forums and Celestia.

My Question: I'm trying to create an animation of a rotating galaxy like M31 or the Milky Way from the side. Well not perfectly edge-on, but maybe having the galaxy tilted towards the viewer by about 15-20 degrees.

Here's what I'd like to do exactly:

1. Start at the bright core of the galaxy filling the entire display
2. Move backwards from the core as the galaxy is rotating
3. Stop at a distance where the galaxy fills about 75% of the display.
4. Continue to watch the rotation for a while from there.

I'm guessing I'll have to script this in Lua, which is okay because I happen to know Lua. What's more difficult is learning the Celestia API and how it works.

Maybe someone can suggest a script that does something very similar?

(PS: Ideally I could use a high res version of the Sombrero Galaxy, but I haven't found that in Celestia anywhere yet.)

Thanks

Re: How do you create a movie of a rotating galaxy?

Posted: 15.08.2010, 15:11
by selden
Unfortunately, the galaxies in Celestia don't rotate. You'd have to fake it.

One method might be to make your own model (or use one from the MotherLode) which "actually" is a rotating planet somewhere in deep space.

Depending on how much control you need, you could use a CEL script to do the camera positions. That'd be somewhat easier than a CelX (Lua) script, I think.

Re: How do you create a movie of a rotating galaxy?

Posted: 16.08.2010, 09:24
by jogad
Hello

Welcome eris

selden wrote:One method might be to make your own model
let me propose another track. (less elegant though, but quick)
Of course the galaxies don't rotate but the observer can :!:
My idea is to place a fake rotating star at the center of the Galaxy with its equator plane in the same plane than the galactic plane.
(with more than 200 bilions stars in the Galaxy, I hope nobody will complain for this little extra star :wink: )

If you place the observer in sync orbit away around this star, the galaxy is rotating is your reference frame.

I join a little "addon" to demonstrate this idea.
Unzip the .stc file in the extra directory and the CEL (not lua) sript in the script directory.

As you can see the script is very simple.

The first incommand places the observer in a sync orbit at at the proper distance to see the rotating galactic core.
Cel-URLs are an easy way to position the oberver at the chosen place. You determine your position and options in Celestia, record it by Ctrl-C and paste the position directly in your script.
Ater 3 seconds we move away for 10 seconds to have a view of the whole Galaxy.

I fact you can do that only with the keyboard and the mouse without scripting at all.
With this solution the tricky part is not the script but the STC file :?
:mrgreen:

Re: How do you create a movie of a rotating galaxy?

Posted: 16.08.2010, 10:34
by selden
If the observer is orbiting around the galaxy, then all of the background galaxies will seem to be moving, too, not just the galaxy you're watching. This might or might not be a problem, depending on how bright they are and the width of the field of view.