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