\HeaderA{trans3d}{3D to 2D Transformation for Perspective Plots}{trans3d}
\keyword{dplot}{trans3d}
\begin{Description}\relax
Projection of 3-dimensional to 2-dimensional points using a 4x4
viewing transformation matrix.  Mainly for adding to
perspective plots such as \code{\LinkA{persp}{persp}}.
\end{Description}
\begin{Usage}
\begin{verbatim}
trans3d(x,y,z, pmat)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x, y, z}] numeric vectors of equal length, specifying points in
3D space.
\item[\code{pmat}] a \eqn{4 \times 4}{} \emph{viewing transformation matrix},
suitable for projecting the 3D coordinates \eqn{(x,y,z)}{} into the 2D
plane using homogeneous 4D coordinates \eqn{(x,y,z,t)}{};
such matrices are returned by \code{\LinkA{persp}{persp}()}.
\end{ldescription}
\end{Arguments}
\begin{Value}
a list with two components
\begin{ldescription}
\item[\code{x,y}] the projected 2d coordinates of the 3d input \code{(x,y,z)}.
\end{ldescription}
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{persp}{persp}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## See  help(persp) {after attaching the 'graphics' package}
##      -----------
\end{ExampleCode}
\end{Examples}

