Writing this article tooks me longer than the few lines of Povray code ...
- At first, you need a rectangular texture for the planet. For example, a map of the world:
I used a map from Wikipedia which is in the Public Domain. I had to polish it a little bit with Gimp :-)
- Next, you need some Povray code:
camera { location <0,0,-300> look_at <0,0,0> }
light_source {
<0,100,-400>
color rgb <1,1,1>
}
sphere {
<0,0,0> 100
pigment{
image_map {
gif "Weltkarte.gif"
map_type 1
}
}
rotate<0,clock*360,0>
}
Where "Weltkarte.gif" is the name of the rectangular texture from above. Put that code in a file called earth.pov. Certainly, you can choose another file name, but then don't forget to change the file name also in the ini file:
- Now, create a file earth.ini which will be used to render a lot of images from the file above:
Antialias=on
Antialias_Threshold=0.1
Antialias_Depth=2
Input_File_Name=earth.pov
Initial_Frame=1
Final_Frame=60
Initial_Clock=0
Final_Clock=1
Cyclic_Animation=on
Pause_when_Done=off
- Render the ini file:
povray earth.ini
This results in 60 PNG files, numbered from earth01.png to earth60.png. If you want more intermediate steps, increase the parameter "Initial_Frame" in the ini file. Here is one of the files:
- Last not least, use the famous convert command from ImageMagick to combine the png files into one GIF animation:
convert *png earth.gif
And here you are:
Now its on you: add the moon, the sun or other planets to complete the solar system. Or, if you have a really performant computer, create a whole galaxy ...