| Homothety | R Documentation |
A homothety is given by a center and a scale factor.
centerget or set the center
scaleget or set the scale factor of the homothety
new()Create a new Homothety object.
Homothety$new(center, scale)
centera point, the center of the homothety
scalea 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)
Ma point or a two-column matrix of points, one point per row
transformCircle()Transform a circle by the reference homothety.
Homothety$transformCircle(circ)
circa 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)
deepWhether 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.