---------------------------------------------------------------------------
Finds the visible surfaces given a vertex and face list. Does
backface culling. Uses the infinite line method for determining
whether a point is within a polygon. The ordering of vertices is
consistent with Polygon.m
Includes a built-in demo.
---------------------------------------------------------------------------
Form:
[aV, cV, area] = HSRCAD( v, f, z, n, showScans )
---------------------------------------------------------------------------
------
Inputs
------
v (:,3) Vertex list
f (:,3) Face list
z (3,1) Unit vector to the source
n (1,1) Number of scan lines
showScans (1,1) Any argument will cause a plot to be drawn
-------
Outputs
-------
aV (1,:) Visible area per face
cV (3,:) Centroid for each face
area (n,n) Matrix showing the ID of the visible surface
0 means no surface is visible
---------------------------------------------------------------------------