treebolic.core
Class HyperRotation

java.lang.Object
  extended by treebolic.core.Complex
      extended by treebolic.core.HyperRotation

public class HyperRotation
extends Complex

Rotation in hyperbolic space

Author:
Bernard Bou

Field Summary
 
Fields inherited from class treebolic.core.Complex
EAST, im, NORTH, ONE, re, SOUTH, WEST, ZERO
 
Constructor Summary
HyperRotation()
          Defaut constructor
HyperRotation(Complex z)
          Constructor from rotation expressed in cartesian value relative to (0,0) origin and x-axis
HyperRotation(double x, double y)
          Constructor from rotation expressed in cartesian value relative to (0,0) origin and x-axis
 
Method Summary
static HyperTransform compose(HyperRotation r1, HyperTranslation t2)
          Compose rotation with translation
 HyperRotation inverse()
          Reverse
 Complex map(Complex z)
          Rotate point
static Complex map(Complex z, Complex thisAngle)
          Rotate point
 Complex toComplex()
          Convert to complex expressing rotation as cartesian value relative to (0,0) origin and x-axis
 
Methods inherited from class treebolic.core.Complex
abs2, add, add, arg, conj, conj, div, div, divide, divide, equals, mag, makeFromArg, makeFromArgAbs, mul, mul, multiply, multiply, neg, neg, normalize, onediv, set, set, sub, sub, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HyperRotation

public HyperRotation()
Defaut constructor


HyperRotation

public HyperRotation(Complex z)
Constructor from rotation expressed in cartesian value relative to (0,0) origin and x-axis

Parameters:
z - rotation expressed as cartesian value

HyperRotation

public HyperRotation(double x,
                     double y)
Constructor from rotation expressed in cartesian value relative to (0,0) origin and x-axis

Parameters:
x - x-coordinate of point expressing rotation expressed as cartesian value
y - y-coordinate of point expressing rotation expressed as cartesian value
Method Detail

toComplex

public Complex toComplex()
Convert to complex expressing rotation as cartesian value relative to (0,0) origin and x-axis

Returns:
return complex expressing in cartesian value

map

public static Complex map(Complex z,
                          Complex thisAngle)
Rotate point

Parameters:
z - input point
thisAngle - rotation angle
Returns:
this point with rotated values

map

public Complex map(Complex z)
Rotate point

Parameters:
z - point
Returns:
rotated point

compose

public static HyperTransform compose(HyperRotation r1,
                                     HyperTranslation t2)
Compose rotation with translation

Parameters:
r1 - rotation
t2 - translation
Returns:
transform

inverse

public HyperRotation inverse()
Reverse

Returns:
this rotation with reversed values