CS184 Lecture 5 summary

Notes on the lab:
To submit the lab, create a directory called lab1. Then put the main VRML file in a file called "lab1.wrl" in the lab1 directory. Include any other files that lab1.wrl loads. To submit, cd to the lab1 directory and type "submit lab1".

The HP machines now have a VRML browser called "vrwave". To invoke it, login to a HP machine and type "vrwave". Unfortunately, the program often suffers from Bus errors when loading. Try setting xhost + or starting and then stopping another memory intensive program (like Netscape) before you invoke vrwave. Eventually, it should start.

To load the models used in lectures from an instructional machine, cd to the directory ~cs184/public_html. The lectures and models are in directories names "lec2", "lec3" etc.

Extrusions: Building models using transformations

One of the most useful 3D model types is the extrusion. An extrusion consists of:

Aside: In computer vision, the concept of extrusion or generalized cylinder is considered by some the most natural way to represent objects.

A natural first idea is to use a circular cross-section and a circular spine. The cross-section is automatically kept normal to the direction of the spine. This gives us a Torus.

By building some extruded circular shapes and adding scaling along the axis, we can create a horn. Scaling can be specified in both directions normal to the spine.

Using a spiral spine and circular cross-section, we can create a spring model.

The last option for Extrusions is setting the orientation of the spine as a function of distance along the spine. Note that spine direction is treated as the Y-axis for the rotation. Examples: a double helix, a vase from the Textbook, and a twisted cube from the text.

Elevation Grids: A 3D plotting tool

An elevation grid is a regular X-Z grid (remember Y is up in VRML) of points with a height plotted in the Y direction.

e.g. a 7x7 array of random values generates a rough terrain.

Plotting 2D sinusoids can simulate droplet splashes.