Affine | R Documentation |
An affine map is given by a 2x2 matrix (a linear transformation) and a vector (the "intercept").
A
get or set the matrix A
b
get or set the vector b
new()
Create a new Affine
object.
Affine$new(A, b)
A
the 2x2 matrix of the affine map
b
the shift vector of the affine map
A new Affine
object.
print()
Show instance of an Affine
object.
Affine$print(...)
...
ignored
Affine$new(rbind(c(3.5,2),c(0,4)), c(-1, 1.25))
get3x3matrix()
The 3x3 matrix representing the affine map.
Affine$get3x3matrix()
inverse()
The inverse affine transformation, if it exists.
Affine$inverse()
compose()
Compose the reference affine map with another affine map.
Affine$compose(transfo, left = TRUE)
transfo
an Affine
object
left
logical, whether to compose at left or at right (i.e.
returns f1 o f0
or f0 o f1
)
An Affine
object.
transform()
Transform a point or several points by the reference affine map.
Affine$transform(M)
M
a point or a two-column matrix of points, one point per row
transformLine()
Transform a line by the reference affine transformation (only for invertible affine maps).
Affine$transformLine(line)
line
a Line
object
A Line
object.
transformEllipse()
Transform an ellipse by the reference affine transformation (only for an invertible affine map). The result is an ellipse.
Affine$transformEllipse(ell)
ell
an Ellipse
object or a Circle
object
An Ellipse
object.
clone()
The objects of this class are cloneable with this method.
Affine$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `Affine$print`
## ------------------------------------------------
Affine$new(rbind(c(3.5,2),c(0,4)), c(-1, 1.25))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.