Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gwlucastrig committed Sep 4, 2018
1 parent 89d8fb2 commit 1d29c1d
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ High-Performance 2D Delaunay Triangulation and Related Utilities Written in Java
### Delaunay Triangulation ###
The Delaunay Triangulation defines an optimal form for organizing unstructured or semi-random
sample points into a triangular mesh. That optimality makes the Delaunay Triangulation
a useful tool for interpolation, grid construction, and surface analysis.
a useful tool for interpolation, grid construction, and surface analysis.

![Surface Models using TINs](doc/images/TwoTins.png "Surface Models using TINs")

### Tinfour ###
Expand Down
Binary file modified dist/Tinfour-1.0.jar
Binary file not shown.
Binary file modified dist/TinfourViewer-1.0.jar
Binary file not shown.
Binary file modified doc/TinfourAlgorithmsAndDataElements.pdf
Binary file not shown.
4 changes: 3 additions & 1 deletion src/main/java/tinfour/voronoi/BoundedVoronoi.java
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,9 @@ public List<Vertex> getVertices() {

/**
* Gets the vertices that were created to produce the Voronoi Diagram. The
* output does not include the original vertices from the input source
* output includes all circumcircle vertices that were computed when the
* structure was created. It does not include the original vertices
* from the input source
*
* @return a valid list of vertices
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*/
public class BoundedVoronoiBuildOptions {

protected boolean enableAdjustments = true;
protected boolean enableAdjustments = false;

// The default adjustment value of 30 was chosen through trial and error.
// A round number was chosen to reflect the fact that it is an arbitrary
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/tinfour/voronoi/BoundedVoronoiIntegrityCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,30 @@
import tinfour.common.IQuadEdge;
import tinfour.common.Vertex;

/**
* Provides tools for checking the correctness of the construction of
* a Voronoi Diagram.
*/
public class BoundedVoronoiIntegrityCheck {

String message;
BoundedVoronoi lmv;

/**
* Constructs an instance of the integrity checker tied to the
* specified instance.
* @param BoundedVoronoi a valid, correctly populated instance
*/
public BoundedVoronoiIntegrityCheck(BoundedVoronoi BoundedVoronoi) {
lmv = BoundedVoronoi;
message = null;
}

/**
* Tests the Voronoi Diagram to see if it passes a number of sanity
* checks for correctness of implementaiton.
* @return true if the structure passes the test series; otherwise, false.
*/
public boolean inspect() {
message = null;

Expand All @@ -54,11 +68,17 @@ public boolean inspect() {
// Test Series 1:
// Verify that the edges of polygons make a complete circuit
// Verify that the anchor vertex is always inside the polygon
// Verify that all polygons have positive area
// Also:
// Populate the visited array to indicate which edges
// are members of polygons.
for (int index = 0; index < polyList.size(); index++) {
ThiessenPolygon poly = polyList.get(index);
double area = poly.getArea();
if(area<=0){
message = "Polygon " + index+ " has non-positive area "+area;
return false;
}
List<IQuadEdge> eList = poly.getEdges();
IQuadEdge first = eList.get(0);
IQuadEdge edge = first;
Expand Down

0 comments on commit 1d29c1d

Please sign in to comment.