C# Class R3.Math.Mobius

Afficher le fichier Open project: roice3/Honeycombs Class Usage Examples

Private Properties

Свойство Type Description
DivideQuat Vector3D
MultQuat Vector3D

Méthodes publiques

Méthode Description
Apply ( System.Numerics.Complex z ) : System.Numerics.Complex

Applies a Mobius transformation to a complex number.

Apply ( Vector3D z ) : Vector3D

Applies a Mobius transformation to a vector.

Use the complex number version if you can.

ApplyInfiniteSafe ( Vector3D z ) : Vector3D
ApplyToInfinite ( ) : Vector3D

Applies a Mobius transformation to the point at infinity.

ApplyToQuaternion ( Vector3D q ) : Vector3D

Applies a Mobius transformation to a quaternion with a zero k component (handled as a vector). The complex Mobius coefficients are treated as quaternions with zero j,k values. This is also infinity safe.

CreateFromIsometry ( Geometry g, double angle, System.Numerics.Complex P ) : Mobius
Elliptic ( Geometry g, System.Numerics.Complex fixedPlus, double angle ) : void
Geodesic ( Geometry g, System.Numerics.Complex p1, System.Numerics.Complex p2 ) : void

Move from a point p1 -> p2 along a geodesic. Also somewhat from Don.

Hyperbolic ( Geometry g, System.Numerics.Complex fixedPlus, double scale ) : void
Hyperbolic2 ( Geometry g, System.Numerics.Complex fixedPlus, System.Numerics.Complex point, double offset ) : void

Allow a hyperbolic transformation using an absolute offset. offset is specified in the respective geometry.

Identity ( ) : Mobius
Inverse ( ) : Mobius

Returns a new Mobius transformation that is the inverse of us.

Isometry ( Geometry g, double angle, System.Numerics.Complex P ) : void

This will calculate the Mobius transform that represents an isometry in the given geometry. The isometry will rotate CCW by angle A about the origin, then translate the origin to P (and -P to the origin).

MapPoints ( System.Numerics.Complex z1, System.Numerics.Complex z2, System.Numerics.Complex z3 ) : void

This transform will map z1 to Zero, z2 to One, and z3 to Infinity. http://en.wikipedia.org/wiki/Mobius_transformation#Mapping_first_to_0.2C_1.2C_.E2.88.9E If one of the zi is ∞, then the proper formula is obtained by first dividing all entries by zi and then taking the limit zi → ∞

MapPoints ( System.Numerics.Complex z1, System.Numerics.Complex z2, System.Numerics.Complex z3, System.Numerics.Complex w1, System.Numerics.Complex w2, System.Numerics.Complex w3 ) : void

This transform will map the z points to the respective w points.

Mobius ( System.Numerics.Complex z1, System.Numerics.Complex z2, System.Numerics.Complex z3 ) : System.Diagnostics

This transform will map z1 to Zero, z2, to One, and z3 to Infinity.

Mobius ( System.Numerics.Complex a, System.Numerics.Complex b, System.Numerics.Complex c, System.Numerics.Complex d ) : System.Diagnostics
Normalize ( ) : void

Normalize so that ad - bc = 1

PureTranslation ( Geometry g, System.Numerics.Complex p1, System.Numerics.Complex p2 ) : void

The pure translation (i.e. moves the origin straight in some direction) that takes p1 to p2. I borrowed this from Don's hyperbolic applet.

Round ( int digits ) : void

This is only here for a numerical accuracy hack. Please don't make a habit of using!

Scale ( double scale ) : Mobius
ScaleComponents ( System.Numerics.Complex k ) : void
ToString ( ) : string
Unity ( ) : void

The identity Mobius transformation.

UpperHalfPlane ( ) : void

This will transform the unit disk to the upper half plane.

operator ( ) : Mobius

Private Methods

Méthode Description
DivideQuat ( Vector3D a, Vector3D b ) : Vector3D
MultQuat ( Vector3D a, Vector3D b ) : Vector3D

Method Details

Apply() public méthode

Applies a Mobius transformation to a complex number.
public Apply ( System.Numerics.Complex z ) : System.Numerics.Complex
z System.Numerics.Complex
Résultat System.Numerics.Complex

Apply() public méthode

Applies a Mobius transformation to a vector.
Use the complex number version if you can.
public Apply ( Vector3D z ) : Vector3D
z Vector3D
Résultat Vector3D

ApplyInfiniteSafe() public méthode

public ApplyInfiniteSafe ( Vector3D z ) : Vector3D
z Vector3D
Résultat Vector3D

ApplyToInfinite() public méthode

Applies a Mobius transformation to the point at infinity.
public ApplyToInfinite ( ) : Vector3D
Résultat Vector3D

ApplyToQuaternion() public méthode

Applies a Mobius transformation to a quaternion with a zero k component (handled as a vector). The complex Mobius coefficients are treated as quaternions with zero j,k values. This is also infinity safe.
public ApplyToQuaternion ( Vector3D q ) : Vector3D
q Vector3D
Résultat Vector3D

CreateFromIsometry() public static méthode

public static CreateFromIsometry ( Geometry g, double angle, System.Numerics.Complex P ) : Mobius
g Geometry
angle double
P System.Numerics.Complex
Résultat Mobius

Elliptic() public méthode

public Elliptic ( Geometry g, System.Numerics.Complex fixedPlus, double angle ) : void
g Geometry
fixedPlus System.Numerics.Complex
angle double
Résultat void

Geodesic() public méthode

Move from a point p1 -> p2 along a geodesic. Also somewhat from Don.
public Geodesic ( Geometry g, System.Numerics.Complex p1, System.Numerics.Complex p2 ) : void
g Geometry
p1 System.Numerics.Complex
p2 System.Numerics.Complex
Résultat void

Hyperbolic() public méthode

public Hyperbolic ( Geometry g, System.Numerics.Complex fixedPlus, double scale ) : void
g Geometry
fixedPlus System.Numerics.Complex
scale double
Résultat void

Hyperbolic2() public méthode

Allow a hyperbolic transformation using an absolute offset. offset is specified in the respective geometry.
public Hyperbolic2 ( Geometry g, System.Numerics.Complex fixedPlus, System.Numerics.Complex point, double offset ) : void
g Geometry
fixedPlus System.Numerics.Complex
point System.Numerics.Complex
offset double
Résultat void

Identity() public static méthode

public static Identity ( ) : Mobius
Résultat Mobius

Inverse() public méthode

Returns a new Mobius transformation that is the inverse of us.
public Inverse ( ) : Mobius
Résultat Mobius

Isometry() public méthode

This will calculate the Mobius transform that represents an isometry in the given geometry. The isometry will rotate CCW by angle A about the origin, then translate the origin to P (and -P to the origin).
public Isometry ( Geometry g, double angle, System.Numerics.Complex P ) : void
g Geometry
angle double
P System.Numerics.Complex
Résultat void

MapPoints() public méthode

This transform will map z1 to Zero, z2 to One, and z3 to Infinity. http://en.wikipedia.org/wiki/Mobius_transformation#Mapping_first_to_0.2C_1.2C_.E2.88.9E If one of the zi is ∞, then the proper formula is obtained by first dividing all entries by zi and then taking the limit zi → ∞
public MapPoints ( System.Numerics.Complex z1, System.Numerics.Complex z2, System.Numerics.Complex z3 ) : void
z1 System.Numerics.Complex
z2 System.Numerics.Complex
z3 System.Numerics.Complex
Résultat void

MapPoints() public méthode

This transform will map the z points to the respective w points.
public MapPoints ( System.Numerics.Complex z1, System.Numerics.Complex z2, System.Numerics.Complex z3, System.Numerics.Complex w1, System.Numerics.Complex w2, System.Numerics.Complex w3 ) : void
z1 System.Numerics.Complex
z2 System.Numerics.Complex
z3 System.Numerics.Complex
w1 System.Numerics.Complex
w2 System.Numerics.Complex
w3 System.Numerics.Complex
Résultat void

Mobius() public méthode

This transform will map z1 to Zero, z2, to One, and z3 to Infinity.
public Mobius ( System.Numerics.Complex z1, System.Numerics.Complex z2, System.Numerics.Complex z3 ) : System.Diagnostics
z1 System.Numerics.Complex
z2 System.Numerics.Complex
z3 System.Numerics.Complex
Résultat System.Diagnostics

Mobius() public méthode

public Mobius ( System.Numerics.Complex a, System.Numerics.Complex b, System.Numerics.Complex c, System.Numerics.Complex d ) : System.Diagnostics
a System.Numerics.Complex
b System.Numerics.Complex
c System.Numerics.Complex
d System.Numerics.Complex
Résultat System.Diagnostics

Normalize() public méthode

Normalize so that ad - bc = 1
public Normalize ( ) : void
Résultat void

PureTranslation() public méthode

The pure translation (i.e. moves the origin straight in some direction) that takes p1 to p2. I borrowed this from Don's hyperbolic applet.
public PureTranslation ( Geometry g, System.Numerics.Complex p1, System.Numerics.Complex p2 ) : void
g Geometry
p1 System.Numerics.Complex
p2 System.Numerics.Complex
Résultat void

Round() public méthode

This is only here for a numerical accuracy hack. Please don't make a habit of using!
public Round ( int digits ) : void
digits int
Résultat void

Scale() public static méthode

public static Scale ( double scale ) : Mobius
scale double
Résultat Mobius

ScaleComponents() public méthode

public ScaleComponents ( System.Numerics.Complex k ) : void
k System.Numerics.Complex
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

Unity() public méthode

The identity Mobius transformation.
public Unity ( ) : void
Résultat void

UpperHalfPlane() public méthode

This will transform the unit disk to the upper half plane.
public UpperHalfPlane ( ) : void
Résultat void

operator() public static méthode

public static operator ( ) : Mobius
Résultat Mobius