Introduction to Computer Graphics
CSE 470
Arizona State University

Instructor: Dianne Hansford
Teaching Assistant: Robby Walker

Spring Semester 2005
Monday & Wednesday, 3:15 -- 4:30pm, BYAC 210

reference material
project 1: into space!
Purpose
This project has been designed for you to get experience with the following basic computer graphics concepts.
  • Writing a graphics program
  • Coordinate transformations: world, viewport, window
  • Modeling transformations in 2D: rotate and translate
  • Animation
  • Basic interaction: menus, keyboard, mouse
  • Viewports
  • Display lists
  • Primitives
  • Preserving the aspect ratio: window resizing will not deform your world geometry
Overview

Design a space scene with you as pilot of your spacecraft. Your window will be split in two: the bottom view will be your spacecraft's control panel and the top will be your view into space. You will choreograph an interesting space scene animation involving planets, moons, stars, spacecraft, and such. From your control panel, you will be able to start and stop the animation or create a special effect. A pop-up menu will be available for additional functionality. See below for details.

Please note: After reviewing the functionality specifications below, if you have questions, please direct them to Robby. If you feel anything is unclear, please check with him, as unmet specifications will result in lost points.

Required Functionality

Here are the elements that your program must have. Despite this "laundry list" of requirements, there is a lot of room for creativity!

  • Use two viewports -- one for the space view and one for your spacecraft's control panel. (It seems to make the most sense if your controls are at the bottom of the window, but if you have a different idea, that's ok too.)
  • Make at least five unique 2D objects that will appear in the space view. These can be planets, stars, spacecraft, etc. Each shall be defined with vertices and triangles -- be creative and create neat objects. Using funtions such as gluTeapot or gluDisk will not be accepted in this count of objects.
  • Use display lists to store each object that will be displayed.
  • Create a choreography for the space scene that lasts at least 10 seconds, and then have the choreography repeat itself. Guidelines on this choreography include the following.
    • You must use glRotatef and glTranslatef.
    • You must demonstrate a "double orbit": A moon rotating about a planet which rotates about the sun.
    • You must demonstrate a "static orbit": An object rotates about another one without rotating itself. (Consider rotating the upright letter 'A'. A normal orbit would cause the letter to turn on its side, upside down, etc. A static orbit on the other hand will keep the 'A' upright. ) This effect must be made visible by applying it to an object with a coloration or shape variation.
    • Have a variety of other motions -- make it interesting. (For example, try a spiral motion!)
  • Your spacecraft's control panel viewport must include the following.
    • the control panel of your ship
    • stop and animate buttons in this control panel (try to make it clear with a nice icon),
    • a "special effects" button -- something special happens in the space viewport when you click on this (more details on the level of difficulty necessary here next week!) and,
    • you can use text if you would like -- see the classnotes for using bitmapped fonts. (This is optional!)
  • Have a pop-up menu (that appears when you right-click the mouse button) with the choices of quit or a pick animation speed submenu. In this submenu, allow for slow, medium, and fast.
  • If the user reshapes the window, the geometry should not deform.
 
Grading

To come!

Points Functionality
 
Tips & Updates

General

First, if you are having problems, ask for help! Robby has plenty of office hours. I am available too. However, don't plan on us to be online 24/7 -- particularly on the weekend before the project is due.

Review the Project Guidelines.

Creating Animation

The sample programs illustrate one way to do animation, namely incrementing some variable in the Idle callback. GLUT offers a timer function, and this is another possibility for animation. See the GLUT documentation for the use of this function. It is your choice of how to animate.

Multiple Viewports

Your program will differ from the sample programs in that you will use multiple viewports. You need to re-think the positioning of the gluOrtho2D, glViewport, and glMatrixMode commands.