# SL2

## SL2

The elements of SL(2,R) seen as vectors in the basis E = (E0,E1,E2,E3) The elements satisfy the relation - x^2 - y^2 + z^2 + w^2 = -1

## Constructor

#### new SL2()

Source:

Overload the constructor to return the identity.

SL2

### Methods

#### flip() → {SL2}

Source:

Apply the "flip"

##### Returns:
• the current element
Type
SL2

#### invert() → {SL2}

Source:

Set the current element to the inverse of the given element.

##### Returns:
• the current element
Type
SL2

#### multiply(elt) → {SL2}

Source:

Multiply the element on the left by isom, i.e. this * elt

##### Parameters:
Name Type Description
`elt` SL2

the left element in the product

##### Returns:
• the current element
Type
SL2

#### premultiply(elt) → {SL2}

Source:

Multiply the element on the right by isom, i.e. elt * this

##### Parameters:
Name Type Description
`elt` SL2

the right element in the product

##### Returns:
• the current element
Type
SL2

#### reduceError() → {SL2}

Source:

Correct the error to make sure that the point lies on the "hyperboloid"

##### Returns:
• the current element
Type
SL2

#### rotateBy(angle) → {SL2}

Source:

Apply the "rotation" of angle alpha centered at the origin

##### Parameters:
Name Type Description
`angle` number

the angle of the rotation

##### Returns:
• the current element
Type
SL2

#### toH2() → {Vector3}

Source:

Projection onto H^2

##### Returns:
• the image of the origin in H^2 by the given element of SL(2,R)
Type
Vector3

#### toMatrix3() → {Matrix3}

Source:

Projection from SL(2,R) to SO(2,1)

##### Returns:
• the image of the current element in SO(2,1)
Type
Matrix3

#### toMatrix4() → {Matrix4}

Source:

Return the 4x4 Matrix, corresponding to the current element, seen as an isometry of SL(2,R)

##### Returns:
• the current element of SL(2,R) as an isometry of SL(2,R)
Type
Matrix4

#### translateFiberBy(phi) → {SL2}

Source:

Translate the element by an angle `phi` along the fiber

##### Parameters:
Name Type Description
`phi` number

the angle of translation

##### Returns:
• the current element
Type
SL2