to.Sphere: Converting Cartesian coordinates to spherical coordinates

Description Usage Arguments Value Examples

View source: R/SphereOptimize.R

Description

The function to.Sphere convert a list of Cartesian coordinates representing a point on a unit sphere to the corresponding spherical coordinates.

Usage

1

Arguments

s

A list of Cartesian coordinates.

Value

A vector of the corresponding angles in spherical coordinating system.

Examples

1
2
3
4
s = from.Sphere(c(pi/3, pi/4, pi/5))
theta = to.Sphere(s)
theta = round(theta, 5)
theta == round(c(pi/3, pi/4, pi/5), 5)

xieyj17/SphereOptimize documentation built on Sept. 3, 2020, 10:31 p.m.