Reflection | R Documentation |
A reflection is given by a line.
line
get or set the line of the reflection
new()
Create a new Reflection
object.
Reflection$new(line)
line
a Line
object
A new Reflection
object.
l <- Line$new(c(1,1), c(1.5,1.5), FALSE, TRUE) Reflection$new(l)
print()
Show instance of a reflection object.
Reflection$print(...)
...
ignored
reflect()
Reflect a point.
Reflection$reflect(M)
M
a point, Inf
allowed
transform()
An alias of reflect
.
Reflection$transform(M)
M
a point, Inf
allowed
reflectCircle()
Reflect a circle.
Reflection$reflectCircle(circ)
circ
a Circle
object
A Circle
object.
transformCircle()
An alias of reflectCircle
.
Reflection$transformCircle(circ)
circ
a Circle
object
A Circle
object.
reflectLine()
Reflect a line.
Reflection$reflectLine(line)
line
a Line
object
A Line
object.
transformLine()
An alias of reflectLine
.
Reflection$transformLine(line)
line
a Line
object
A Line
object.
getMatrix()
Augmented matrix of the reflection.
Reflection$getMatrix()
A 3x3 matrix.
R <- Reflection$new(Line$new(c(2,2), c(4,5))) P <- c(1,5) R$reflect(P) R$getMatrix() %*% c(P,1)
asAffine()
Convert the reference reflection to an Affine
object.
Reflection$asAffine()
clone()
The objects of this class are cloneable with this method.
Reflection$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `Reflection$new`
## ------------------------------------------------
l <- Line$new(c(1,1), c(1.5,1.5), FALSE, TRUE)
Reflection$new(l)
## ------------------------------------------------
## Method `Reflection$getMatrix`
## ------------------------------------------------
R <- Reflection$new(Line$new(c(2,2), c(4,5)))
P <- c(1,5)
R$reflect(P)
R$getMatrix() %*% c(P,1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.