source files: xvol.[ch]
(XVOL-AVERAGE-POINT-NORMALS :THING <thing> [ :ITERATIONS 1 ] [ :WEIGHT 1.0 ] )
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.