Trans.sph {spherepc}R Documentation

Transforming into spherical coordinate

Description

This function converts a Euclidean coordinate to a spherical coordinate.

Usage

Trans.sph(vec)

Arguments

vec

three-dimensional Euclidean coordinate.

Details

This function converts a three-dimensional Euclidean coordinate to a two-dimensional spherical coordinate. If vec is not in the unit sphere, it is divided by its magnitude so that the result lies on the unit sphere.

Value

two-dimensional vector.

Author(s)

Jongmin Lee

See Also

Trans.Euclid.

Examples

Trans.sph(c(1, 0, 0))
Trans.sph(c(0, 1, 0))
Trans.sph(c(0, 0, 1))
Trans.sph(c(-1, 0 , 0))
Trans.sph(c(0, -1, 0))

[Package spherepc version 0.1.7 Index]