Learn R Programming

PlaneGeometry (version 1.1.0)

Mobius: R6 class representing a M<U+00F6>bius transformation.

Description

A M<U+00F6>bius transformation is given by a matrix of complex numbers with non-null determinant.

Arguments

Active bindings

a

get or set a

b

get or set b

c

get or set c

d

get or set d

Methods

Public methods

Method new()

Create a new Mobius object.

Usage

Mobius$new(M)

Arguments

M

the matrix corresponding to the M<U+00F6>bius transformation

Returns

A new Mobius object.

Method print()

Show instance of a Mobius object.

Usage

Mobius$print(...)

Arguments

...

ignored

Examples

Mobius$new(rbind(c(1+1i,2),c(0,3-2i)))

Method getM()

Get the matrix corresponding to the M<U+00F6>bius transformation.

Usage

Mobius$getM()

Method compose()

Compose the reference M<U+00F6>bius transformation with another M<U+00F6>bius transformation

Usage

Mobius$compose(M1, left = TRUE)

Arguments

M1

a Mobius object

left

logical, whether to compose at left or at right (i.e. returns M1 o M0 or M0 o M1)

Returns

A Mobius object.

Method inverse()

Inverse of the reference M<U+00F6>bius transformation.

Usage

Mobius$inverse()

Returns

A Mobius object.

Method power()

Power of the reference M<U+00F6>bius transformation.

Usage

Mobius$power(k)

Arguments

k

an integer, possibly negative

Returns

The M<U+00F6>bius transformation M^k, where M is the reference M<U+00F6>bius transformation.

Method gpower()

Generalized power of the reference M<U+00F6>bius transformation.

Usage

Mobius$gpower(k)

Arguments

k

a real number, possibly negative

Returns

A Mobius object, the generalized k-th power of the reference M<U+00F6>bius transformation.

Method transform()

Transformation of a point by the reference M<U+00F6>bius transformation.

Usage

Mobius$transform(M)

Arguments

M

a point or Inf

Returns

A point or Inf, the image of M.

Examples

Mob <- Mobius$new(rbind(c(1+1i,2),c(0,3-2i)))
Mob$transform(c(1,1))
Mob$transform(Inf)

Method transformCircle()

Transformation of a circle by the reference M<U+00F6>bius transformation.

Usage

Mobius$transformCircle(circ)

Arguments

circ

a Circle object

Returns

A Circle object or a Line object.

Method transformLine()

Transformation of a line by the reference M<U+00F6>bius transformation.

Usage

Mobius$transformLine(line)

Arguments

line

a Line object

Returns

A Circle object or a Line object.

Method clone()

The objects of this class are cloneable with this method.

Usage

Mobius$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

MobiusMappingThreePoints to create a M<U+00F6>bius transformation, and also the compose method of the Inversion R6 class.

Examples

Run this code
# NOT RUN {
## ------------------------------------------------
## Method `Mobius$print`
## ------------------------------------------------

Mobius$new(rbind(c(1+1i,2),c(0,3-2i)))

## ------------------------------------------------
## Method `Mobius$transform`
## ------------------------------------------------

Mob <- Mobius$new(rbind(c(1+1i,2),c(0,3-2i)))
Mob$transform(c(1,1))
Mob$transform(Inf)
# }

Run the code above in your browser using DataLab