| Homothety {PlaneGeometry} | R Documentation |
R6 class representing a homothety
Description
A homothety is given by a center and a scale factor.
Active bindings
centerget or set the center
scaleget or set the scale factor of the homothety
Methods
Public methods
Method new()
Create a new Homothety object.
Usage
Homothety$new(center, scale)
Arguments
centera point, the center of the homothety
scalea number, the scale factor of the homothety
Returns
A new Homothety object.
Examples
Homothety$new(c(1,1), 2)
Method print()
Show instance of a Homothety object.
Usage
Homothety$print(...)
Arguments
...ignored
Method transform()
Transform a point or several points by the reference homothety.
Usage
Homothety$transform(M)
Arguments
Ma point or a two-column matrix of points, one point per row
Method transformCircle()
Transform a circle by the reference homothety.
Usage
Homothety$transformCircle(circ)
Arguments
circa
Circleobject
Returns
A Circle object.
Method getMatrix()
Augmented matrix of the homothety.
Usage
Homothety$getMatrix()
Returns
A 3x3 matrix.
Examples
H <- Homothety$new(c(1,1), 2) P <- c(1,5) H$transform(P) H$getMatrix() %*% c(P,1)
Method asAffine()
Convert the reference homothety to an Affine object.
Usage
Homothety$asAffine()
Method clone()
The objects of this class are cloneable with this method.
Usage
Homothety$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
## ------------------------------------------------
## 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)
[Package PlaneGeometry version 1.6.0 Index]