Class KochSnowflakeBuilder
java.lang.Object
org.locationtech.jts.shape.GeometricShapeBuilder
org.locationtech.jts.shape.fractal.KochSnowflakeBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CoordinateList
private static final double
The height of an equilateral triangle of side oneprivate static final double
private static final double
private static final double
Fields inherited from class org.locationtech.jts.shape.GeometricShapeBuilder
extent, geomFactory, numPts
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addSegment
(Coordinate p0, Coordinate p1) void
addSide
(int level, Coordinate p0, Coordinate p1) private Coordinate[]
getBoundary
(int level, Coordinate origin, double width) static int
recursionLevelForSize
(int numPts) Methods inherited from class org.locationtech.jts.shape.GeometricShapeBuilder
createCoord, getCentre, getDiameter, getExtent, getRadius, getSquareBaseLine, getSquareExtent, setExtent, setNumPoints
-
Field Details
-
coordList
-
HEIGHT_FACTOR
private static final double HEIGHT_FACTORThe height of an equilateral triangle of side one -
ONE_THIRD
private static final double ONE_THIRD- See Also:
-
THIRD_HEIGHT
private static final double THIRD_HEIGHT -
TWO_THIRDS
private static final double TWO_THIRDS- See Also:
-
-
Constructor Details
-
KochSnowflakeBuilder
-
-
Method Details
-
recursionLevelForSize
public static int recursionLevelForSize(int numPts) -
getGeometry
- Specified by:
getGeometry
in classGeometricShapeBuilder
-
getBoundary
-
addSide
-
addSegment
-