sugr
Class Plane_3D

java.lang.Object
  extended bysugr.Element
      extended bysugr.Entity
          extended bysugr.Object_3D
              extended bysugr.Plane_3D
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Plane_3D
extends Object_3D

Implementation of Plane_3D

Version:
1.2 (25.1.2004) Changed Constructor Plane_3D(Point, Line) and Plane_3D(Point,Point,Point) to not use Construction Class anymore. Calculation is now done in Constructor itself. By Achim Königs, 1.1 (10.2.2003) Fixed: getJacobianHomogeneousPart() returned wrong matrix
Author:
Norbert Fischer
See Also:
Serialized Form

Field Summary
private static int DIM
           
private static int DOF
           
private static long serialVersionUID
          Class version number for serialization
 
Fields inherited from class sugr.Element
cov, MAXITER, v
 
Constructor Summary
Plane_3D()
          default constructor
Plane_3D(double x, double y, double z)
          constructs a new Plane_3D by specifying the homogeneous part.
Plane_3D(double x, double y, double z, double w)
          constructs a new plane by setting all entries directly.
Plane_3D(double x, double y, double z, double w, Matrix cov)
          constructs a new plane by setting all entries directly.
Plane_3D(double x, double y, double z, Matrix cov)
          constructs a new Plane_3D by specifying the homogeneous part.
Plane_3D(Line_3D L1, Line_3D L2)
          estimates a new plane by a join of two coplanar lines
Plane_3D(Line_3D line, Point_3D point)
          constructs a new plane by a join between point and line.
Plane_3D(Point_3D point, Line_3D line)
          constructs a new plane by a join between point and line.
Plane_3D(Point_3D point1, Point_3D point2, Point_3D point3)
          constructs a plane by a join of three points.
Plane_3D(RelationalProperty[] rprops)
          Estimates a new plane
Plane_3D(Vector _v, Matrix _cov)
          Constructor for a new Plane_3D
 
Method Summary
 Plane_3D copy()
          returns a copy of this plane.
protected  Matrix getConditionMatrix(double f)
          Get a matrix W(f) for conditioning.
 Matrix getCovarianceOfJacobianRowOfRelation(java.lang.Class relationType, java.lang.Class partnerType, int row)
          Return Covariance of a Row of the Jacobian Matrix of that entity in combination with a relation.
 int getDegreesOfFreedom()
          returns dof=3 of this plane
 int getDimension()
          returns dimension=4 for this plane
 double getDistance(Entity e)
          Compute the (euclidean) distance to another entity.
 int getDofOfRelation(java.lang.Class relationType, java.lang.Class partnerType)
           Compute degrees of freedom of a relation.
 Vector getEuclideanPart()
          returns the euclidean part of this plane
 Vector getHomogeneousPart()
          returns the homogeneous part of this plane
 Matrix getJacobianOfRelation(java.lang.Class relationType, java.lang.Class partnerType)
          Return Jacobian Matrix of that entity in combination with a relation.
protected  Matrix[] getReducedAB(RelationalProperty rprop)
          Get the reduced Matrix A and B from a relational property.
 void normalizeEuclidean()
          normalizes in that way, that the homogeneous part will be 1
 Matrix Pi()
          returns the pi-jacobian of this plane
static Matrix Pi(Vector v_in)
          returns the pi-jacobian of a 4x1 vector
 Matrix PiDual()
          returns the pidual-jacobian of the dual of this plane
static Matrix PiDual(Vector v)
          Returns the pidual-jacobian of the dual of a 4x1 vector Uses now the PiDual function of Point to ensure consistency (T.Laebe, 15.11.05)
 
Methods inherited from class sugr.Entity
doCondition, doCondition, doCondition, ensureConstraintsWithoutIteration, getConditionFactorF, getConditionFactorF, getDistanceToOrigin, getJacobianOfRelation, getNormOfEuclideanPart, getNormOfHomogeneousPart, isEqual, isIncident, isOrthogonal, isParallel, normalizeEuclideanComparable, transform
 
Methods inherited from class sugr.Element
approximate, calcCov, changeNullspace, changeNullspace, checkCovDim, checkElement, clone, ensureConstraints, estimate, estimate, gaussHelmertIterations, gaussHelmertIterationsOld, getConstraintValue, getCov, getJacobianOfConstraint, getV, normalizeSphere, normalizeSphereComparable, print, print, reduceFirstMatrix, reduceMatrix, reduceMatrix, setCov, setV, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Class version number for serialization

See Also:
Constant Field Values

DIM

private static final int DIM
See Also:
Constant Field Values

DOF

private static final int DOF
See Also:
Constant Field Values
Constructor Detail

Plane_3D

public Plane_3D(Vector _v,
                Matrix _cov)
Constructor for a new Plane_3D

Parameters:
_v - a Vector with dimension 4. Contains the coordinates of the new Line_2D
_cov - 4x4 covariance matrix

Plane_3D

public Plane_3D(double x,
                double y,
                double z,
                double w)
constructs a new plane by setting all entries directly. covariance matrix is set to 0 so it has no error


Plane_3D

public Plane_3D(double x,
                double y,
                double z,
                double w,
                Matrix cov)
constructs a new plane by setting all entries directly. With covariance

Parameters:
cov - 4x4 Matrix

Plane_3D

public Plane_3D(double x,
                double y,
                double z)
constructs a new Plane_3D by specifying the homogeneous part. Note that you are setting the normal of the plane. Euclidean part is set to 1.
covariance matrix is set to 0 so it has no error


Plane_3D

public Plane_3D(double x,
                double y,
                double z,
                Matrix cov)
constructs a new Plane_3D by specifying the homogeneous part. Note that you are setting the normal of the plane. Euclidean part is set to 1.
With covariance.


Plane_3D

public Plane_3D(Point_3D point,
                Line_3D line)
constructs a new plane by a join between point and line. Error propagation is done automatically

Parameters:
point - a Point_3D
line - a Line_3D

Plane_3D

public Plane_3D(Line_3D line,
                Point_3D point)
constructs a new plane by a join between point and line. Error propagation is done automatically

Parameters:
point - a Point_3D
line - a Line_3D

Plane_3D

public Plane_3D(Line_3D L1,
                Line_3D L2)
estimates a new plane by a join of two coplanar lines

Parameters:
L1 - a Line_3D
L2 - a Line_3D TODO: test fails, because covariance differs from statistically computed one, check estimation

Plane_3D

public Plane_3D(RelationalProperty[] rprops)
Estimates a new plane

Parameters:
rprops - an array of constraints.

Plane_3D

public Plane_3D(Point_3D point1,
                Point_3D point2,
                Point_3D point3)
constructs a plane by a join of three points. Error propagation will be done automatically


Plane_3D

public Plane_3D()
default constructor

Method Detail

getEuclideanPart

public Vector getEuclideanPart()
returns the euclidean part of this plane

Specified by:
getEuclideanPart in class Entity
Returns:
a Vector with one element

getHomogeneousPart

public Vector getHomogeneousPart()
returns the homogeneous part of this plane

Specified by:
getHomogeneousPart in class Entity
Returns:
a Vector with three elements

getDistance

public double getDistance(Entity e)
Compute the (euclidean) distance to another entity. This is of course not possible for all combinations. In the case of an illegal combination an IllegalArgumentException should be thrown.

Specified by:
getDistance in class Entity
Parameters:
e - the entity to which a distance should be computed.
Returns:
the distance to the given entity

getConditionMatrix

protected Matrix getConditionMatrix(double f)
Get a matrix W(f) for conditioning. This matrix can be used to transform an entity to a conditioned one.

Specified by:
getConditionMatrix in class Entity
Parameters:
f - the conditioning factor
Returns:
the condition matrix

copy

public Plane_3D copy()
returns a copy of this plane. Actually it works like clone


getDimension

public int getDimension()
returns dimension=4 for this plane

Specified by:
getDimension in class Element

getDegreesOfFreedom

public int getDegreesOfFreedom()
returns dof=3 of this plane

Specified by:
getDegreesOfFreedom in class Entity

Pi

public Matrix Pi()
returns the pi-jacobian of this plane


Pi

public static Matrix Pi(Vector v_in)
returns the pi-jacobian of a 4x1 vector


PiDual

public Matrix PiDual()
returns the pidual-jacobian of the dual of this plane


PiDual

public static Matrix PiDual(Vector v)
Returns the pidual-jacobian of the dual of a 4x1 vector Uses now the PiDual function of Point to ensure consistency (T.Laebe, 15.11.05)


normalizeEuclidean

public void normalizeEuclidean()
normalizes in that way, that the homogeneous part will be 1

Specified by:
normalizeEuclidean in class Entity

getJacobianOfRelation

public Matrix getJacobianOfRelation(java.lang.Class relationType,
                                    java.lang.Class partnerType)
                             throws java.lang.IllegalArgumentException
Return Jacobian Matrix of that entity in combination with a relation. If that entity is part of a relation then this relation has a constraint f(firstEntity)*secondEntity=g(secondEntity)*firstEntity=0. f and g are the Jacobians of these linear formulas. So return f or g (the choice f or g is given by the type of the entity !)

Specified by:
getJacobianOfRelation in class Entity
Parameters:
relationType - the type of the relation
partnerType - the type of the other partner in the relation
Returns:
Jacobian matrix (or part of the constraint formula)
Throws:
java.lang.IllegalArgumentException

getDofOfRelation

public int getDofOfRelation(java.lang.Class relationType,
                            java.lang.Class partnerType)
                     throws java.lang.IllegalArgumentException

Compute degrees of freedom of a relation.

Specified by:
getDofOfRelation in class Entity
Parameters:
relationType - the type of the relation
partnerType - the type of the other partner in the relation
Returns:
degrees of freedom for the relation

Throws:
java.lang.IllegalArgumentException

getReducedAB

protected Matrix[] getReducedAB(RelationalProperty rprop)
Get the reduced Matrix A and B from a relational property. A is the Jacobian of this Entity (the unknown), B is the Jacobian of the observation (the relational property). The Jacobian of the oberservation depends (only) on the unknown and the Jacobian of the unknown depends (only) of the oberservation ! This method is overwritten to handle some the special cases.

Overrides:
getReducedAB in class Element
Parameters:
rprop - the relational Property
Returns:
A in array element 0, B in array Element 1.

getCovarianceOfJacobianRowOfRelation

public Matrix getCovarianceOfJacobianRowOfRelation(java.lang.Class relationType,
                                                   java.lang.Class partnerType,
                                                   int row)
                                            throws java.lang.IllegalArgumentException
Return Covariance of a Row of the Jacobian Matrix of that entity in combination with a relation.

Specified by:
getCovarianceOfJacobianRowOfRelation in class Entity
Parameters:
relationType - the type of the relation
partnerType - the type of the other partner in the relation
Returns:
Covariance of the row of the Jacobian matrix
Throws:
java.lang.IllegalArgumentException