Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

XVOL-AVERAGE-POINT-NORMALS

source files: xvol.[ch]

SYNTAX

(XVOL-AVERAGE-POINT-NORMALS
  :THING <thing>
[ :ITERATIONS 1 ]
[ :WEIGHT 1.0   ]
)

DESCRIPTION

This function can be used to `smooth' an object by averaging its surface normals. It operates on the :POINT-NORMAL-X/Y/Z arrays of `thing'. The thing's vertex normals are set to be a weighted average of their current value and that of their neighbors, according to the formula:

new = (1 - weight) * old +
           weight  * average(neighbors)

The `iterations' keyword specifies how many times the normals should be averaged. Increasing this number will lead to smoothing over larger regions of the object's surface.

The current implementation handles only triangles.

Note: this function really belongs in the thinglist code, not XVOL.


Go to the first, previous, next, last section, table of contents.