CSPICE_PLTNRM computes an outward normal vector of a triangular plate.
The vector does not necessarily have unit length.
For important details concerning this module's function, please refer to
the CSPICE routine pltnrm_c.
Given:
v1,
v2,
v3 are 3vectors constituting the vertices of
a triangular plate.
the call:
cspice_pltnrm, v1, v2, v3, normal
returns:
normal is an outward normal vector of the plate defined by
the input vertices. The order of the vertices is
used to determine the choice of normal direction:
the normal vector is
( V2  V1 ) x ( V3  V2 )
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
Compute an outward normal of an equilateral triangle lying
in the XY plane and centered at the origin.
PRO PLTNRM_T
s = sqrt(3.D)/2.D;
v1 = [ s, 0.5D, 0.D]
v2 = [ 0.D, 1.D, 0.D]
v3 = [ s, 0.5D, 0.D]
cspice_pltnrm, v1, v2, v3, normal
print, 'NORMAL = ', normal
END
IDL outputs:
NORMAL = 0.0000000 0.0000000 2.5980762
This routine saves computation time by not scaling the output
vector to unit length. The caller can scale the vector using
the routine cspice_vhat.
ICY.REQ
DSK.REQ
Icy Version 1.0.0, 15DEC2016, ML (JPL), EDW (JPL)
compute normal vector of triangular plate from vertices
