Index Page
cspice_pl2nvc
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_PL2NVC returns a unit normal vector and constant defining a 
   specified plane.

   For important details concerning this module's function, please refer to
   the CSPICE routine pl2nvc_c.

I/O


   Given:

      plane   a structure describing a SPICE plane. The structure has
              the fields:

                 normal:   [3-array double]
                 constant: [scalar double]

   the call:

      cspice_pl2nvc, plane, norm, const


   returns:

      normal     a double precision 3-vector

      constant   a double precision scalar

                 are, respectively, a unit normal vector and
                 constant that define the geometric plane
                 represented by 'plane'.  Let the symbol < a, b >
                 indicate the inner product of vectors a and b; then
                 the geometric plane is the set of vectors x in
                 three-dimensional space that satisfy

                    < x,  normal >  =  constant.

                 'normal' is a unit vector. 'constant' is the distance
                 of the plane from the origin;

                    constant * normal

                 is the closest point in the plane to the origin.

Examples


   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.

      ;;
      ;; A simple task, determine the distance of a plane
      ;; from the origin.
      ;;
      ;; Define the plane with a vector normal to the plan
      ;; and a point in the plane.
      ;;
      normal = [ -1.d,  5.d  , -3.5d ]
      point  = [  9.d, -0.65d, -12.d ]

      ;;
      ;; create the SPICE plane from the normal and constant.
      ;;
      cspice_nvp2pl, normal, point, plane

      ;;
      ;; Calculate the normal vector and constant defining
      ;; the plane. The constant value is the distance from
      ;; the origin to the plane.
      ;;
      cspice_pl2nvc, plane, normal, constant
      print, normal
      print, constant

   IDL outputs for normal:  -0.16169042  0.80845208  -0.56591646

   IDL outputs for constant:  4.8102899

      ;;
      ;; Confirm the results. Calculate a vector
      ;; from the origin to the plane.
      ;;
      vec = constant * normal

      ;;
      ;; Now calculate a vector in the plane from the
      ;; location in the plane defined by 'vec'.
      ;;
      plane_vec = vec - point

      ;;
      ;; These vectors should be orthogonal.
      ;;
      print, cspice_vdot( plane_vec, vec )

   IDL outputs:   -4.6903496e-15

   Zero, to double precision round-off, so orthogonal to that
   precision.

Particulars


   Icy geometry routines that deal with planes use the `plane'
   data type to represent input and output planes.  This data type
   makes the subroutine interfaces simpler and more uniform.

   The Icy routines that produce SPICE planes from data that
   define a plane are:

      cspice_nvc2pl ( Normal vector and constant to plane )
      cspice_nvp2pl ( Normal vector and point to plane    )
      cspice_psv2pl ( Point and spanning vectors to plane )

   The Icy routines that convert SPICE planes to data that
   define a plane are:

      cspice_pl2nvc ( Plane to normal vector and constant )
      cspice_pl2nvp ( Plane to normal vector and point    )
      cspice_pl2psv ( Plane to point and spanning vectors )

   Any of these last three routines may be used to convert this
   routine's output, 'plane', to another representation of a
   geometric plane.

Required Reading


   ICY.REQ
   PLANES.REQ

Version


   -Icy Version 1.0.1, 16-AUG-2010, EDW (JPL)

      Improved the I/O section. The section now meets NAIF standard 
      for Icy headers. Improved and Particulars section.

   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

Index_Entries


   plane to normal vector and constant




Wed Apr  5 17:58:02 2017