org.starhope.appius.physica
Class CubicAlgorithm

java.lang.Object
  extended by org.starhope.appius.physica.TriangulationAlgorithm
      extended by org.starhope.appius.physica.CubicAlgorithm

 class CubicAlgorithm
extends TriangulationAlgorithm

CubicAlgorithm class. O(n^3) algorithm.


Field Summary
(package private)  Circle bC
          WRITEME
(package private) static String cubicAlgName
          WRITEME
(package private)  int i
          WRITEME
(package private)  int nFaces
          WRITEME
(package private)  int s
          WRITEME
(package private)  int t
          WRITEME
(package private)  int u
          WRITEME
 
Fields inherited from class org.starhope.appius.physica.TriangulationAlgorithm
algName, edgeState, insideState, nStates, pointState, state, triangleState, triangulationState
 
Constructor Summary
CubicAlgorithm(Triangulation tri, int nPoints)
           
 
Method Summary
private  void addOrUpdateTriangle(int eI, Triangulation tri, int numFaces)
          Add new triangle or update edge info if s-t is on hull.
 void completeFacet(int eI, Triangulation tri, int numFaces)
          Complete a facet by looking for the circle free point to the left of the edge "e_i".
 Point2D findClosestNeighbours(Point2D.Double[] p, int nPoints)
          Find the two closest points.
private  void findPointFreeCircumcircle(Triangulation tri, Point2D.Double[] p)
          Find point free circumcircle to the left.
 void reset()
          WRITEME: Document this method brpocock@star-hope.org
 void triangulate(Triangulation tri)
          WRITEME: Document this method brpocock@star-hope.org
 
Methods inherited from class org.starhope.appius.physica.TriangulationAlgorithm
nextStep, setAlgorithmState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cubicAlgName

static final String cubicAlgName
WRITEME

See Also:
Constant Field Values

bC

Circle bC
WRITEME


i

int i
WRITEME


nFaces

int nFaces
WRITEME


s

int s
WRITEME


t

int t
WRITEME


u

int u
WRITEME

Constructor Detail

CubicAlgorithm

public CubicAlgorithm(Triangulation tri,
                      int nPoints)
Parameters:
tri - WRITEME
nPoints - WRITEME
Method Detail

addOrUpdateTriangle

private void addOrUpdateTriangle(int eI,
                                 Triangulation tri,
                                 int numFaces)
Add new triangle or update edge info if s-t is on hull.

Parameters:
eI - WRITEME
tri - WRITEME
numFaces - WRITEME

completeFacet

public void completeFacet(int eI,
                          Triangulation tri,
                          int numFaces)
Complete a facet by looking for the circle free point to the left of the edge "e_i". Add the facet to the triangulation. This function is a bit long and may be better split.

Parameters:
eI - WRITEME
tri - WRITEME
numFaces - WRITEME

findClosestNeighbours

public Point2D findClosestNeighbours(Point2D.Double[] p,
                                     int nPoints)
Find the two closest points.

Parameters:
p - WRITEME
nPoints - WRITEME
Returns:
WRITEME

findPointFreeCircumcircle

private void findPointFreeCircumcircle(Triangulation tri,
                                       Point2D.Double[] p)
Find point free circumcircle to the left.

Parameters:
tri - WRITEME
p - WRITEME

reset

public void reset()
Description copied from class: TriangulationAlgorithm
WRITEME: Document this method brpocock@star-hope.org

Overrides:
reset in class TriangulationAlgorithm
See Also:
TriangulationAlgorithm.reset()

triangulate

public void triangulate(Triangulation tri)
Description copied from class: TriangulationAlgorithm
WRITEME: Document this method brpocock@star-hope.org

Specified by:
triangulate in class TriangulationAlgorithm
Parameters:
tri - WRITEME
See Also:
TriangulationAlgorithm.triangulate(org.starhope.appius.physica.Triangulation)