Homothety | R Documentation |
A homothety is given by a center and a scale factor.
center
get or set the center
scale
get or set the scale factor of the homothety
new()
Create a new Homothety
object.
Homothety$new(center, scale)
center
a point, the center of the homothety
scale
a number, the scale factor of the homothety
A new Homothety
object.
Homothety$new(c(1,1), 2)
print()
Show instance of a Homothety
object.
Homothety$print(...)
...
ignored
transform()
Transform a point or several points by the reference homothety.
Homothety$transform(M)
M
a point or a two-column matrix of points, one point per row
transformCircle()
Transform a circle by the reference homothety.
Homothety$transformCircle(circ)
circ
a Circle
object
A Circle
object.
getMatrix()
Augmented matrix of the homothety.
Homothety$getMatrix()
A 3x3 matrix.
H <- Homothety$new(c(1,1), 2) P <- c(1,5) H$transform(P) H$getMatrix() %*% c(P,1)
asAffine()
Convert the reference homothety to an Affine
object.
Homothety$asAffine()
clone()
The objects of this class are cloneable with this method.
Homothety$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `Homothety$new`
## ------------------------------------------------
Homothety$new(c(1,1), 2)
## ------------------------------------------------
## Method `Homothety$getMatrix`
## ------------------------------------------------
H <- Homothety$new(c(1,1), 2)
P <- c(1,5)
H$transform(P)
H$getMatrix() %*% c(P,1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.