Class SierpinskiCarpetBuilder
- java.lang.Object
-
- org.locationtech.jts.shape.GeometricShapeBuilder
-
- org.locationtech.jts.shape.fractal.SierpinskiCarpetBuilder
-
public class SierpinskiCarpetBuilder extends GeometricShapeBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private CoordinateListcoordList-
Fields inherited from class org.locationtech.jts.shape.GeometricShapeBuilder
extent, geomFactory, numPts
-
-
Constructor Summary
Constructors Constructor Description SierpinskiCarpetBuilder(GeometryFactory geomFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddHoles(int n, double originX, double originY, double width, java.util.List holeList)private LinearRingcreateSquareHole(double x, double y, double width)GeometrygetGeometry()private LinearRing[]getHoles(int n, double originX, double originY, double width)static intrecursionLevelForSize(int numPts)-
Methods inherited from class org.locationtech.jts.shape.GeometricShapeBuilder
createCoord, getCentre, getDiameter, getExtent, getRadius, getSquareBaseLine, getSquareExtent, setExtent, setNumPoints
-
-
-
-
Field Detail
-
coordList
private CoordinateList coordList
-
-
Constructor Detail
-
SierpinskiCarpetBuilder
public SierpinskiCarpetBuilder(GeometryFactory geomFactory)
-
-
Method Detail
-
recursionLevelForSize
public static int recursionLevelForSize(int numPts)
-
getGeometry
public Geometry getGeometry()
- Specified by:
getGeometryin classGeometricShapeBuilder
-
getHoles
private LinearRing[] getHoles(int n, double originX, double originY, double width)
-
addHoles
private void addHoles(int n, double originX, double originY, double width, java.util.List holeList)
-
createSquareHole
private LinearRing createSquareHole(double x, double y, double width)
-
-