public class LieSphereGeometry extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ELLIPTIC |
static int |
HYPERBOLIC |
static double[] |
LIE_POINT_AT_INFINITY |
static int |
LINE_SPACE |
static int |
SPHERE_SPACE |
Constructor and Description |
---|
LieSphereGeometry() |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
_isPlane(double[] p0)
Local method to be used only when isSphere() is known to be satisfied
|
protected static boolean |
_isPlane(double[] p0,
boolean adaptTol) |
protected static boolean |
_isPoint(double[] p0)
Local method to be used only when isSphere() is known to be satisfied
|
protected static boolean |
_isPoint(double[] p0,
boolean adaptTol) |
static boolean |
contactElementsCoincide(double[][] c1,
double[][] c2,
boolean adaptTol)
Checks whether the given contact elements coincide.
|
static double[] |
getCommonGeneralizedSphere(double[] dst,
double[][] l1,
double[][] l2)
Computes the Lie sphere coordinates of the unique common sphere in
l1 and l2.
|
static double[][] |
getContactElementForPointAndNormal(double[][] dst,
double[] point,
double[] normal)
A contact element is uniquely determined by a point and a normal in this point.
|
static double[][] |
getContactElementForPointAndSphere(double[][] dst,
double[] point,
double[] center,
double radius)
A contact element is uniquely determined by a proper sphere and a point on it.
|
static double[] |
getContactPlane(double[] dst,
double[] p0,
double[] p1)
Convenience method which picks out the plane of contact from the contact element.
|
static double[] |
getContactPoint(double[] dst,
double[] p0,
double[] p1)
Convenience method which picks out the point of contact from the contact element.
|
static double[] |
getLieCoordinatesForPlane(double[] dst,
double[] normal,
double offset)
Get Lie sphere coordinates for the plane consisting of all points
satisfying
|
static double[] |
getLieCoordinatesForSphere(double[] dst,
double[] center,
double r)
Create normalized Lie sphere coordinates for a sphere with center center (non-zero last coordinate) and
signed radius r.
|
static double[] |
getPlaneCoordinates(double[] dst,
double[] p0)
return plane coordinates in R3 for the plane represented by p0
|
static double[] |
getPointCoordinates(double[] dst,
double[] p0)
Get Euclidean point coordinates (x,y,z) of a point in R^3 other than infinity.
|
static double[] |
getProperSphereCenter(double[] dst,
double[] p0)
In the case of a proper sphere its center is returned, otherwise a exception is thrown.
|
static double[] |
getProperSphereCoordinates(double[] dst,
double[] p0)
Get Euclidean sphere coordinates (x,y,z,r) = (center,radius) for a proper sphere in R^3.
|
static double[] |
getSphereCenter(double[] dst,
double[] p0)
If not a plane, returns the center of the sphere.
|
static double[] |
getSphereCoordinates(double[] dst,
double[] p0)
Get sphere coordinates (x,y,z,r) = (center,radius) for a sphere in R^3.
|
static double |
getSphereRadius(double[] p0)
If a not a plane, returns the radius.
|
static boolean |
isContactElement(double[][] c)
Checks whether a given array c really is a contact element
in the sense that the first entry c[0] represent a point
and the second one c[1] represents a plane.
|
static boolean |
isContactElement(double[][] c,
boolean adaptTol) |
static boolean |
isGeneralizedSphere(double[] p0)
The set of generalized (oriented) spheres includes planes and points.
|
static boolean |
isGeneralizedSphere(double[] p0,
boolean adaptTol) |
static boolean |
isInfinity(double[] p0)
Infinity corresponds to the (normalized) vector (0,0,0,0,1,0).
|
static boolean |
isInfinity(double[] p0,
boolean adaptTol) |
static boolean |
isPlane(double[] p0)
Checks to see if p0 is a generalized sphere and in particular a plane.
|
static boolean |
isPlane(double[] p0,
boolean adaptTol) |
static boolean |
isPoint(double[] p0)
Checks to see if the "sphere" is in particular a point.
|
static boolean |
isPoint(double[] p0,
boolean adaptTol) |
static boolean |
isProperSphere(double[] p0)
Here is also checked whether p0 is not a point and not a plane
|
static boolean |
isProperSphere(double[] p0,
boolean adaptTol) |
protected static double |
lieInnerProduct(double[] p0,
double[] p1) |
static double[][] |
normalizeContactElement(double[][] dst,
double[] p0,
double[] p1)
p0 and p1 are expected to be points on the Lie quadric which are also polar to each other.
|
static double[] |
normalizeLieSphereCoordinates(double[] dst,
double[] p0)
Normalize the "sphere" coordinates as follows:
If it's a proper sphere, dehomogenize to make last coordinate = 1
If it's not (last coordinate is 0), then:
If it's point at infinity, return a copy of (0,0,0,0,1,0)
If it's a plane, normalize the direction vector to have length 1.
|
public static final int ELLIPTIC
public static final int HYPERBOLIC
public static final double[] LIE_POINT_AT_INFINITY
public static final int LINE_SPACE
public static final int SPHERE_SPACE
protected static boolean _isPlane(double[] p0)
p0
- protected static boolean _isPlane(double[] p0, boolean adaptTol)
protected static boolean _isPoint(double[] p0)
p0
- protected static boolean _isPoint(double[] p0, boolean adaptTol)
public static boolean contactElementsCoincide(double[][] c1, double[][] c2, boolean adaptTol)
c1
- c2
- adaptTol
- public static double[] getCommonGeneralizedSphere(double[] dst, double[][] l1, double[][] l2)
dst
- l1
- l2
- public static double[][] getContactElementForPointAndNormal(double[][] dst, double[] point, double[] normal)
dst
- point
- normal
- public static double[][] getContactElementForPointAndSphere(double[][] dst, double[] point, double[] center, double radius)
dst
- point
- - 3-vector (x,y,z)center
- - 3-vector (x,y,z)radius
- - absolute value has to be greater than 10E-8public static double[] getContactPlane(double[] dst, double[] p0, double[] p1)
dst
- p0
- p1
- public static double[] getContactPoint(double[] dst, double[] p0, double[] p1)
dst
- p0
- p1
- public static double[] getLieCoordinatesForPlane(double[] dst, double[] normal, double offset)
dst
- normal
- offset
- public static double[] getLieCoordinatesForSphere(double[] dst, double[] center, double r)
dst
- center
- r
- public static double[] getPlaneCoordinates(double[] dst, double[] p0)
dst
- p0
- - Lie sphere coordinates for a Euclidean planepublic static double[] getPointCoordinates(double[] dst, double[] p0)
dst
- p0
- - Lie sphere coordinates of a Euclidean pointpublic static double[] getProperSphereCenter(double[] dst, double[] p0)
dst
- p0
- - Lie sphere coordinates for a Euclidean point or a proper spherepublic static double[] getProperSphereCoordinates(double[] dst, double[] p0)
dst
- p0
- - Lie sphere coordinates of a proper spherepublic static double[] getSphereCenter(double[] dst, double[] p0)
dst
- p0
- - Lie sphere coordinates for a Euclidean point or a proper spherepublic static double[] getSphereCoordinates(double[] dst, double[] p0)
dst
- p0
- - Lie sphere coordinates for a Euclidean point or a proper spherepublic static double getSphereRadius(double[] p0)
p0
- - Lie sphere coordinates for a Euclidean point or a proper spherepublic static boolean isContactElement(double[][] c)
c
- public static boolean isContactElement(double[][] c, boolean adaptTol)
public static boolean isGeneralizedSphere(double[] p0)
public static boolean isGeneralizedSphere(double[] p0, boolean adaptTol)
public static boolean isInfinity(double[] p0)
p0
- public static boolean isInfinity(double[] p0, boolean adaptTol)
public static boolean isPlane(double[] p0)
p0
- public static boolean isPlane(double[] p0, boolean adaptTol)
public static boolean isPoint(double[] p0)
p0
- public static boolean isPoint(double[] p0, boolean adaptTol)
public static boolean isProperSphere(double[] p0)
p0
- public static boolean isProperSphere(double[] p0, boolean adaptTol)
protected static double lieInnerProduct(double[] p0, double[] p1)
public static double[][] normalizeContactElement(double[][] dst, double[] p0, double[] p1)
dst
- p0
- p1
- public static double[] normalizeLieSphereCoordinates(double[] dst, double[] p0)
dst
- p0
-