jv.vecmath
Class PuLorentz
- java.lang.Object
-
- jv.vecmath.PuLorentz
-
public class PuLorentz extends java.lang.ObjectUtility methods for calculations in Lorentz model of hyperbolic space. Coordinate system in Lorentz R4 usually has signature (-1,1,1,...).- Author:
- Konrad Polthier
- Version:
- 27.12.99, 1.10 revised (kp) Converted to Java.
00.00.92, 1.00 created (kp) Original C code.
-
-
Constructor Summary
Constructors Constructor and Description PuLorentz()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static doubleabs(PdVector p, PdVector sign)Compute absolute value of point in Minkowski space.static doubledist(PdVector p, PdVector q, PdVector sign)Distance of two points in Lorentz model of hyperbolic space.static doubledistMinkowski(PdVector p, PdVector q, PdVector sign)Compute distance of two points in Minkowski space by taking Euclidean different and norm with respect to signature metric.static doubledistToOrigin(PdVector p, PdVector sign)Distance of a point and the origin in Lorentz model of hyperbolic space.static doubledot(PdVector p, PdVector q, PdVector sign)Scalar product of two vectors in Lorentz model of hyperbolic space.static voidgetTangent(PdVector tangent, PdVector p, PdVector q, PdVector sign)Compute unit tangent vector at point p of geodesic from p to q in Lorentz model of hyperbolic space.static voidgetTangentAtOrigin(PdVector tangent, PdVector p, PdVector sign)Compute unit tangent vector at origin of geodesic to point p in Lorentz model of hyperbolic space.static voidinvertAtPoint(PdMatrix mat, PdVector p, PdVector sign)Compute transformation 4*4 matrix to invert at given point.static voidnormalize(PdVector p, PdVector sign)Normalize Minkowski length of point.static voidreflectAtOrigin(PdMatrix mat, PdVector q, PdVector r, PdVector sign)Compute transformation 4*4 matrix to reflect at plane through origin spanned by two given points.static voidreflectAtPlane(PdMatrix mat, PdVector p, PdVector q, PdVector r, PdVector sign)Compute transformation 4*4 matrix to reflect at arbitrary plane spanned by three given points.static voidrotateAroundLine(PdMatrix mat, PdVector p, PdVector q, double angle, PdVector sign)Compute transformation 4*4 matrix to rotate around geodesic connecting two given points.static voidrotateAtOrigin(PdMatrix mat, PdVector p, double angle, PdVector sign)Compute rotation 4*4 matrix to rotate tangent space at origin around line in Lorentz model of hyperbolic space.static voidsetLength(PdVector p, double length, PdVector sign)Set Minkowski length of point to given length.static doublesqrAbs(PdVector p, PdVector sign)Compute square of absolute value of point in Minkowski space.static doublesqrDistMinkowski(PdVector p, PdVector q, PdVector sign)Compute square distance of two points in Minkowski space by taking Euclidean different and square norm with respect to signature metric.static voidtranslate(PdMatrix mat, PdVector p, PdVector q, PdVector sign)Compute translation 4*4 matrix to move a point p to a point q in Lorentz model of hyperbolic space.static voidtranslate2Origin(PdMatrix mat, PdVector p, PdVector sign)Compute translation 4*4 matrix to move a point p to origin in Lorentz model of hyperbolic space.static voidtranslate2Point(PdMatrix mat, PdVector p, PdVector sign)Compute translation 4*4 matrix to move a point p to origin in Lorentz model of hyperbolic space.
-
-
-
Method Detail
-
abs
public static double abs(PdVector p, PdVector sign)
Compute absolute value of point in Minkowski space.- Parameters:
p- point in Minkowski spacesign- Signature of space form- Returns:
- absolute value
-
sqrAbs
public static double sqrAbs(PdVector p, PdVector sign)
Compute square of absolute value of point in Minkowski space.- Parameters:
p- point in Minkowski spacesign- Signature of space form- Returns:
- square of absolute value
-
distMinkowski
public static double distMinkowski(PdVector p, PdVector q, PdVector sign)
Compute distance of two points in Minkowski space by taking Euclidean different and norm with respect to signature metric.dist = |p-q|_L- Parameters:
p- point in Minkowski spaceq- point in Minkowski spacesign- Signature of space form- Returns:
- Minkowski distance of both points
-
sqrDistMinkowski
public static double sqrDistMinkowski(PdVector p, PdVector q, PdVector sign)
Compute square distance of two points in Minkowski space by taking Euclidean different and square norm with respect to signature metric.dist = (|p-q|_L)^2- Parameters:
p- point in Minkowski spaceq- point in Minkowski spacesign- Signature of space form- Returns:
- Square Minkowski distance of both points
-
normalize
public static void normalize(PdVector p, PdVector sign)
Normalize Minkowski length of point.|v|_L == 1.- Parameters:
p- point in Minkowski spacesign- Signature of space form
-
setLength
public static void setLength(PdVector p, double length, PdVector sign)
Set Minkowski length of point to given length.|v|_L == length- Parameters:
p- point in Minkowski spacesign- Signature of space form
-
dot
public static double dot(PdVector p, PdVector q, PdVector sign)
Scalar product of two vectors in Lorentz model of hyperbolic space.- Parameters:
p- point in Lorentz model in R4_Lq- point in Lorentz model in R4_Lsign- Signature of space form
-
dist
public static double dist(PdVector p, PdVector q, PdVector sign)
Distance of two points in Lorentz model of hyperbolic space.- Parameters:
p- point in Lorentz model in R4_Lq- point in Lorentz model in R4_Lsign- Signature of space form
-
distToOrigin
public static double distToOrigin(PdVector p, PdVector sign)
Distance of a point and the origin in Lorentz model of hyperbolic space.- Parameters:
p- point in Lorentz model in R4_Lsign- Signature of space form
-
getTangent
public static void getTangent(PdVector tangent, PdVector p, PdVector q, PdVector sign)
Compute unit tangent vector at point p of geodesic from p to q in Lorentz model of hyperbolic space.- Parameters:
tangent- resulting unit length tangent vector at p of geodesic from p to qp- point in Lorentz model in R4_Lq- point in Lorentz model in R4_Lsign- Signature of space form
-
getTangentAtOrigin
public static void getTangentAtOrigin(PdVector tangent, PdVector p, PdVector sign)
Compute unit tangent vector at origin of geodesic to point p in Lorentz model of hyperbolic space.- Parameters:
tangent- resulting unit length tangent vector at origin of geodesic to pp- point in Lorentz model in R4_Lsign- Signature of space form
-
translate2Origin
public static void translate2Origin(PdMatrix mat, PdVector p, PdVector sign)
Compute translation 4*4 matrix to move a point p to origin in Lorentz model of hyperbolic space.- Parameters:
mat- resulting translation 4*4 matrix to move a point p to originp- point in Lorentz model in R4_Lsign- Signature of space form
-
translate2Point
public static void translate2Point(PdMatrix mat, PdVector p, PdVector sign)
Compute translation 4*4 matrix to move a point p to origin in Lorentz model of hyperbolic space.- Parameters:
mat- resulting translation 4*4 matrix to move origin to point pp- point in Lorentz model in R4_Lsign- Signature of space form
-
translate
public static void translate(PdMatrix mat, PdVector p, PdVector q, PdVector sign)
Compute translation 4*4 matrix to move a point p to a point q in Lorentz model of hyperbolic space.- Parameters:
mat- resulting translation 4*4 matrix to move a point p to point qp- point in Lorentz model in R4_Lq- point in Lorentz model in R4_Lsign- Signature of space form
-
rotateAtOrigin
public static void rotateAtOrigin(PdMatrix mat, PdVector p, double angle, PdVector sign)
Compute rotation 4*4 matrix to rotate tangent space at origin around line in Lorentz model of hyperbolic space.- Parameters:
mat- resulting rotation 4*4 matrix to rotate around line through originp- point in Lorentz model in R4_L specifying geodesic around to rotateangle- angle in degrees specifying amount to rotatesign- Signature of space form
-
rotateAroundLine
public static void rotateAroundLine(PdMatrix mat, PdVector p, PdVector q, double angle, PdVector sign)
Compute transformation 4*4 matrix to rotate around geodesic connecting two given points.- Parameters:
mat- resulting rotation 4*4 matrix to rotate around line through originp- (p,q): two points in Lorentz model in R4_L specifying geodesic around to rotateq- (p,q): two points in Lorentz model in R4_L specifying geodesic around to rotateangle- angle in degrees specifying amount to rotatesign- Signature of space form
-
reflectAtOrigin
public static void reflectAtOrigin(PdMatrix mat, PdVector q, PdVector r, PdVector sign)
Compute transformation 4*4 matrix to reflect at plane through origin spanned by two given points.- Parameters:
mat- resulting reflection 4*4 matrix to reflect at plane through originq- (q,r): two points in Lorentz model in R4_L specifying plane to reflect atr- (q,r): two points in Lorentz model in R4_L specifying plane to reflect atsign- Signature of space form
-
reflectAtPlane
public static void reflectAtPlane(PdMatrix mat, PdVector p, PdVector q, PdVector r, PdVector sign)
Compute transformation 4*4 matrix to reflect at arbitrary plane spanned by three given points.- Parameters:
mat- resulting reflection 4*4 matrix to reflect at planep- (p,q,r): three points in Lorentz model in R4_L specifying plane to reflect atq- (p,q,r): three points in Lorentz model in R4_L specifying plane to reflect atr- (p,q,r): three points in Lorentz model in R4_L specifying plane to reflect atsign- Signature of space form
-
invertAtPoint
public static void invertAtPoint(PdMatrix mat, PdVector p, PdVector sign)
Compute transformation 4*4 matrix to invert at given point.- Parameters:
mat- resulting inversion 4*4 matrix to invert at given pointp- point in Lorentz model in R4_L specifying center of inversionsign- Signature of space form
-
-
"