Rotate {spherepc} | R Documentation |
Rotating point on a sphere
Description
Rotate a point on the unit 2-sphere.
Usage
Rotate(pt1, pt2)
Arguments
pt1 |
spatial location. |
pt2 |
spatial location. |
Details
This function rotates pt2
to the extent that pt1
to spherical coordinate (0, 90).
The function returns a point as a form of three-dimensional Euclidean coordinate.
Value
three-dimensional vector.
Author(s)
Jongmin Lee
References
https://en.wikipedia.org/wiki/Rodrigues_rotation_formula
See Also
Examples
## If "pt1" is north pole (= (0, 90)), Rotate() function returns Euclidean coordinate of "pt2".
Rotate(c(0, 90), c(10, 10)) # It returns Euclidean coordinate of spatial location (10, 10).
# The Trans.Euclid() function converts spatial coordinate (10, 10) to Euclidean coordinate.
Trans.Euclid(c(10, 10))
[Package spherepc version 0.1.7 Index]