PGS 1.2.0
This is a large update that introduces 4 new geometry classes.
Added
PGS_PointSet— a class that generates sets of 2D points having a variety of different distributions and constraints.PGS_Coloring— a class for intelligent coloring of meshes (or mesh-like shapes) such that no two adjacent faces have the same color, while minimising the number of colors used.PGS_Tiling— a class for tiling, tessellation and subdivision of the plane using periodic or non-periodic geometric shapes.PGS_Meshing- a class to host mesh generation methods (excluding triangulation).toPointsPShape()toPGS_Conversion. Generates aPOINTStype PShape from a list of PVector points.- 3 additional method signatures (one for each return type) for
delaunayTriangulation()that accept a PShape only, returning a constrained triangulation. minimumBoundingTriangle()toPGS_Optimisation. Computes the minimum-area bounding triangle that encloses a shape or point set.unionMesh()toPGS_ShapeBoolean. Quickly and efficiently unions/merges the faces of a mesh-like shape together.setAllStrokeToFillColor()toPGS_Conversion. Sets the stroke color to the fill color for a PShape and all its descendants (separately).copy()toPGS_Conversion. Deep copies / clones a PShape.- A number of new primitives to
PGS_Construction: serpinskiCurve, linearSpiral, fermatSpiral. extractPerimeter()toPGS_Processing. Extracts a portion/subline of the perimeter of a shape between two locations.interpolate()toPGS_Morphology. Generates an intermediate shape between two shapes by interpolating/morphing between them.
Changed
PGS_Constructionnow preserves a PShape's fillColor, strokeColor and strokeWeight throughout forward-backward conversion. This behaviour can be toggle using the class'sPRESERVE_STYLEflag (default = true). Note that PGS' methods will generally not preserve the style of the original PShape because JTS does not preserve geometry user data during its operations.fieldWarp()now supportsPOINTSandGROUPPShapes.removeSmallHoles(),round()andchaikinCut()now supportGROUPPShape inputs.partition(),split()andslice()(fromPGS_Processing) now output a singleGROUPPShape (rather than a list of PShapes).- During conversion, JTS MultiGeometries that contain a single geometry only will be converted to a first-class PShape (rather than a GROUP PShape containing one child).
- Output PShapes are now always created with a shape family of
PATH(rather thanGEOMETRY) to maximise compatibility with theP2Drenderer. PGS_Contour.isolines()now accepts a contour smoothing parameter.PGS_Processing.polygonizeLines()is now more robust and faster.- Moved
urquhartFaces()andgabrielFaces()fromPGS_TriangulationtoPGS_Meshing. - Renamed
micycle.pgs.utilitypackage tomicycle.pgs.commons.
Fixed
- Occasional out of bounds error with Poisson Distribution.
- Error when constrained voronoiDiagram called with
GROUPPShape input. - Removing duplicate vertices during PShape->JTS conversion would remove every vertex (not just the duplicated ones).
Removed
PGS_Contour.straightSkeletonSolub()(didn't meet robustness standards)