Date: Mon, 16 Dec 1996 22:12:07 GMT Server: NCSA/1.5 Content-type: text/html Last-modified: Fri, 09 Feb 1996 12:51:22 GMT Content-length: 4575 CS418 Lab 1

CS 418: Laboratory 1

Building a simple polygonal object.

Introduction.

The exercise is the design of geometric objects by describing their vertices and faces.


Procedure:

First you will need to download four 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.

After downloading the files, start DX then open the program MakePolyhedron.net and execute it. Be sure to open the control panel. You should see a tetrahedron in the Image window. The "options" menu in the Image window contains a "view control" item, which in turn contains a "Mode" menu. Experiment with rotating and zooming the tetrahedron. Use the control panel to choose a cube or octahedron shape. Note that the tetrahedron is defined interactively as a pair of "Vectorlists" interactors, but that the other two shapes are defined with list modules. Note also that any shape you make can be saved in a file to be used later in another program (which can Import the file). It it not necessary to understand the program logic at this point (that is, you don't need to know what the Options, construct or replace module does) but you must be able to modify the defined shapes.

The control panel has interactors to define the vertices and faces of a polyhedron. Edit the face list so that one of the faces in "inside out". Note that the "outward" face of a polygon is defined as the side you see if you traverse the vertices in a counter-clockwise direction. Edit the face list and vertex list to make a single triangle.

Open and execute the "2octahedron.net". Open the control panel and vary the color of one shape or the opacity of the other shape. Open the sequencer and click on the arrow to make a simple animation. Modify the Rotate module to animate around the Z axis. This net serves as a very brief introduction to animation. The image below shows one view generated by this program.


Assignment

Modify the program MakePolyhedron to make a cube with one face that opens to show a propellor inside. The propeller should be made of four equilateral triangles sharing one edge and oriented 90 degrees apart. You will probably want to use the interactive lists to design this object. The cube opening should be controlled by a sequencer and the opening should be proportional to a sinusoidal function of time. Each different object you define will need to be connected to its own set of "option, construct, replace" modules. For instance, you might make the propellor, cube (minus top) and the top as three objects which are then collected together. In this case you would need three sets of "option, construct, replace" modules. One of the inputs to the Color module is defined as "front colors" so that the back and front of objects will look different. For your modified program, change this parameter to "colors" so that both sides of objects will be colored. A single frame might look like the following image.

Be ready to demo and explain your cube animation program in section. You will have 10 minutes to do the demo. You should be ready to explain the function of every module in the program. Some attention will be paid to program layout. A very tangled, messy program will lose points.

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

Back to Main Page
Go to Lab 2


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