vprjp

 Procedure Abstract Required_Reading Keywords Declarations Brief_I/O Detailed_Input Detailed_Output Parameters Exceptions Files Particulars Examples Restrictions Literature_References Author_and_Institution Version

#### Procedure

```      VPRJP ( Vector projection onto plane )

SUBROUTINE VPRJP ( VIN, PLANE, VOUT )

```

#### Abstract

```     Project a vector onto a specified plane, orthogonally.
```

```     PLANES
```

#### Keywords

```     GEOMETRY
MATH
PLANE
VECTOR
```

#### Declarations

```
INTEGER               UBPL
PARAMETER           ( UBPL   =   4 )

DOUBLE PRECISION      VIN   (    3 )
DOUBLE PRECISION      PLANE ( UBPL )
DOUBLE PRECISION      VOUT  (    3 )

```

#### Brief_I/O

```     Variable  I/O  Description
--------  ---  --------------------------------------------------
VIN        I   Vector to be projected.
PLANE      I   A SPICELIB plane onto which VIN is projected.
VOUT       O   Vector resulting from projection.
```

#### Detailed_Input

```     VIN            is a 3-vector that is to be orthogonally projected
onto a specified plane.

PLANE          is a SPICELIB plane that represents the geometric
plane onto which VIN is to be projected.
```

#### Detailed_Output

```     VOUT           is the vector resulting from the orthogonal
projection of VIN onto PLANE.  VOUT is the closest
point in the specified plane to VIN.
```

#### Parameters

```     None.
```

#### Exceptions

```     1)  Invalid input planes are diagnosed by the routine PL2NVC,
which is called by this routine.
```

#### Files

```     None.
```

#### Particulars

```     Projecting a vector V orthogonally onto a plane can be thought of
as finding the closest vector in the plane to V.  This `closest
vector' always exists; it may be coincident with the original
vector.

Two related routines are VPRJPI, which inverts an orthogonal
projection of a vector onto a plane, and VPROJ, which projects
a vector orthogonally onto another vector.
```

#### Examples

```     1)   Find the closest point in the ring plane of a planet to a
spacecraft located at POSITN (in body-fixed coordinates).
Suppose the vector NORMAL is normal to the ring plane, and
that ORIGIN, which represents the body center, is in the
ring plane.  Then we can make a `plane' with the code

CALL PNV2PL ( ORIGIN, NORMAL, PLANE )

can find the projection by making the call

CALL VPRJP ( POSITN, PLANE, PROJ )
```

#### Restrictions

```     None.
```

#### Literature_References

```     [1] `Calculus and Analytic Geometry', Thomas and Finney.
```

#### Author_and_Institution

```     N.J. Bachman   (JPL)
```

#### Version

```    SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)

Comment section for permuted index source lines was added
`Wed Jun  9 12:59:35 2010`