cellularSurface
Class CellularSurface

java.lang.Object
  extended bycellularSurface.CellularSurface
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Cube, Dodecahedron, HexGrid, ProjectivizedCube, ProjectivizedDodecahedron, QuadMesh

public class CellularSurface
extends java.lang.Object
implements java.io.Serializable

A class to represent (combinatorially) a broad class of cell decompositions of orientable and non-orientable surfaces.

Created: Wed Jan 23 11:49:51 2002

Status: Incomplete, only halfheartedly debugged. TODO: write TestCellularSurface

See Also:
Serialized Form

Field Summary
static int NO_ELEMENT
          Index used to signify "no such edge/face/vertex exists".
static int NON_ORIENTED_INC
          Use this increment in a loop, if you want to iterate over positively (or negatively) oriented faces, vertices, or directed edges.
static int NON_ORIENTED_NON_DIRECTED_INC
          Use this increment in a loop, if you want to iterate over positively oriented and positively directed edges.
 
Constructor Summary
CellularSurface()
          Creates a CellularSurface object with no edges, faces, or vertices.
 
Method Summary
 int[] boundary(int face)
          Returns the boundary edges of a given face in the right order.
 int boundaryLength(int face)
          Returns the number of edges in the boundary of a given face.
 void buildFromFaceBoundaries(int[][] faceBoundaries)
          Build the surface with given face boundaries.
 void buildPoincareDual(CellularSurface surface)
          Let this be the Poincare dual of a give surface.
 void contractEdge(int edge)
          Contract an edge.
 void copy(CellularSurface surface)
           
 int edgeWithLeftFace(int face)
          Returns an edge with a given left face.
 int edgeWithTerminalVertex(int vertex)
          Returns an edge with a given terminal vertex.
 boolean equals(CellularSurface surface)
           
 int firstEdgeWithLeftFace(int face)
          Returns the first edge with given a left face.
static int fullIndexFromNonOriented(int i)
          TODO: Description, example of use.
static int fullIndexFromNonOrientedNonDirected(int i)
          TODO: Description, example of use.
 int[] getInitialVertex()
          For debugging purposes: Hand out a copy of initialVertex(int).
 int[] getLeftFace()
          For debugging purposes: Hand out a copy of leftFace(int).
 int[] getNextEdge()
          For debugging purposes: Hand out a copy of #nextEdge.
 int getNumEdges()
          Gets the number of non-oriented, non-directed edges.
 int getNumFaces()
          Gets the number of non-oriented faces.
 int getNumVertices()
          Gets the number of non-oriented vertices.
 int[] getPreviousEdge()
          For debugging purposes: Hand out a copy of #previousEdge.
static boolean hasPositiveDirection(int i)
          Checks if an edge has positive direction.
static boolean hasPositiveOrientation(int i)
          Checks if an edge, face, or vertex has positive orientation.
 int initialVertex(int i)
          Given the full index of an edge, returns the full index of the initial vertex; or NO_ELEMENT if no such vertex exists.
 boolean isBoundaryFace(int face)
          Returns true if face is boundary face and false otherwise.
static boolean isNoElement(int i)
          Compares with NO_ELEMENT.
 int lastEdgeWithLeftFace(int face)
          Returns the last edge with a given left face.
 int leftEdgeOfInitialVertex(int i)
          Given the full index of an edge, returns the full index of the next edge with the same initial vertex to the left (i.  e.  turning the edge in the counterclockwise direction); or NO_ELEMENT if no such edge exists.
 int leftEdgeOfTerminalVertex(int i)
          Given the full index of an edge, returns the full index of the next edge with the same terminal vertex to the left (i.  e.  turning the edge in the clockwise direction); or NO_ELEMENT if no such edge exists.
 int leftFace(int i)
          Given the full index of an edge, returns the full index of the face on its left side; or NO_ELEMENT if no such face exists.
 int leftmostEdgeWithTerminalVertex(int vertex)
          Returns the leftmost edge with a given terminal vertex.
 void medialGraph()
          Build the medial graph.
 int nextEdgeOfLeftFace(int i)
          Given the full index of an edge, returns the full index of the next edge in the boundary of the face on the left; or NO_ELEMENT if no such edge exists.
 int nextEdgeOfRightFace(int i)
          Given the full index of an edge, returns the full index of the next edge in the boundary of the face on the right; or NO_ELEMENT if no such edge exists.
static int nonDirectedIndex(int i)
          Given the full index of an edge, returns the index of the corresponding non-directed oriented edge.
static int nonOrientedIndex(int i)
          Given the full index of an edge, face, or vertex, returns the index of the corresponding non-oriented edge, face, or vertex.
static int nonOrientedNonDirectedIndex(int i)
          Given the full index of an edge, returns the index of the corresponding non-oriented, non-directed edge.
 int previousEdgeOfLeftFace(int i)
          Given the full index of an edge, returns the full index of the previous edge in the boundary of the face on the left; or NO_ELEMENT if no such edge exists.
 int previousEdgeOfRightFace(int i)
          Given the full index of an edge, returns the full index of the previous edge in the boundary of the face on the right; or NO_ELEMENT if no such edge exists.
 void printData()
          Print, in a tabular form, the data describing this surface.
static int reverseDirection(int i)
          Reverse the direction of an edge.
static int reverseOrientation(int i)
          Reverse the orientation of an edge, face, or vertex.
static int reverseOrientationAndDirection(int i)
          Reverse the orientation and direction of an edge.
 int rightEdgeOfInitialVertex(int i)
          Given the full index of an edge, returns the full index of the next edge with the same initial vertex to the right (i.  e.  turning the edge in the clockwise direction); or NO_ELEMENT if no such edge exists.
 int rightEdgeOfTerminalVertex(int i)
          Given the full index of an edge, returns the full index of the next edge with the same terminal vertex to the right (i.  e.  turning the edge in the counterclockwise direction); or NO_ELEMENT if no such edge exists.
 int rightFace(int i)
          Given the full index of an edge, returns the full index of the face on its right side; or NO_ELEMENT if no such face exists.
 void slideEdgeLeft(int edge)
          Slide an edge to the left.
 void slideEdgeRight(int edge)
          Slide an edge to the right.
 int splitEdgeAcross(int edge)
          Split an edge transversally.
 int splitEdgeAlong(int edge)
          Split an edge longitudinally.
 int terminalVertex(int i)
          Given the full index of an edge, returns the full index of the terminal vertex; or NO_ELEMENT if no such vertex exists.
 void truncateVertex(int vertex)
          Truncate a Vertex.
 void truncateVertices()
          Truncate all vertices.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_ELEMENT

public static final int NO_ELEMENT
Index used to signify "no such edge/face/vertex exists". Equals -1.

See Also:
Constant Field Values

NON_ORIENTED_INC

public static final int NON_ORIENTED_INC
Use this increment in a loop, if you want to iterate over positively (or negatively) oriented faces, vertices, or directed edges. Equals 2.

See Also:
Constant Field Values

NON_ORIENTED_NON_DIRECTED_INC

public static final int NON_ORIENTED_NON_DIRECTED_INC
Use this increment in a loop, if you want to iterate over positively oriented and positively directed edges. Equals 4.

See Also:
Constant Field Values
Constructor Detail

CellularSurface

public CellularSurface()
Creates a CellularSurface object with no edges, faces, or vertices.

Method Detail

getNextEdge

public int[] getNextEdge()
For debugging purposes: Hand out a copy of #nextEdge.


getPreviousEdge

public int[] getPreviousEdge()
For debugging purposes: Hand out a copy of #previousEdge.


getLeftFace

public int[] getLeftFace()
For debugging purposes: Hand out a copy of leftFace(int).


getInitialVertex

public int[] getInitialVertex()
For debugging purposes: Hand out a copy of initialVertex(int).


equals

public boolean equals(CellularSurface surface)

copy

public void copy(CellularSurface surface)

buildPoincareDual

public void buildPoincareDual(CellularSurface surface)
Let this be the Poincare dual of a give surface.

Parameters:
surface - the surface to dualize.

isNoElement

public static final boolean isNoElement(int i)
Compares with NO_ELEMENT.

Does not check if argument is negative. Does not and cannot check if argument is out of bounds, because argument could be the index of an edge, face, or vertex.

Parameters:
i - the full index of an edge, face, or vertex, or NO_ELEMENT.
Returns:
i == NO_ELEMENT

hasPositiveOrientation

public static final boolean hasPositiveOrientation(int i)
Checks if an edge, face, or vertex has positive orientation. The orientation is determined by the least significant bit of the index. A 0 means positive orientation, a 1 means negative orientation.

Does not check if argument is negative. Does not and cannot check if argument is out of bounds, because argument could be the index of an edge, face, or vertex.

Parameters:
i - the full index of an edge, face, or vertex
Returns:
(i & 1) == 0

hasPositiveDirection

public static final boolean hasPositiveDirection(int i)
Checks if an edge has positive direction. The direction is determined by the second least significant bit of the index. A 0 means positive direction, a 1 means negative direction.

Does not check if argument is negative or out of bounds.

Parameters:
i - the full index of an edge
Returns:
(i & 2) == 0

reverseOrientation

public static final int reverseOrientation(int i)
Reverse the orientation of an edge, face, or vertex.

If argument is NO_ELEMENT the return value is also NO_ELEMENT.

Parameters:
i - The full index of an edge, face or vertex, or NO_ELEMENT
Returns:
isNoElement(i) ? NO_ELEMENT : i ^ 1
See Also:
hasPositiveOrientation(int)

reverseDirection

public static final int reverseDirection(int i)
Reverse the direction of an edge.

If argument is NO_ELEMENT the return value is also NO_ELEMENT.

Parameters:
i - the full index of an edge, or NO_ELEMENT
Returns:
isNoElement(i) ? NO_ELEMENT : i ^ 2
See Also:
hasPositiveDirection(int)

reverseOrientationAndDirection

public static final int reverseOrientationAndDirection(int i)
Reverse the orientation and direction of an edge.

If argument is NO_ELEMENT the return value is also NO_ELEMENT.

Parameters:
i - the full index of an edge, or NO_ELEMENT
Returns:
isNoElement(i) ? NO_ELEMENT : i ^ 3
See Also:
hasPositiveDirection(int)

nonOrientedIndex

public static final int nonOrientedIndex(int i)
Given the full index of an edge, face, or vertex, returns the index of the corresponding non-oriented edge, face, or vertex.

If argument is NO_ELEMENT the return value is also NO_ELEMENT.

Parameters:
i - the full index of an edge, face, or vertex, or NO_ELEMENT
Returns:
isNoElement(i) ? NO_ELEMENT : i >> 1

nonDirectedIndex

public static final int nonDirectedIndex(int i)
Given the full index of an edge, returns the index of the corresponding non-directed oriented edge.

If argument is NO_ELEMENT the return value is also NO_ELEMENT.

Parameters:
i - the full index of an edge or NO_ELEMENT. Should be >= 0 and < 4 * getNumEdges(), or equal to NO_ELEMENT
Returns:
isNoElement(i) ? NO_ELEMENT : ((i >> 1) & 0xFFFFFFFE) | (i & 1). If argument is in recommended range, * return value is >= 0 and < 2 * getNumEdges(), or equal to NO_ELEMENT

nonOrientedNonDirectedIndex

public static final int nonOrientedNonDirectedIndex(int i)
Given the full index of an edge, returns the index of the corresponding non-oriented, non-directed edge.

If argument is NO_ELEMENT the return value is also NO_ELEMENT.

Parameters:
i - the full index of an edge or NO_ELEMENT. Should be >= 0 and < 4 * getNumEdges(), or equal to NO_ELEMENT
Returns:
isNoElement(i) ? NO_ELEMENT : ((i >> 1) & (!1)) || (i & 1). If argument is in recommended range, return value is >= 0 and < 2 * getNumEdges(), or equal to NO_ELEMENT

fullIndexFromNonOriented

public static final int fullIndexFromNonOriented(int i)
TODO: Description, example of use.

Parameters:
i - non-oriented index of a face, vertex, or directed edge
Returns:
i<<1. The full index of the corresponding positively oriented face, vertex, or directed edge

fullIndexFromNonOrientedNonDirected

public static final int fullIndexFromNonOrientedNonDirected(int i)
TODO: Description, example of use.

Parameters:
i - non-oriented, non-directed index of an edge
Returns:
i<<2. The full index of the corresponding positively oriented, positively directed edge

getNumEdges

public final int getNumEdges()
Gets the number of non-oriented, non-directed edges.

Returns:
the number of non-oriented, non-directed edges

getNumFaces

public final int getNumFaces()
Gets the number of non-oriented faces.

Returns:
the number of non-oriented faces

getNumVertices

public final int getNumVertices()
Gets the number of non-oriented vertices.

Returns:
the number of non-oriented vertices

nextEdgeOfLeftFace

public final int nextEdgeOfLeftFace(int i)
Given the full index of an edge, returns the full index of the next edge in the boundary of the face on the left; or NO_ELEMENT if no such edge exists.

Returns NO_ELEMENT, if

Parameters:
i - the full index of an edge
Returns:
the full index of the next edge in the boundary of the face on the left; or NO_ELEMENT
See Also:
nextEdgeOfRightFace(int), previousEdgeOfLeftFace(int), previousEdgeOfRightFace(int), leftEdgeOfInitialVertex(int), rightEdgeOfInitialVertex(int), leftEdgeOfTerminalVertex(int), rightEdgeOfTerminalVertex(int)

nextEdgeOfRightFace

public final int nextEdgeOfRightFace(int i)
Given the full index of an edge, returns the full index of the next edge in the boundary of the face on the right; or NO_ELEMENT if no such edge exists.

Returns NO_ELEMENT, if

Parameters:
i - the full index of an edge
Returns:
the full index of the next edge in the boundary of the face on the right; or NO_ELEMENT
See Also:
nextEdgeOfLeftFace(int), previousEdgeOfLeftFace(int), previousEdgeOfRightFace(int), leftEdgeOfInitialVertex(int), rightEdgeOfInitialVertex(int), leftEdgeOfTerminalVertex(int), rightEdgeOfTerminalVertex(int)

previousEdgeOfLeftFace

public final int previousEdgeOfLeftFace(int i)
Given the full index of an edge, returns the full index of the previous edge in the boundary of the face on the left; or NO_ELEMENT if no such edge exists.

Returns NO_ELEMENT, if

Parameters:
i - the full index of an edge
Returns:
the full index of the previous edge in the boundary of the face on the left; or NO_ELEMENT
See Also:
nextEdgeOfLeftFace(int), nextEdgeOfRightFace(int), previousEdgeOfRightFace(int), leftEdgeOfInitialVertex(int), rightEdgeOfInitialVertex(int), leftEdgeOfTerminalVertex(int), rightEdgeOfTerminalVertex(int)

previousEdgeOfRightFace

public final int previousEdgeOfRightFace(int i)
Given the full index of an edge, returns the full index of the previous edge in the boundary of the face on the right; or NO_ELEMENT if no such edge exists.

Returns NO_ELEMENT, if

Parameters:
i - the full index of an edge
Returns:
the full index of the previous edge in the boundary of the face on the right; or NO_ELEMENT
See Also:
nextEdgeOfLeftFace(int), nextEdgeOfRightFace(int), previousEdgeOfLeftFace(int), leftEdgeOfInitialVertex(int), rightEdgeOfInitialVertex(int), leftEdgeOfTerminalVertex(int), rightEdgeOfTerminalVertex(int)

leftEdgeOfInitialVertex

public final int leftEdgeOfInitialVertex(int i)
Given the full index of an edge, returns the full index of the next edge with the same initial vertex to the left (i.  e.  turning the edge in the counterclockwise direction); or NO_ELEMENT if no such edge exists.

Returns NO_ELEMENT, if

Parameters:
i - the full index of an edge
Returns:
the full index of the next edge with the same initial vertex to the left; or NO_ELEMENT
See Also:
rightEdgeOfInitialVertex(int), leftEdgeOfTerminalVertex(int), rightEdgeOfTerminalVertex(int), nextEdgeOfLeftFace(int), nextEdgeOfRightFace(int), previousEdgeOfLeftFace(int), previousEdgeOfRightFace(int)

rightEdgeOfInitialVertex

public final int rightEdgeOfInitialVertex(int i)
Given the full index of an edge, returns the full index of the next edge with the same initial vertex to the right (i.  e.  turning the edge in the clockwise direction); or NO_ELEMENT if no such edge exists.

Returns NO_ELEMENT, if

Parameters:
i - the full index of an edge
Returns:
the full index of the next edge with the same initial vertex to the right; or NO_ELEMENT
See Also:
leftEdgeOfInitialVertex(int), leftEdgeOfTerminalVertex(int), rightEdgeOfTerminalVertex(int), nextEdgeOfLeftFace(int), nextEdgeOfRightFace(int), previousEdgeOfLeftFace(int), previousEdgeOfRightFace(int)

leftEdgeOfTerminalVertex

public final int leftEdgeOfTerminalVertex(int i)
Given the full index of an edge, returns the full index of the next edge with the same terminal vertex to the left (i.  e.  turning the edge in the clockwise direction); or NO_ELEMENT if no such edge exists.

Returns NO_ELEMENT, if

Parameters:
i - the full index of an edge
Returns:
the full index of the next edge with the same terminal vertex to the left; or NO_ELEMENT
See Also:
leftEdgeOfInitialVertex(int), rightEdgeOfInitialVertex(int), rightEdgeOfTerminalVertex(int), nextEdgeOfLeftFace(int), nextEdgeOfRightFace(int), previousEdgeOfLeftFace(int), previousEdgeOfRightFace(int)

rightEdgeOfTerminalVertex

public final int rightEdgeOfTerminalVertex(int i)
Given the full index of an edge, returns the full index of the next edge with the same terminal vertex to the right (i.  e.  turning the edge in the counterclockwise direction); or NO_ELEMENT if no such edge exists.

Returns NO_ELEMENT, if

Parameters:
i - the full index of an edge
Returns:
the full index of the next edge with the same terminal vertex to the right; or NO_ELEMENT
See Also:
leftEdgeOfInitialVertex(int), rightEdgeOfInitialVertex(int), leftEdgeOfTerminalVertex(int), nextEdgeOfLeftFace(int), nextEdgeOfRightFace(int), previousEdgeOfLeftFace(int), previousEdgeOfRightFace(int)

leftFace

public final int leftFace(int i)
Given the full index of an edge, returns the full index of the face on its left side; or NO_ELEMENT if no such face exists.

Parameters:
i - full index of an edge
Returns:
full index of the face on the left side
See Also:
rightFace(int), initialVertex(int), terminalVertex(int)

rightFace

public final int rightFace(int i)
Given the full index of an edge, returns the full index of the face on its right side; or NO_ELEMENT if no such face exists.

Parameters:
i - full index of an edge
Returns:
full index of the face on the right side
See Also:
initialVertex(int), terminalVertex(int)

initialVertex

public final int initialVertex(int i)
Given the full index of an edge, returns the full index of the initial vertex; or NO_ELEMENT if no such vertex exists.

Parameters:
i - full index of an edge
Returns:
full index of the initial vertex
See Also:
terminalVertex(int), rightFace(int)

terminalVertex

public final int terminalVertex(int i)
Given the full index of an edge, returns the full index of the terminal vertex; or NO_ELEMENT if no such vertex exists.

Parameters:
i - full index of an edge
Returns:
full index of the terminal vertex
See Also:
initialVertex(int), leftFace(int), rightFace(int)

edgeWithTerminalVertex

public final int edgeWithTerminalVertex(int vertex)

Returns an edge with a given terminal vertex.

Parameters:
vertex - the full index of a vertex
Returns:
the full index of an edge with terminalVertex(edge) == vertex .
See Also:
leftmostEdgeWithTerminalVertex(int vertex)

leftmostEdgeWithTerminalVertex

public final int leftmostEdgeWithTerminalVertex(int vertex)

Returns the leftmost edge with a given terminal vertex.

Parameters:
vertex - the full index of a vertex
Returns:
See Also:
edgeWithTerminalVertex(int vertex)

edgeWithLeftFace

public final int edgeWithLeftFace(int face)

Returns an edge with a given left face.

Parameters:
face - the full index of a face
Returns:
the full index of an edge with leftFace(edge) == face .
See Also:
firstEdgeWithLeftFace(int face), lastEdgeWithLeftFace(int face)

firstEdgeWithLeftFace

public final int firstEdgeWithLeftFace(int face)

Returns the first edge with given a left face.

Parameters:
face - the full index of a face
Returns:
See Also:
edgeWithLeftFace(int face), lastEdgeWithLeftFace(int face)

lastEdgeWithLeftFace

public final int lastEdgeWithLeftFace(int face)

Returns the last edge with a given left face.

Parameters:
face - the full index of a face
Returns:
See Also:
edgeWithLeftFace(int face), firstEdgeWithLeftFace(int face)

isBoundaryFace

public final boolean isBoundaryFace(int face)
Returns true if face is boundary face and false otherwise. Also returns false, if face == NO_ELEMENT.

Parameters:
face - the full intex of a face
Returns:
true if face is boundary face and false otherwise

buildFromFaceBoundaries

public final void buildFromFaceBoundaries(int[][] faceBoundaries)
Build the surface with given face boundaries.

The value NO_ELEMENT = -1 may appear once in a boundary. The corresponding face is then a boundary face with non-closed boundary.

No checks are performed to test wether the resulting edge-links are consistent. Hence, there is no guarantee that the resulting surface is in a consistent state. What is even worse: Method #buildVertices() may run into an infinite loop. TODO: Remove this problem by checking consistency of edge-links.

Parameters:
faceBoundaries - the face boundaries. faceBoundaries[i][j] is edge j in the boundary of the face with non-oriented index i.

boundaryLength

public final int boundaryLength(int face)

Returns the number of edges in the boundary of a given face. If an edge appears twice in the boundary (with different orientation or direction), it is counted twice.

TODO: Implement the method coBoundaryLength(int vertex).

Parameters:
face - the full index of a face. Should be in the range from 0 to 2 * getNumFaces().
Returns:
the number of edges in the boundary.

boundary

public final int[] boundary(int face)

Returns the boundary edges of a given face in the right order.

The int array which is returned is newly created each time the method is called.

Parameters:
face - an int: the full index of a face
Returns:
an int[] of length boundaryLength(face), holding the full indices of the edges in the boundary

splitEdgeAcross

public final int splitEdgeAcross(int edge)

Split an edge transversally. This increases by one the number of edges and the number of vertices.

Introduces a new edge in series with (and following) edge and a new vertex between them. The new vertex is the terminal vertex of edge and the initial vertex of the new edge.

Parameters:
edge - the full index of the edge to be split.
Returns:
the full index of the new edge. This is the value that 4 getNumEdges() would have returned before the method was invoked.
See Also:
splitEdgeAlong(int edge)

splitEdgeAlong

public final int splitEdgeAlong(int edge)

Split an edge longitudinally. This increases by one the number of edges and the number of faces.

Introduces a new parallel edge to the right of edge and a new face between them. The new face is the right face of edge and the left face of the new edge.

Parameters:
edge - the full index of the edge to be split.
Returns:
the full index of the new edge. This is 4 * getNumEdges() .
See Also:
splitEdgeAcross(int edge)

slideEdgeLeft

public final void slideEdgeLeft(int edge)

Slide an edge to the left. Performs the following transformation:

    \         /              \         /
     \       /                \       /
      *-----*        ===>      *-----*
     /     / \                / \     \
    /     /   \              /   \     \
         *                        *
 

The numbers of vertices, edges, and faces do not change.

TODO: Improve this doc-comment.

Parameters:
edge - the full index of an edge. The following restrictions apply:
See Also:
slideEdgeRight(int edge)

slideEdgeRight

public final void slideEdgeRight(int edge)

Slide an edge to the right. Performs the following transformation:

    \         /              \         /
     \       /                \       /
      *-----*        ===>      *-----*
     / \     \                /     / \
    /   \     \              /     /   \
         *                        *
 

The numbers of vertices, edges, and faces do not change.

TODO: Improve this doc-comment.

Parameters:
edge - the full index of an edge. The following restrictions apply:
See Also:
slideEdgeLeft(int edge)

contractEdge

public void contractEdge(int edge)
Contract an edge.

Parameters:
edge - a non-negative int less than 4 * getNumEdges() : the edge to contract

truncateVertex

public void truncateVertex(int vertex)

Truncate a Vertex. This introduces one new face, d new edges, and d - 1 new vertices, where d is the degree of the vertex.

So far, vertex must not be a boundary vertex or have degree one. Otherwise, an IllegalArgumentException is thrown.

TODO: Come up with a good specification for what should be done in all possible cases and implement it.

Parameters:
vertex - a non-negative int less than 2 * getNumVertices() : the vertex to truncate
Throws:
java.lang.IllegalArgumentException - if vertex is a boundary vertex or has degree 1.

truncateVertices

public void truncateVertices()
Truncate all vertices. Simply calls truncateVertex(int vertex) for all original vertices.


medialGraph

public void medialGraph()
Build the medial graph. Truncates all vertices, then contracts original edges.


printData

public final void printData()
Print, in a tabular form, the data describing this surface.