rotate.sphwin | R Documentation |
These functions apply a rotation to a given spherical window or spherical point pattern.
## S3 method for class 'sphwin' rotate(X, northpole, inverse = FALSE, ...) ## S3 method for class 'sp2' rotate(X, northpole, inverse = FALSE, ...) ## S3 method for class 'sp3' rotate(X, northpole, inverse = FALSE, ...)
X |
Window or point pattern to be rotated: an object of class
|
northpole |
A point that will be rotated to the north pole (if
|
inverse |
Logical value. If |
... |
Ignored. |
These functions are methods for the generic
rotate
for the classes "sphwin"
, "sp2"
and "sp3"
representing spherical windows and point patterns.
A rotation on the sphere can be specified by stipulating that a point
at position A
should move to position B
, where
A,B
are any given points on the sphere. The functions here
assume that either A
or B
is the north pole.
If inverse=FALSE
(the default),
the sphere is rotated so that the point specified by
northpole
moves to the north pole.
If inverse=TRUE
, the sphere is rotated so that the north pole
is moved to the position specified by northpole
.
To apply a general rotation which moves point A
to point
B
, use rotate(rotate(X, A), B, inverse=TRUE)
. This performs two rotations: the first rotation sends A to the north pole, the second sends the north pole to B.
Another object of the same kind as X
representing the result
of rotation.
Tom Lawrence and Adrian Baddeley
sphcap <- sphwin(type="band", param=c(0, pi/3), ref=c(pi/8,pi/6)) X <- runif.sphwin(30, sphcap) X Y <- rotate(X, c(0, pi/3)) Y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.