Rotate.inv: Rotating point on a sphere

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/spherepc.R

Description

Rotate a point on the unit 2-sphere.

Usage

1
 Rotate.inv(pt1, pt2)

Arguments

pt1

spatial location.

pt2

spatial location.

Details

This function rotates pt2 to the extent that the spherical coordinate (0, 90) is rotated to pt1. The function is the inverse of the Rotate function, and 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

Rotate.

Examples

1
2
3
4
5
## If "pt1" is north pole (= (0, 90)), Rotate.inv() returns Euclidean coordinate of "pt2".
# It returns Euclidean coordinate of spatial location (-100, 80).
Rotate.inv(c(0, 90), c(-100, 80)) 
# It converts spatial coordinate (-100, 80) to Euclidean coordinate.
Trans.Euclid(c(-100, 80))                                                   

spherepc documentation built on Oct. 7, 2021, 9:14 a.m.