spherical2cartesian: Spherical to Cartesian coordinate conversion.

spherical2cartesianR Documentation

Spherical to Cartesian coordinate conversion.

Description

spherical2cartesian provides spherical to Cartesian coordinate conversion.

Usage

spherical2cartesian(r, 
    theta = NULL, phi = NULL)

Arguments

r

a vector of radii (or a vector of length 3 holding r, \code{theta}, phi, or a matrix of 3 columns)

theta

a vector of inclinations

phi

a vector of azimuths

Value

A matrix with x, y, and z Cartesian coordinates.

Author(s)

Tomas Sieger

See Also

cartesian2spherical

Examples

spherical2cartesian(1, 0, pi / 2)
spherical2cartesian(1, pi, pi / 4)
spherical2cartesian(c(1, pi, pi / 4))
spherical2cartesian(cbind(1,2,1:10))

tsieger/tsiMisc documentation built on Oct. 10, 2023, 10:24 p.m.