powered by
The function to.Sphere convert a list of Cartesian coordinates representing a point on a unit sphere to the corresponding spherical coordinates.
to.Sphere(s)
A list of Cartesian coordinates.
A vector of the corresponding angles in spherical coordinating system.
# NOT RUN { 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) # }
Run the code above in your browser using DataLab