Public methods
Method new()
Create a new Inversion
object.
Usage
Inversion$new(pole, power)
Arguments
pole
the pole
power
the power
Returns
A new Inversion
object.
Method print()
Show instance of an inversion object.
Usage
Inversion$print(...)
Arguments
...
ignored
Examples
Inversion$new(c(0,0), 2)
Method invert()
Inversion of a point.
Usage
Inversion$invert(M)
Arguments
M
a point or Inf
Returns
A point or Inf
, the image of M
.
Method transform()
An alias of invert
.
Usage
Inversion$transform(M)
Arguments
M
a point or Inf
Returns
A point or Inf
, the image of M
.
Method invertCircle()
Inversion of a circle.
Usage
Inversion$invertCircle(circ)
Arguments
circ
a Circle
object
Returns
A Circle
object or a Line
object.
Examples
# A Pappus chain
# https://www.cut-the-knot.org/Curriculum/Geometry/InversionInArbelos.shtml
opar <- par(mar = c(0,0,0,0))
plot(0, 0, type = "n", asp = 1, xlim = c(0,6), ylim = c(-4,4),
xlab = NA, ylab = NA, axes = FALSE)
A <- c(0,0); B <- c(6,0)
ABsqr <- c(crossprod(A-B))
iota <- Inversion$new(A, ABsqr)
C <- iota$invert(c(8,0))
Sigma1 <- Circle$new((A+B)/2, sqrt(ABsqr)/2)
Sigma2 <- Circle$new((A+C)/2, sqrt(c(crossprod(A-C)))/2)
draw(Sigma1); draw(Sigma2)
circ0 <- Circle$new(c(7,0), 1)
iotacirc0 <- iota$invertCircle(circ0)
draw(iotacirc0)
for(i in 1:6){
circ <- circ0$translate(c(0,2*i))
iotacirc <- iota$invertCircle(circ)
draw(iotacirc)
circ <- circ0$translate(c(0,-2*i))
iotacirc <- iota$invertCircle(circ)
draw(iotacirc)
}
par(opar)
Method transformCircle()
An alias of invertCircle
.
Usage
Inversion$transformCircle(circ)
Arguments
circ
a Circle
object
Returns
A Circle
object or a Line
object.
Method invertLine()
Inversion of a line.
Usage
Inversion$invertLine(line)
Arguments
line
a Line
object
Returns
A Circle
object or a Line
object.
Method transformLine()
An alias of invertLine
.
Usage
Inversion$transformLine(line)
Arguments
line
a Line
object
Returns
A Circle
object or a Line
object.
Method compose()
Compose the reference inversion with another inversion.
The result is a M<U+00F6>bius transformation.
Usage
Inversion$compose(iota1, left = TRUE)
Arguments
iota1
an Inversion
object
left
logical, whether to compose at left or at right (i.e.
returns iota1 o iota0
or iota0 o iota1
)
Returns
A Mobius
object.
Method clone()
The objects of this class are cloneable with this method.
Usage
Inversion$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.