Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gwlucastrig committed Sep 22, 2019
1 parent cf6db29 commit b0502d1
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,19 @@
import org.tinfour.utils.TriangleCollector;
import org.tinfour.utils.rendering.RenderingSurfaceAid;

/**
* Provides an example implementation of region-based constraints
* using the PolygonConstraint class.
*/
public class ConstraintStarDemo extends JPanel {

final static long serialVersionUID = 1;

static class TriangleRenderer implements Consumer<SimpleTriangle> {
/**
* Provides logic for rendering triangles produced by the example
* TIN implementation.
*/
private static class TriangleRenderer implements Consumer<SimpleTriangle> {

final Graphics2D g2d;
final AffineTransform af;
Expand Down Expand Up @@ -230,7 +238,7 @@ private void addGrid(List<Vertex> vertices) {
final static double A36 = Math.toRadians(36);
final static double A72 = Math.toRadians(72);

final static double rNotch = 1.0;
final static double rNotch = 1.0; // radius for inner (notch) vertices
final static double rPoint = rNotch * (cos(A36) + sin(A36) * tan(A72));

/**
Expand Down

0 comments on commit b0502d1

Please sign in to comment.