\HeaderA{utilities.3d}{Utility functions for 3-D plots}{utilities.3d}
\aliasA{ltransform3dMatrix}{utilities.3d}{ltransform3dMatrix}
\aliasA{ltransform3dto3d}{utilities.3d}{ltransform3dto3d}
\aliasA{palette.shade}{utilities.3d}{palette.shade}
\keyword{dplot}{utilities.3d}
\begin{Description}\relax
These are (related to) the default panel functions for \code{cloud}
and \code{wireframe}.
\end{Description}
\begin{Usage}
\begin{verbatim}
ltransform3dMatrix(screen, R.mat)
ltransform3dto3d(x, R.mat, dist)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] \code{x} can be a numeric matrix with 3 rows for
\code{ltransform3dto3d}

\item[\code{screen}] list, as described in \code{\LinkA{panel.cloud}{panel.cloud}}
\item[\code{R.mat}] 4x4 transformation matrix in homogeneous
coordinates
\item[\code{dist}] controls transformation to account for
perspective viewing
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{ltransform3dMatrix} and \code{ltransform3dto3d} are utility
functions to help in computation of projections. These functions are
used inside the panel functions for \code{cloud} and
\code{wireframe}. They may be useful in user-defined panel functions
as well.

The first function takes a list of the form of the \code{screen}
argument in \code{cloud} and \code{wireframe} and a \code{R.mat}, a
4x4 transformation matrix in homogeneous coordinates, to return a new
4x4 transformation matrix that is the result of applying \code{R.mat}
followed by the rotations in \code{screen}. The second function
applies a 4x4 transformation matrix in homogeneous coordinates to a
3xn matrix representing points in 3-D space, and optionally does some
perspective computations. (There has been no testing with non-trivial
transformation matrices, and my knowledge of the homogeneous
coordinate system is very limited, so there may be bugs here.)
\end{Details}
\begin{Author}\relax
Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{cloud}{cloud}}, \code{\LinkA{panel.cloud}{panel.cloud}}
\end{SeeAlso}

