Date: Mon, 16 Dec 1996 22:09:03 GMT Server: NCSA/1.5 Content-type: text/html Last-modified: Mon, 12 Feb 1996 13:43:12 GMT Content-length: 6846 CS418 Lab 11

CS 418: Laboratory 11

Implicit Surfaces

Introduction.

In this lab you will investigate implicit surface generation. Implicit surfaces are generated by finding "level surfaces" in a 3D field. That is, by placing polygons in all of the voxels which have scalar data of a certain value. The surface descriptions often take forms familar from analytical geometry. For instance, a unit sphere at the origin is described by

x^2 + y^2 + z^2 - 1.0

when a surface is fit to the points in 3D which have a value of zero.


Procedure

Download:


The program heart.net takes as input an implicit function of x,y,z and forms an surface. The function is calculated at grid points, then polygonalized by isosurface rendering, assuming an isosurface value of zero. For example the formula

(2*x^2 + y^2 + z^2 -1)^3 - 0.2*x^2*z^3 - y^2*z^3

creates a heart-shaped object.

Different functions of x,y,z will produce different shapes. (Note that for different functions, you may have to modify the range limits of the space defined by the Construct module.) As an example, the following image was made by defining an implicit sphere in a separate module from the heart, then morphing between them by linearly intropolating between the two 3D fields. In this case, mixing .9 of the heart 3D field with 0.1 of the sphere 3D field. The sphere used was:

x^2 + y^2 +(z+.25)^2 -.5


The program SurfaceCombine.net shows how to combine two implicit surfaces to simulate the "union" operation as used in constructive solid geometry (see page 35 of Watt). Three new macros are used in this program; InitCSG, UnionCSG, and MakeCSGsurface. You can inspect (or modify) the macros using the "Open Selected Macro" option in the "Windows" menu of the visual program editor. The two cylinder surfaces are combined (in the UnionCSG macro) using a min(a,b) function so that the voxels which are in the interior of either cylinder are interior to the result. (Remember that an implicit function changes sign as the surface is crossed and that for the surfaces used here, that points inside have a negative value.) The image below is the result of the union of two cylinders.


The program blobby.net computes an implicit surface based on spherical fields of influence which can add together. See one of last year's student projects for more information on blobby functions. The spherical fields can have positive and negative field strengths. An example from blobby.net shows four positive spheres (transparent red) and two negative spheres (blue) which when summed together, then passed thorough an isosurface module produce the object shown to the right.


Assignment:

Execute the programs to understand their behavior, then modify them as follows:


Be prepared to demo the programs to show the torus generator, the CSG operations, the head you designed, and the grouped blobby program. The grader will exercise all interactors.

You should be able to explain your programs. 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 11 grading guide will be filled out by a consultant during section to evaluate your work.


Back to Main Page


Last modified, 10/20/95, B. Land.
Copyright Statement