Date: Mon, 16 Dec 1996 22:11:34 GMT Server: NCSA/1.5 Content-type: text/html Last-modified: Fri, 01 Mar 1996 15:08:15 GMT Content-length: 7367 CS418 Lab 3

CS 418: Laboratory 3

Transformations and Modeling

Introduction.
This exercise introduces the processes of geometrically transforming an object in size, orientation, and location, then combining objects to make a complex scene. There are several example programs given below to show you how to combine objects and animate them. Based on these examples, you will be asked to construct a short animation.
Procedure:

First you may want to download several example files. To do this, click on each of the filenames shown below. When the text window opens, use the "save as" option to put the file in your own directory. Name each file with the same name as shown below. If you decide not to look at all of them, you may load them in pairs of *.net and *.cfg. The program polyhedra-unit.net reads a data file polyhedra-unit.dx. You will need to change the path name in the Import module in the program to reflect the directory in which you copy polyhedra-unit.dx. The programs windmill.net and cubeflake.net also require the data file polyhedra-unit.dx.

The first program is an example which shows how to scale, rotate and translate an object. Open the program transform.net and it's control panel and execute it while changing the rotation, translation, and scaling of the simple object (see Image 1 ). The program also allows you to select whether the translate control transforms the object before the scaling and rotation or after them. Note that as you rotate the object, that a positive angle of rotation corresponds to counterclockwise rotation if you are looking down the positive axis of rotation toward [0,0,0]. The object is defined to have the base of the arrows at [0,0,0] so that the scale operation magnifies the objects, but does not move the base. Likewise, the rotate operation (which rotates around the origin) leaves the base at the origin if translation is performed last. Investigate the effects of changing the order of the rotate, translate, and scaling operations by using the operation order control and by modifying the program module order.

Image 1

The second program, windmill.net, is an example of a hierarchically modelled, animated object (see Image 2) . The object is a windmill constructed from a propellor and a tower. The propellor, in turn, is make up of two blades, a hub and a shaft. Open the sequencer and run the program. The QuadricSurface module gererates spheres, cylinders, and other shapes. The shape is set by an integer. The shape list may be found by double- clicking the QuadricSurface module, then clicking on the "Description..." button. The import module reads the vertex list of a cube from polyhedra-unit.dx. Edit the file to see what else is there. Rotation of the whole tower is controlled by a compute module with a conditional in it to delay rotation.

Image 2

The third example program, cubeflake.net, combines polyhedra to make an interesting object (see Image 3). Open the control panel and run the program using the sequencer. Note how multiple copies of objects are positioned.

Image 3

Other Lab 3 demonstration nets: polyhedra-unit.net (see Image 4), rose.net (see Image 5).

Image 4

Image 5


Assignment:

Using the three example programs as background, construct one of the objects described below. Use the various modules in the "macros" category which produce shapes, such as NewQuadricSurface. Also use the shapes defined in the polyhedra-unit.dx file. Animate the resulting objects as specified. The animation should be 20 to 100 frames in length. A small Image window size (perhaps 320x240) will speed execution.

Construct one of:

  1. A helicopter with fuselage, tail, skids, main rotor and tail rotor. The tail rotor should rotate twice as fast as the main rotor. The helicopter should sit on the ground until the blades are spinning, then fly straight up.
  2. A propellor airplane on which the propellors rotate at the same rate. The plane should have wings, tail, engines, and a cockpit canopy. The plane should sit on the ground until the blades are spinning then roll forward and up.
  3. A flowering plant with stem, leaves, and flower. The plant should grow and bloom. The flower should be constructed from several petals. There must be at least two leaves on the plant.
  4. A robot with a head, body, arm(s) and at least two wheels. The robot must roll forward, stop, grasp an object and move it. The head must have eyes (or cameras) which move together.
  5. A bird landing on a tree. The bird must have wings, head, eyes, beak and feet. The wings must flap and the feet must move as the bird lands.

Some examples from 1995.

Some examples from 1996.

Be prepared to demo your animation during section for a maximum of 15 minutes. You will be graded on the correctness of the animation and the readability of the program. You may want to MPEG compress your animation for rapid playback, or if you wish to submit it to the course web pages.

You must document your code! Layout small groups of modules which fit on one screen and connect them to other groups with transmitters. You should use transmitters/receivers, macros, and comments in the "Notation" field of each module so that you and the grader can understand the program. Control panels, if any, should be well organized, labeled, and with the appropriate numeric ranges.

The Lab 3 grading guide will be filled out by a consultant during section to evaluate your work.

Back to Main Page
Go to Lab 4


Last modified, 1/23/96, B. Land.
Copyright Statement