NV5 GEOSPATIAL SOFTWARE
>  Docs Center  >  Libraries  >  Salvaggio  >  PERSPECTIVE_PROJECT3D

### PERSPECTIVE_PROJECT3D

PERSPECTIVE_PROJECT3D

## Name

PERSPECTIVE_PROJECT3D

## Purpose

This function will perform a perspective projection of a three-
dimensional point defined in homogenous coordinates onto a two-
dimensional "focal plane" as if being acquired by a camera
located in 3-space with a specified focal length, pixel size,
and "look at" position.

GENERAL.

## Calling Sequence

result = PERSPECTIVE_PROJECT3D( point, \$
cameraPosition, \$
focalLength, \$
pixelSize, \$
lookatPosition, \$
OBSERVER_UP=observerUp )

## Inputs

point
A vector containing the three-dimensional point to be projected in
homogenous coordinates [x,y,z,1].
cameraPosition
A vector containing the three-dimensional point at which the camera
is located in 3-space. Ths point is defined in homogeneous coordinates.
focalLength
A scalar defining the focal length of camera's lens (while this value
serves as a scaling factor, keeping the units consistent with the pixel
size is required).
pixelSize
A scalar defining the pixel size of the camera (pixels are assumed to
be square) (while this value serves as a scaling factor, keeping the
units consistent with the focal length is required).
lookatPosition
A vector containing the three-dimensional point at which the camera is
staring in 3-space. This is only used to define the direction of gaze.
This point is defined in homogeneous coordinates.

## Keyword Parametrs

OBSERVER_UP
Set this keyword to a 4-element homogenous vector defining the up
direction of the observer (as if the observer is holding the camera).
The default value is [0,0,1,1] indicating up is in the positive z-
direction.
:ERROR CHECKING:
None.

None.

NORMALIZE
NORMH

## Modification History

Written by: Carl Salvaggio
January, 2012 Original code

## Disclaimer

This source code is provided "as is" and without warranties as to performance
or merchantability. The author and/or distributors of this source code may