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-COMPUTE-UNNORMALIZED-FACET-NORMALS

source files: xvol.[ch]

SYNTAX

(XVOL-COMPUTE-UNNORMALIZED-FACET-NORMALS
  :THING <thing>
)

DESCRIPTION

For triangles, computes cross-product of the first two edges of each facet, and stores the result in the :FACET-NORMAL-X/Y/Z value for the facet. For quadralaterals, also computes cross-product of the last two edges of each facet, and adds them in.

Quadralateral support is not yet implemented.

You will normally want to call XVOL-SET-FACET-NORMALS-TO-UNIT-LENGTH afterwards.

Note that the magnitude of the cross-product of the first two edges of a triangle give twice its area, thus the final magnitude of :FACET-NORMAL-X/Y/Z will be twice the area of the facet.

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


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