Rotation | R Documentation |
A rotation is given by an angle (theta
) and a center.
theta
get or set the angle of the rotation
center
get or set the center
degrees
get or set the degrees
field
new()
Create a new Rotation
object.
Rotation$new(theta, center, degrees = TRUE)
theta
a number, the angle of the rotation
center
a point, the center of the rotation
degrees
logical, whether theta
is given in degrees
A new Rotation
object.
Rotation$new(60, c(1,1))
print()
Show instance of a Rotation
object.
Rotation$print(...)
...
ignored
rotate()
Rotate a point or several points.
Rotation$rotate(M)
M
a point or a two-column matrix of points, one point per row
transform()
An alias of rotate
.
Rotation$transform(M)
M
a point or a two-column matrix of points, one point per row
rotateCircle()
Rotate a circle.
Rotation$rotateCircle(circ)
circ
a Circle
object
A Circle
object.
transformCircle()
An alias of rotateCircle
.
Rotation$transformCircle(circ)
circ
a Circle
object
A Circle
object.
rotateEllipse()
Rotate an ellipse.
Rotation$rotateEllipse(ell)
ell
an Ellipse
object
An Ellipse
object.
transformEllipse()
An alias of rotateEllipse
.
Rotation$transformEllipse(ell)
ell
an Ellipse
object
An Ellipse
object.
rotateLine()
Rotate a line.
Rotation$rotateLine(line)
line
a Line
object
A Line
object.
transformLine()
An alias of rotateLine
.
Rotation$transformLine(line)
line
a Line
object
A Line
object.
getMatrix()
Augmented matrix of the rotation.
Rotation$getMatrix()
A 3x3 matrix.
R <- Rotation$new(60, c(1,1)) P <- c(1,5) R$rotate(P) R$getMatrix() %*% c(P,1)
asAffine()
Convert the reference rotation to an Affine
object.
Rotation$asAffine()
clone()
The objects of this class are cloneable with this method.
Rotation$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `Rotation$new`
## ------------------------------------------------
Rotation$new(60, c(1,1))
## ------------------------------------------------
## Method `Rotation$getMatrix`
## ------------------------------------------------
R <- Rotation$new(60, c(1,1))
P <- c(1,5)
R$rotate(P)
R$getMatrix() %*% c(P,1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.