sl.rot | R Documentation |
Rotate points on a sphere.
sl.rot(lon, lat, alpha, beta, gamma, return.xyz = FALSE, invert = FALSE)
lon |
a scalar or vector specifying the longitude(s) of the point(s) to be rotated. |
lat |
a scalar or vector specifying the latitude(s) of the point(s) to be rotated. |
alpha |
a scalar specifying the |
beta |
a scalar specifying the |
gamma |
a scalar specifying the |
return.xyz |
a logical value indicating whether or not the resulting points shall also be returned in x-y-z coordinates. |
invert |
a logical value indicating whether or not the rotation shall be inverted. |
The parameters alpha
, beta
, and gamma
can be derived from more intuitive parameters for the original coordinates of the new North Pole and the angle (in degrees) of rotation around the new North Pole using sl.lonlatrot2abg
.
A list with the following elements:
lon |
a scalar or vector giving the longitude(s) or the rotated point(s) |
lat |
a scalar or vector giving the latitude(s) or the rotated point(s) |
If return.xyz=TRUE
, also the following elements are added to the list:
x |
a scalar or vector giving the x-coordinate(s) or the rotated point(s) |
y |
a scalar or vector giving the y-coordinate(s) or the rotated point(s) |
z |
a scalar or vector giving the z-coordinate(s) or the rotated point(s) |
Helge Goessling
sl.lonlatrot2abg
abg = sl.lonlatrot2abg(lonlatrot=c(20,30,-45))
sl.rot(lon=c(0,10,20),lat=c(0,0,0),alpha=abg[1],beta=abg[2],gamma=abg[3])
## Should return:
## $lon
## [1] -81.05239 -64.42540 -45.00000
##
## $lat
## [1] 54.46865 58.52505 60.00000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.