Panda3D Manual: Sample Programs: Solar System

The Solar System Sample Program

To run a sample program, you need to install Panda3D. If you're a Windows user, you'll find the sample programs in your start menu. If you're a linux user, you'll find the sample programs in /usr/share/panda3d.

Screenshots

Image:Screenshot-Sample-Programs-Solar-System.jpg

Explanation

This sample program shows planets orbiting around the sun, and a moon orbiting one of the planets. If you just stare at the moon, you'll realize that its motion is a spiral:

Image:Spirograph.gif

The motion of the moon is only simple if you think about it in relative terms: the moon is moving in a circle relative to the planet, and the planet is moving in a circle relative to the sun.

This panda program shows how to implement relative movement and relative positioning.

Back to the List of Sample Programs:

Sample Programs in the Distribution