diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27e9f8d9..910a0277 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to PGS will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Dates are *YYYY-MM-DD*.
-## **1.3.1** *(2023-06-xx)*
+## **1.4.0** *(2023-06-xx)*
### Added
* `sobolLDS()` to `PGS_PointSet`. Generates a set of 2D deterministic stratified points from the Sobol low discrepancy sequence.
diff --git a/pom.xml b/pom.xml
index 059467fc..a503ef91 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
micycle
PGS
- 1.3.1-SNAPSHOT
+ 1.4.0
Processing Geometry Suite
Geometric algorithms for Processing
@@ -33,7 +33,7 @@
org.apache.maven.plugins
maven-source-plugin
- 3.3
+ 3.3.0
attach-sources
@@ -247,7 +247,7 @@
org.tinspin
tinspin-indexes
- 1.7.1
+ 1.8.0
org.junit.jupiter
diff --git a/src/main/java/micycle/pgs/PGS_CirclePacking.java b/src/main/java/micycle/pgs/PGS_CirclePacking.java
index b772eaa8..a344e8f6 100644
--- a/src/main/java/micycle/pgs/PGS_CirclePacking.java
+++ b/src/main/java/micycle/pgs/PGS_CirclePacking.java
@@ -80,7 +80,7 @@ private PGS_CirclePacking() {
* @return A list of PVectors, where each PVector represents a circle. The x and
* y components of the PVector represent the center of the circle, and
* the z component represents the radius of the circle.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static List obstaclePack(PShape shape, Collection pointObstacles, double areaCoverRatio) {
final Geometry geometry = fromPShape(shape);
diff --git a/src/main/java/micycle/pgs/PGS_Construction.java b/src/main/java/micycle/pgs/PGS_Construction.java
index ec36ab5d..f9653168 100644
--- a/src/main/java/micycle/pgs/PGS_Construction.java
+++ b/src/main/java/micycle/pgs/PGS_Construction.java
@@ -253,7 +253,7 @@ public static PShape createArc(double centerX, double centerY, double width, dou
* @param centerY the y-coordinate of the center of the shape
* @param radius the radius of the shape
* @return a PShape representing the Taijitu shape
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape createTaijitu(double centerX, double centerY, double radius) {
Coordinate center = new Coordinate(centerX, centerY);
@@ -289,7 +289,7 @@ public static PShape createTaijitu(double centerX, double centerY, double radius
* @param radius radius of the largest (enclosing) circle
* @param notchPosition the fractional position, between 0 and 1, along the
* diameter where the notch will be
- * @since 1.3.1
+ * @since 1.4.0
* @return a PShape representing the Arbelos shape
*/
public static PShape createArbelos(double centerX, double centerY, double radius, double notchPosition) {
@@ -426,7 +426,7 @@ public static PShape createHeart(final double centerX, final double centerY, fin
* @param height height of the teardrop
* @param m order of the curve. Values of [2...5] give good results
* @return
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape createTeardrop(final double centerX, final double centerY, double height, final double m) {
// https://mathworld.wolfram.com/TeardropCurve.html
@@ -457,7 +457,7 @@ public static PShape createTeardrop(final double centerX, final double centerY,
* @param radius maximum radius of gear teeth
* @param n number of gear teeth
* @return the gear shape
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape createGear(final double centerX, final double centerY, final double radius, final int n) {
// https://mathworld.wolfram.com/GearCurve.html
@@ -562,7 +562,7 @@ public static PShape createRing(double centerX, double centerY, double outerRadi
* shapes).
* @param seed the seed for the random number generator
* @return the sponge shape
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape createSponge(double width, double height, int generators, double thickness, double smoothing, int classes,
long seed) {
@@ -761,7 +761,7 @@ public static PShape createRectangularSpiral(float x, float y, float width, floa
* @param cellHeight visual/pixel width of each cell
* @return a stroked PATH PShape
* @see #createRandomSFCurve(int, int, double, double, long)
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape createRandomSFCurve(int nColumns, int nRows, double cellWidth, double cellHeight) {
return createRandomSFCurve(nColumns, nRows, cellWidth, cellHeight, System.nanoTime());
@@ -780,7 +780,7 @@ public static PShape createRandomSFCurve(int nColumns, int nRows, double cellWid
* @param seed random seed
* @return a stroked PATH PShape
* @see #createRandomSFCurve(int, int, double, double)
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape createRandomSFCurve(int nColumns, int nRows, double cellWidth, double cellHeight, long seed) {
RandomSpaceFillingCurve factory = new RandomSpaceFillingCurve(nColumns, nRows, seed);
@@ -822,7 +822,7 @@ public static PShape createRandomSFCurve(int nColumns, int nRows, double cellWid
* recommended. This is akin to increasing the depth of
* fractal curve.
* @param seed the seed for the random number generator
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape createSuperRandomPolygon(double dimensions, int cells, double markFraction, int smoothing, int depth,
boolean orthogonal, boolean holes, long seed) {
@@ -857,7 +857,7 @@ public static PShape createSuperRandomPolygon(double dimensions, int cells, doub
* more "spiky".
* @param seed the seed for the random number generator
* @return the random polygon shape
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape createRandomBezierPolygon(int nPoints, double scale, double radius, double spikiness, long seed) {
BezierShapeGenerator bsg = new BezierShapeGenerator(nPoints, 3, radius, spikiness);
diff --git a/src/main/java/micycle/pgs/PGS_Contour.java b/src/main/java/micycle/pgs/PGS_Contour.java
index d8006060..1cbc1336 100644
--- a/src/main/java/micycle/pgs/PGS_Contour.java
+++ b/src/main/java/micycle/pgs/PGS_Contour.java
@@ -648,7 +648,7 @@ public static PShape distanceField(PShape shape, double spacing) {
* @return A new PShape representing the smoothed longest center line of the
* input shape.
* @see #centerLine(PShape, double, double)
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape centerLine(PShape shape) {
return centerLine(shape, 0.7, 50);
@@ -682,7 +682,7 @@ public static PShape centerLine(PShape shape) {
* value to use is ~50.
* @return A new PShape representing the smoothed longest center line of the
* input shape.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape centerLine(PShape shape, double straightnessWeighting, double smoothing) {
/*
diff --git a/src/main/java/micycle/pgs/PGS_Conversion.java b/src/main/java/micycle/pgs/PGS_Conversion.java
index 16ffdc7f..8399bc8a 100644
--- a/src/main/java/micycle/pgs/PGS_Conversion.java
+++ b/src/main/java/micycle/pgs/PGS_Conversion.java
@@ -774,7 +774,7 @@ private static Geometry fromPrimitive(PShape shape) {
*
* @param vertices
* @return a POINTS PShape
- * @since 1.3.1
+ * @since 1.4.0
*/
public static final PShape toPointsPShape(PVector... vertices) {
return toPointsPShape(Arrays.asList(vertices));
@@ -806,7 +806,7 @@ public static final PShape toPointsPShape(Collection points) {
* The x and y components represent the center of the circle, and
* the z component represents the radius.
* @return The PShape object representing the collection of circles.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static final PShape toCircles(Collection circles) {
return toPShape(circles.stream().map(c -> PGS_Construction.createEllipse(c.x, c.y, c.z, c.z)).collect(Collectors.toList()));
@@ -895,7 +895,7 @@ public static SimpleGraph toGraph(PShape shape) {
*
* @param graph the graph to be converted into a PShape.
* @return a PShape representing the polygonized edges of the graph.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape fromGraph(SimpleGraph graph) {
return PGS.polygonizeEdges(graph.edgeSet());
@@ -988,7 +988,7 @@ public static SimpleGraph toDualGraph(PShape mesh) {
* containing no graph loops or multiple edges. Each vertex in the graph
* represents the centroid of a face in the input mesh, and each edge
* represents adjacency between two faces.
- * @since 1.3.1
+ * @since 1.4.0
* @see #toDualGraph(PShape)
* @see PGS_ShapePredicates#centroid(PShape)
*/
@@ -1102,7 +1102,7 @@ public static byte[] toWKB(PShape shape) {
* @param shape shape to process
* @param filename Absolute file path (with filename and extension). Prefix with
* "./" for a relative path.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static void toWKB(PShape shape, String filename) {
WKBWriter writer = new WKBWriter();
@@ -1341,7 +1341,7 @@ public static PShape fromPVector(PVector... vertices) {
* @param shell vertices of the shell of the polygon
* @param holes (optional) list of holes
* @return
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape fromPVector(List shell, @Nullable List> holes) {
boolean closed = false;
@@ -1397,7 +1397,7 @@ public static PShape fromPVector(List shell, @Nullable List comparator) {
List children = getChildren(shape);
@@ -1703,7 +1703,7 @@ public static PShape copy(PShape shape) {
* @param controlPoint
* @param end
* @return
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape fromQuadraticBezier(PVector start, PVector controlPoint, PVector end) {
// convert to cubic bezier form
@@ -1721,7 +1721,7 @@ public static PShape fromQuadraticBezier(PVector start, PVector controlPoint, PV
* @param controlPoint2
* @param end
* @return
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape fromCubicBezier(PVector start, PVector controlPoint1, PVector controlPoint2, PVector end) {
CubicBezier bezier = new CubicBezier(start.x, start.y, controlPoint1.x, controlPoint1.y, controlPoint2.x, controlPoint2.y, end.x,
diff --git a/src/main/java/micycle/pgs/PGS_Meshing.java b/src/main/java/micycle/pgs/PGS_Meshing.java
index ff033b0d..1c35c062 100644
--- a/src/main/java/micycle/pgs/PGS_Meshing.java
+++ b/src/main/java/micycle/pgs/PGS_Meshing.java
@@ -574,7 +574,7 @@ public static PShape spiralQuadrangulation(List points) {
* isn't conforming (i.e. adjacent edges do not necessarily have
* identical start and end coordinates)
* @return the input shape, having been noded and polygonized
- * @since public
since 1.3.1
+ * @since public
since 1.4.0
*/
public static PShape nodeNonMesh(PShape shape) {
final List segmentStrings = new ArrayList<>(shape.getChildCount() * 3);
@@ -604,7 +604,7 @@ public static PShape nodeNonMesh(PShape shape) {
* merged.
* @param seed the seed for the random number generator
* @return a new GROUP PShape representing the result of the operation
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape stochasticMerge(PShape mesh, int nClasses, long seed) {
final RandomGenerator random = new XoRoShiRo128PlusRandomGenerator(seed);
@@ -668,7 +668,7 @@ public static PShape stochasticMerge(PShape mesh, int nClasses, long seed) {
* Generally this should be set to true, otherwise the
* mesh will shrink as it is smoothed.
* @return the smoothed mesh
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape smoothMesh(PShape mesh, int iterations, boolean preservePerimeter) {
PMesh m = new PMesh(mesh);
@@ -704,7 +704,7 @@ public static PShape smoothMesh(PShape mesh, int iterations, boolean preservePer
* perimeter). Generally this should be set to true,
* otherwise the mesh will shrink as it is smoothed.
* @return the smoothed mesh
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape smoothMesh(PShape mesh, double displacementCutoff, boolean preservePerimeter) {
displacementCutoff = Math.max(displacementCutoff, 1e-3);
@@ -730,7 +730,7 @@ public static PShape smoothMesh(PShape mesh, double displacementCutoff, boolean
* @param preservePerimeter whether to only simplify inner-boundaries and
* leaving outer boundary edges unchanged.
* @return GROUP shape comprising the simplfied mesh faces
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape simplifyMesh(PShape mesh, double tolerance, boolean preservePerimeter) {
Geometry[] geometries = PGS_Conversion.getChildren(mesh).stream().map(s -> PGS_Conversion.fromPShape(s)).toArray(Geometry[]::new);
@@ -751,7 +751,7 @@ public static PShape simplifyMesh(PShape mesh, double tolerance, boolean preserv
*
* @param mesh The conforming mesh shape to extract inner edges from.
* @return A shape representing the dissolved linework of inner mesh edges.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape extractInnerEdges(PShape mesh) {
List edges = PGS_SegmentSet.fromPShape(mesh);
@@ -775,7 +775,7 @@ public static PShape extractInnerEdges(PShape mesh) {
* faces. Any faces smaller than this threshold will be
* consolidated into their neighboring faces.
* @return GROUP shape comprising the merged mesh faces
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape areaMerge(PShape mesh, double areaThreshold) {
PShape merged = AreaMerge.areaMerge(mesh, areaThreshold);
@@ -793,7 +793,7 @@ public static PShape areaMerge(PShape mesh, double areaThreshold) {
* split into. Should be a positive integer, but if less than 1,
* it's reset to 1.
* @return A new mesh PShape created from the split edges.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape splitEdges(PShape split, int parts) {
parts = Math.max(1, parts);
diff --git a/src/main/java/micycle/pgs/PGS_Morphology.java b/src/main/java/micycle/pgs/PGS_Morphology.java
index ad3e1216..c2070559 100644
--- a/src/main/java/micycle/pgs/PGS_Morphology.java
+++ b/src/main/java/micycle/pgs/PGS_Morphology.java
@@ -307,7 +307,7 @@ public static PShape simplifyDCE(PShape shape, int targetNumVertices) {
* tightly it is "pulled" towards underlying vertices). Suitable
* domain is [0.666...3].
* @return a Hobby Curve
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape simplifyHobby(PShape shape, double tension) {
tension = Math.max(tension, 0.668); // prevent degeneracy
@@ -462,7 +462,7 @@ public static PShape smoothGaussian(PShape shape, double sigma) {
* @return A new PShape, simplified through the application of the Elliptic
* Fourier Descriptors up to the indicated order. This shape will always
* have the same number of vertices as the original.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape smoothEllipticFourier(PShape shape, int descriptors) {
Geometry g = fromPShape(shape);
diff --git a/src/main/java/micycle/pgs/PGS_Optimisation.java b/src/main/java/micycle/pgs/PGS_Optimisation.java
index 3d0492b7..8202e8ab 100644
--- a/src/main/java/micycle/pgs/PGS_Optimisation.java
+++ b/src/main/java/micycle/pgs/PGS_Optimisation.java
@@ -163,7 +163,7 @@ public static PShape maximumInscribedAARectangle(PShape shape, boolean fast) {
* @param shape
* @param tolerance a value of 2-5 is usually suitable
* @return shape representing the maximum square
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape maximumPerimeterSquare(PShape shape, double tolerance) {
shape = PGS_Morphology.simplify(shape, tolerance / 2);
@@ -254,7 +254,7 @@ public static PShape minimumWidthRectangle(PShape shape) {
*
* @param shape The shape to compute the minimum-area rectangle for.
* @return A PShape object representing the minimum-area rectangle.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape minimumAreaRectangle(PShape shape) {
return toPShape(MinimumAreaRectangle.getMinimumRectangle(fromPShape(shape)));
@@ -385,7 +385,7 @@ public static PShape largestEmptyCircle(PShape obstacles, @Nullable PShape bound
* of the found largest empty circles as {@code PVector(x, y, r)}, where
* {@code x} and {@code y} are the center coordinates, and {@code r} is
* the radius
- * @since 1.3.1
+ * @since 1.4.0
*/
public static List largestEmptyCircles(PShape obstacles, @Nullable PShape boundary, int n, double tolerance) {
tolerance = Math.max(0.01, tolerance);
@@ -411,7 +411,7 @@ public static List largestEmptyCircles(PShape obstacles, @Nullable PSha
* @return A list of PVectors, each representing one circle: (.x, .y) represent
* the center point and .z represents radius.
* @see #circleCoverage(PShape, int, long)
- * @since 1.3.1
+ * @since 1.4.0
*/
public static List circleCoverage(PShape shape, int n) {
return circleCoverage(shape, n, System.nanoTime());
@@ -428,7 +428,7 @@ public static List circleCoverage(PShape shape, int n) {
* @return A list of PVectors, each representing one circle: (.x, .y) represent
* the center point and .z represents radius.
* @see #circleCoverage(PShape, int)
- * @since 1.3.1
+ * @since 1.4.0
*/
public static List circleCoverage(PShape shape, int n, long seed) {
// same as 'Simple Methods to Represent Shapes with Sample Spheres'
@@ -495,7 +495,7 @@ private RectPackHeuristic(PackingHeuristic h) {
* rectangles
* @param heuristic the packing heuristic to use. The heuristic determines
* rules for how every subsequent rectangle is placed
- * @since 1.3.1
+ * @since 1.4.0
* @return a GROUP PShape, where each immediate child is a GROUP shape
* corresponding to a bin; the child shapes of each bin are rectangles.
* Bins are positioned at (0, 0).
@@ -537,7 +537,7 @@ public static PShape rectPack(List rectangles, int binWidth, int binHei
* @param spacing the amount of spacing between each packed shape (>= 0).
* @return a new GROUP PShape object containing the packed shapes arranged in
* columns
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape binPack(List shapes, double binWidth, double binHeight, int binColumns, double spacing) {
if (shapes.isEmpty()) {
@@ -732,7 +732,7 @@ public static PVector solveApollonius(PVector c1, PVector c2, PVector c3, int s1
* @param viewPoint view point from which to compute visibility. If the input if
* polygonal, the viewpoint may lie outside the polygon.
* @return a polygonal shape representing the visibility polygon.
- * @since 1.3.1
+ * @since 1.4.0
* @see #visibilityPolygon(PShape, Collection)
*/
public static PShape visibilityPolygon(PShape obstacles, PVector viewPoint) {
@@ -752,7 +752,7 @@ public static PShape visibilityPolygon(PShape obstacles, PVector viewPoint) {
* if polygonal, viewpoints may lie outside the polygon.
* @return a polygonal shape representing the visibility polygon (possibly a
* GROUP shape of disjoint visibility polygons).
- * @since 1.3.1
+ * @since 1.4.0
* @see #visibilityPolygon(PShape, PVector)
*/
public static PShape visibilityPolygon(PShape obstacles, Collection viewPoints) {
diff --git a/src/main/java/micycle/pgs/PGS_PointSet.java b/src/main/java/micycle/pgs/PGS_PointSet.java
index f08124ee..f27ac275 100644
--- a/src/main/java/micycle/pgs/PGS_PointSet.java
+++ b/src/main/java/micycle/pgs/PGS_PointSet.java
@@ -150,7 +150,7 @@ public static List hilbertSort(List points) {
*
* @param points list of points to cluster
* @param groups desired number of clustered groups
- * @since 1.3.1
+ * @since 1.4.0
* @see #cluster(Collection, int, long)
* @return list of groups, where each group is a list of PVectors
*/
@@ -168,7 +168,7 @@ public static List> cluster(Collection points, int groups
* @param points list of points to cluster
* @param groups desired number of clustered groups
* @param seed random seed
- * @since 1.3.1
+ * @since 1.4.0
* @return list of groups, where each group is a list of PVectors
* @see #cluster(Collection, int)
*/
@@ -197,7 +197,7 @@ public static List> cluster(Collection points, int groups
* (set to 1).
*
* @param points list of points, where the z coordinate is point weight
- * @since 1.3.1
+ * @since 1.4.0
* @return 2D median point
*/
public static PVector weightedMedian(Collection points) {
@@ -831,7 +831,7 @@ public static List nRooksLDS(double xMin, double yMin, double xMax, dou
* @param xMax x-coordinate of boundary maximum
* @param yMax y-coordinate of boundary maximum
* @param n number of points to generate
- * @since 1.3.1
+ * @since 1.4.0
* @return
*/
public static List sobolLDS(double xMin, double yMin, double xMax, double yMax, int n) {
diff --git a/src/main/java/micycle/pgs/PGS_Processing.java b/src/main/java/micycle/pgs/PGS_Processing.java
index c60f30e6..10a1c255 100644
--- a/src/main/java/micycle/pgs/PGS_Processing.java
+++ b/src/main/java/micycle/pgs/PGS_Processing.java
@@ -645,7 +645,7 @@ public static List generateRandomGridPoints(PShape shape, int maxPoints
* 0.5
produces maximal nesting.
* @return A PShape representing the nested shape, including the input shape and
* all the nested levels.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape nest(PShape shape, int n, double r) {
final Polygon polygon = (Polygon) fromPShape(shape);
@@ -768,7 +768,7 @@ private static Polygon removeSmallHoles(Polygon polygon, double areaThreshold) {
* @return a new PShape that represents the holes extracted from the input
* shape. If the input had multiple holes, the output is a GROUP PShape
* where each child is polygon of one hole.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape extractHoles(PShape shape) {
final Geometry g = fromPShape(shape);
@@ -951,7 +951,7 @@ public static PShape equalPartition(final PShape shape, final int parts) {
* @param seed number used to initialize the underlying pseudorandom number
* generator
* @return a GROUP PShape, whose child shapes are partitions of the original
- * @since 1.3.1
+ * @since 1.4.0
*/
@SuppressWarnings("unchecked")
public static PShape equalPartition(final PShape shape, final int parts, long seed) {
@@ -1191,7 +1191,7 @@ public static PShape cleanCoverage(PShape coverage, double distanceTolerance, do
* should return false
. You can use a lambda
* expression or a method reference to implement the
* Predicate function.
- * @since 1.3.1
+ * @since 1.4.0
* @return A new PShape that contains only the children shapes of the input
* shape that satisfy the given Predicate function
* (==false
).
diff --git a/src/main/java/micycle/pgs/PGS_SegmentSet.java b/src/main/java/micycle/pgs/PGS_SegmentSet.java
index 7b8c0123..8bb61bce 100644
--- a/src/main/java/micycle/pgs/PGS_SegmentSet.java
+++ b/src/main/java/micycle/pgs/PGS_SegmentSet.java
@@ -408,7 +408,7 @@ public static PShape toPShape(Collection segments, @Nullable Integer stro
* @param segments Collection of PEdge objects to dissolve into maximal-length
* LineStrings
* @return A PShape object representing the dissolved LineStrings
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape dissolve(Collection segments) {
Geometry g = SegmentStringUtil.toGeometry(fromPEdges(segments), PGS.GEOM_FACTORY);
@@ -429,7 +429,7 @@ public static PShape dissolve(Collection segments) {
* GROUP shapes.
* @return A list of unique PEdge segments representing the edges of the input
* shape and its child shapes.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static List fromPShape(PShape shape) {
List edges = new ArrayList<>(shape.getFamily() != PShape.GROUP ? shape.getVertexCount() : shape.getChildCount() * 4);
@@ -461,7 +461,7 @@ public static List fromPShape(PShape shape) {
* than 1 will stretch the edges, while a value between 0 and 1
* will shrink them.
* @return A new List of PEdges representing the stretched edges.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static List stretch(List segments, double factor) {
List stretchedEdges = new ArrayList<>(segments.size());
@@ -531,7 +531,7 @@ public static List filterAxisAligned(List segments, double angleDe
* shape
* @param shape the polygonal shape to check for interior segments
* @return a list of interior segments contained within the shape
- * @since 1.3.1
+ * @since 1.4.0
*/
public static List getPolygonInteriorSegments(List segments, PShape shape) {
Geometry g = PGS_Conversion.fromPShape(shape);
diff --git a/src/main/java/micycle/pgs/PGS_ShapeBoolean.java b/src/main/java/micycle/pgs/PGS_ShapeBoolean.java
index 16741847..c08f3e3c 100644
--- a/src/main/java/micycle/pgs/PGS_ShapeBoolean.java
+++ b/src/main/java/micycle/pgs/PGS_ShapeBoolean.java
@@ -278,7 +278,7 @@ public static PShape subtract(final PShape a, final PShape b) {
* @param shell polygonal shape
* @param holes single polygon, or GROUP shape, whose children are holes that
* lie within the shell
- * @since 1.3.1
+ * @since 1.4.0
* @see #subtract(PShape, PShape)
* @return
*/
diff --git a/src/main/java/micycle/pgs/PGS_ShapePredicates.java b/src/main/java/micycle/pgs/PGS_ShapePredicates.java
index a1b2449c..1472ee31 100644
--- a/src/main/java/micycle/pgs/PGS_ShapePredicates.java
+++ b/src/main/java/micycle/pgs/PGS_ShapePredicates.java
@@ -274,7 +274,7 @@ public static PVector centroid(PShape shape) {
*
* @param shape
* @return median point
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PVector median(PShape shape) {
List points = PGS_Conversion.toPVector(shape);
@@ -420,7 +420,7 @@ public static double elongation(final PShape shape) {
*
* @param shape
* @return a value in [0, 1]
- * @since 1.3.1
+ * @since 1.4.0
*/
public static double convexity(PShape shape) {
// also see 'A New Convexity Measure for Polygons'
@@ -502,7 +502,7 @@ public static double maximumInteriorAngle(PShape shape) {
* @param b polygonal shape
* @return The EFD distance between the two provided PShapes. Smaller values
* indicate greater similarity or equivalence between the shapes.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static double efdSimilarity(PShape a, PShape b) {
int n = Math.min(a.getVertexCount(), b.getVertexCount()) / 2;
@@ -594,7 +594,7 @@ public static boolean isConvex(PShape shape) {
*
* @param mesh shape to test
* @return true if the shape is a conforming mesh
- * @since 1.3.1
+ * @since 1.4.0
*/
public static boolean isConformingMesh(PShape mesh) {
Geometry[] geoms = PGS_Conversion.getChildren(mesh).stream().map(f -> fromPShape(f)).toArray(Geometry[]::new);
@@ -619,7 +619,7 @@ public static boolean isConformingMesh(PShape mesh) {
*
* @param shape The PShape to validate.
* @return {@code true} if the shape is valid, {@code false} otherwise.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static boolean isValid(PShape shape) {
IsValidOp validate = new IsValidOp(fromPShape(shape));
diff --git a/src/main/java/micycle/pgs/PGS_Transformation.java b/src/main/java/micycle/pgs/PGS_Transformation.java
index accf700a..4e3879d3 100644
--- a/src/main/java/micycle/pgs/PGS_Transformation.java
+++ b/src/main/java/micycle/pgs/PGS_Transformation.java
@@ -84,7 +84,7 @@ public static PShape originScale(PShape shape, double scale) {
* @param scale The scale factor by which the area of the shape should be
* scaled.
* @return A new PShape representing the scaled shape.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape scaleArea(PShape shape, double scale) {
Geometry geometry = fromPShape(shape);
@@ -100,7 +100,7 @@ public static PShape scaleArea(PShape shape, double scale) {
* @param shape The PShape to be scaled.
* @param targetArea The target area for the shape.
* @return The scaled PShape (now having an area of targetArea
).
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape scaleAreaTo(PShape shape, double targetArea) {
Geometry geometry = fromPShape(shape);
@@ -432,7 +432,7 @@ public static PShape homotheticTransformation(PShape shape, PVector center, doub
* @param baseShape the shape that the other shape will be aligned to.
* @return a new PShape that is the transformed and aligned version of
* sourceShape.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape align(PShape sourceShape, PShape transformShape) {
return align(sourceShape, transformShape, 1);
@@ -455,7 +455,7 @@ public static PShape align(PShape sourceShape, PShape transformShape) {
* alignment.
* @return a new PShape that is the transformed and aligned version of
* sourceShape.
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape align(PShape alignShape, PShape baseShape, double alignmentRatio) {
final Geometry g1 = fromPShape(alignShape);
diff --git a/src/main/java/micycle/pgs/PGS_Triangulation.java b/src/main/java/micycle/pgs/PGS_Triangulation.java
index 6ded13e9..05610559 100644
--- a/src/main/java/micycle/pgs/PGS_Triangulation.java
+++ b/src/main/java/micycle/pgs/PGS_Triangulation.java
@@ -440,7 +440,7 @@ public static PShape earCutTriangulation(PShape shape) {
*
* @param triangulation the IIncrementalTin object to convert
* @return a GROUP PShape, where each child shape is one triangle
- * @since 1.3.1
+ * @since 1.4.0
*/
public static PShape toPShape(IIncrementalTin triangulation) {
final PShape out = new PShape(PConstants.GROUP);
diff --git a/src/main/java/micycle/pgs/commons/PMesh.java b/src/main/java/micycle/pgs/commons/PMesh.java
index a87e99eb..713fea96 100644
--- a/src/main/java/micycle/pgs/commons/PMesh.java
+++ b/src/main/java/micycle/pgs/commons/PMesh.java
@@ -23,7 +23,7 @@
* vertices.
*
* @author Michael Carleton
- * @since 1.3.1
+ * @since 1.4.0
*/
public class PMesh {