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 CoordinateList
coordList
-
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 void
addHoles(int n, double originX, double originY, double width, java.util.List holeList)
private LinearRing
createSquareHole(double x, double y, double width)
Geometry
getGeometry()
private LinearRing[]
getHoles(int n, double originX, double originY, 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 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:
getGeometry
in 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)
-
-