This function converts a Euclidean coordinate to a spherical coordinate.
Usage
Trans.sph(vec)
Arguments
vec
three-dimensional Euclidean coordinate.
Value
two-dimensional vector.
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.