to.Sphere {SphereOptimize} | R Documentation |
Converting Cartesian coordinates to spherical coordinates
Description
The function to.Sphere convert a list of Cartesian coordinates representing a point on a unit sphere to the corresponding spherical coordinates.
Usage
to.Sphere(s)
Arguments
s |
A list of Cartesian coordinates. |
Value
A vector of the corresponding angles in spherical coordinating system.
Examples
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)
[Package SphereOptimize version 0.1.1 Index]