Last chance! 50% off unlimited learning
Sale ends in
This function converts a Euclidean coordinate to a spherical coordinate.
Trans.sph(vec)
three-dimensional Euclidean coordinate.
two-dimensional vector.
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.
# NOT RUN {
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))
# }
Run the code above in your browser using DataLab