# orthogproj: Orthogonal Projection In baddstats/globe: Plot 2D and 3D Views of the Earth, Including Major Coastline

## Description

Project points from the unit sphere onto a plane orthogonal to the viewing direction.

## Usage

 `1` ```orthogproj(eye, top, loc) ```

## Arguments

 `eye` Viewpoint. A vector of length 3 (or a `list(lon,lat)`) determining a position in space. `top` Top point. A location which will be projected onto the y axis. Vector of length 3 (or a `list(lon,lat)`) determining a position in space. `loc` Vector of length 3, or matrix with 3 columns, or `list(lon,lat)`. The points on the sphere to be projected.

## Details

This function is used to obtain orthogonal projections of points on the sphere, for use in plotting 3D views of the sphere.

Each point of `loc` is expressed in an orthonormal coordinate system determined by the arguments `eye` and `top`. The coordinate system is such that the third (z) axis passes through the eye of the viewer and the centre of the sphere.

## Value

A vector (or matrix) giving the transformed coordinates of each point, with the first two coordinates giving the orthogonal projection.

## Author(s)

`globeearth`
 `1` ``` orthogproj(place("newyorkcity"), place("northpole"), c(1,0,0)) ```