% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sph2cart.R
\name{sph2cart}
\alias{sph2cart}
\title{Transform spherical coordinates to Cartesian coordinates}
\usage{
sph2cart(theta, phi = NULL, r = NULL)
}
\arguments{
\item{theta}{describes the angle relative to the positive x-axis.}

\item{phi}{is the angle relative to the xy-plane.}

\item{r}{is the distance to the origin \code{(0, 0, 0)}.

If only a single return argument is requested then return a matrix
\code{C} where each row represents one Cartesian coordinate
(\code{x}, \code{y}, \code{z}).}
}
\description{
The inputs \code{theta}, \code{phi}, and \code{r} must be the same
shape, or scalar.  If called with a single matrix argument then
each row of \code{S} represents the spherical coordinate
(\code{theta}, \code{phi}, \code{r}).
}
\seealso{
\code{\link{cart2sph}}, \code{\link{pol2cart}}, \code{\link{cart2pol}}
}
\author{
Kai Habel

David Sterratt
}
