Assignment 3 - Solar system

For this assignment you are going to make an animated simulation of a solar system.
There should be at least three components to your scene. A sun at the origin, a
planet orbiting the sun, and a moon orbiting the planet. The planet should
revolve around its axis as well as orbit the sun. Since this is an animation,
the scene should be constantly in motion. The mouse should be used to allow the
user to control the camera viewpoint. At the very least it should be possible to
change from an overhead view of the solar system to one looking parallel to the
plane of rotation. Although you must have the base components, you're encouraged
to add more components to your solar system, or more complicated ways to control
the camera. Be creative! (star, asteroids belts, more planets, more moons, moving
camera, etc are all pretty-looking addons once you get the simple system in place)
You should ideally be learning about:
- camera motion vs object motion
- nested transforms
- several objects with different transforms
Additional Notes:
- There should be a keyboard command to change from "sphere" mode
to "cube" mode on the solar system. (Its really hard for us to
tell if you handled spheres correctly since they're symmetric, we can see
the cubes rotate (or not) so its easier to grade. )
- You can use glutSolidSphere() and similar commands to draw spheres, cubes,
and several other shapes.
- The planets should be moved with modeling commands - glRotate, glTranslate,
etc.. (i.e. its no fair calculating where they go yourself and using a
single glTranslate to get them there. The moon will require several nested
transform commands in the right order)
- The camera should be moved with a viewing command - gluLookAt()
- The camera should be a perspective camera, use enough perspective that far
away planets look clearly smaller than closer planets, but not so much that
the whole thing looks distorted and weird. - gluPerspective, glFrustum,...
- Constant motion can be achieved with the glut idle() callback.
- OpenGL needs some lights to model your scene correctly. We'll give you a
TurnOnTheLights() function so you don't need to worry about it for this
assignment.
Resources:
- Lab presentation: assignment3_instruction.ppt (updated tuesday 10/18)
- Base code: celestius_base.tgz
- Demo program: celestius_demo.tgz
- One-stop-shop reference (ignore the python notes): PyOpenGL Man Page
- A good OpenGL lecture-style presentation: http://www.cs.virginia.edu/~gfx/Courses/2004/Intro.Spring.04/Lectures/lecture04.ppt