All Projects → micycle1 → PGS

micycle1 / PGS

Licence: other
Processing Geometry Suite

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to PGS

Cgal
The public CGAL repository, see the README below
Stars: ✭ 2,825 (+7143.59%)
Mutual labels:  geometry, computational-geometry, geometry-processing
tektosyne
The Tektosyne Library for Java provides algorithms for computational geometry and graph-based pathfinding, along with supporting mathematical utilities and specialized collections.
Stars: ✭ 52 (+33.33%)
Mutual labels:  computational-geometry, delaunay-triangulation
polliwog
2D and 3D computational geometry library
Stars: ✭ 22 (-43.59%)
Mutual labels:  geometry, computational-geometry
ludigraphix.github.io
Documentation for Ludigraphix
Stars: ✭ 21 (-46.15%)
Mutual labels:  shapes, geometry
Tinfour
Delaunay and Constrained Delaunay Triangulations in Java, providing high-performance utilities for modeling surfaces with support for Lidar LAS files, Digital Elevation Models (DEM), finite element analysis, path planning, natural neighbor interpolation, and other applications of Triangulated Irregular Networks (TIN)
Stars: ✭ 119 (+205.13%)
Mutual labels:  computational-geometry, delaunay-triangulation
SplashGeom
Open-source C++ library for geometry and linear algebra
Stars: ✭ 22 (-43.59%)
Mutual labels:  geometry, computational-geometry
polygon-splitter
A small (<10kb minified) javascript library for splitting polygons by a polyline.
Stars: ✭ 20 (-48.72%)
Mutual labels:  geometry, computational-geometry
Wagyu
A general library for geometry operations of union, intersections, difference, and xor
Stars: ✭ 116 (+197.44%)
Mutual labels:  geometry, computational-geometry
macuahuitl
The "Macuahuitl" Generative Art Toolbox
Stars: ✭ 68 (+74.36%)
Mutual labels:  shapes, geometry
delaunator-rs
Fast 2D Delaunay triangulation in Rust. A port of Delaunator.
Stars: ✭ 115 (+194.87%)
Mutual labels:  geometry, delaunay-triangulation
mcut
A simple and fast library for mesh booleans and more.
Stars: ✭ 57 (+46.15%)
Mutual labels:  computational-geometry, geometry-processing
pyprt
Python bindings for the "Procedural Runtime" (PRT) of CityEngine by Esri.
Stars: ✭ 36 (-7.69%)
Mutual labels:  geometry, geometry-processing
Matgeom
Matlab geometry toolbox for 2D/3D geometric computing
Stars: ✭ 168 (+330.77%)
Mutual labels:  geometry, geometry-processing
topo
A Geometry library for Elixir that calculates spatial relationships between two geometries
Stars: ✭ 125 (+220.51%)
Mutual labels:  geometry, computational-geometry
Cavaliercontours
2D polyline library for offsetting, combining, etc.
Stars: ✭ 135 (+246.15%)
Mutual labels:  geometry, computational-geometry
geometry
Geometric primitives for Ruby
Stars: ✭ 46 (+17.95%)
Mutual labels:  geometry, geometry-processing
Hgeometry
HGeometry
Stars: ✭ 98 (+151.28%)
Mutual labels:  geometry, computational-geometry
Lazysets.jl
A Julia package for calculus with convex sets
Stars: ✭ 107 (+174.36%)
Mutual labels:  geometry, computational-geometry
BodyParts3D
Clone of the BodyParts3D/Anatomography 3D model files
Stars: ✭ 32 (-17.95%)
Mutual labels:  geometry, geometry-processing
MidcurveNN
Computation of Midcurve of Thin Polygons using Neural Networks
Stars: ✭ 19 (-51.28%)
Mutual labels:  geometry, computational-geometry

Lines of Code

Processing Geometry Suite

Processing Geometry Suite is a software project that provides easy access to 2D geometric algorithms in the form of a Processing library.

The focus of the library is on visualisation rather than providing underlying data structures. To this end all methods in the library are static and most of them take in and return PShapes or PVectors.

Docs are hosted via GitHub Pages here.

Overview

Library functionality is split over the following classes:

  • PGS_CirclePacking
    • Circle packings of shapes, subject to varying constraints and patterns of tangencies
  • PGS_Coloring
    • Minimal colorings of meshes (or mesh-like shapes)
  • PGS_Construction
    • Construct uncommon/interesting 2D primitives
  • PGS_Contour
    • Methods that produce various contours from shapes: medial axes, straight skeletons, offset curves, etc.
  • PGS_Conversion
    • Conversion between Processing PShapes and JTS Geometries
  • PGS_Meshing
    • Mesh generation (excluding triangulation) from shapes
  • PGS_Morphology
    • Methods that affect the geometry or topology of shapes (buffering, simplification, smoothing, etc.)
  • PGS_Optimsation
    • Solve geometric optimisation problems, such as finding the maximum inscribed circle, or the closest vertex to a coordinate
  • PGS_PointSet
    • Generates sets of 2D points having a variety of different distributions and constraints
  • PGS_Processing
    • Methods that process a shape in some way: compute hulls, partition, slice, etc.
  • PGS_ShapeBoolean
    • Boolean set-operations for 2D shapes
  • PGS_ShapePredicates
    • Various shape metrics (area, circularity, etc.) and predicates ("do these shapes intersect?")
  • PGS_Tiling
    • Tiling, tessellation and subdivision of the plane using periodic or non-periodic geometric shapes.
  • PGS_Transformation
    • Various geometric and affine transformations that affect vertex coordinates
  • PGS_Triangulation
    • Delaunay triangulation (constrained and refined) and earcut triangulation of shapes and point sets
  • PGS_Voronoi
    • Voronoi Diagrams of shapes and point sets

Installation

Processing IDE — Quick

Download the latest PGS.jar from releases and simply drag-and-drop it onto the Processing IDE.

Processing IDE — Permanently

Download the latest PGS.jar from releases and save it to Documents\Processing\libraries\PGS\library.

Result: Documents\Processing\libraries\PGS\library\PGS.jar.

(Note the .jar and the folder must be called PGS — rename the .jar if this is not the case).

Maven/Gradle

PGS is hosted as an artifact for use in Maven or Gradle projects via Jitpack — follow the instructions there (very easy).

Examples

A number of example Processing sketches are provided in examples.

Illustrations

Much of the functionality (but by no means all) is demonstrated below:

2D Boolean Operations

Union Intersection Subtraction Symmetric Difference
Complement Mesh Union

Transformation

Rotate Around Translate To Touch Scale
Rotate a shape around its centroid or an arbitrary point. Translate a shape such that its centroid matches some position. Scale one shape such that it touches another.
Resize Homothetic Transformation Shear
Projection-transform a shape with respect to a fixed point.

Geometric Predicates & Metrics

Intersects Contains Shape Contains Point

Do shapes intersect with each other?

Does one shape fully contain another?

For individual points and point sets.

Metrics

  • Length/perimeter
  • Width & Height
  • Diameter
  • Circularity
  • Similarity
  • Holes
  • Is simple?
  • Is convex?
  • Distance
  • Area
  • Centroid

Contour

Isolines Offset Curves
Isolines from intra-shape euclidean distance, or point sets. Inner and exterior offset curves; based on miter, bevel or round offset styles.
Voronoi Diagram Circle-site Voronoi Diagram
Straight Skeleton Medial Axis
Medial axis transform with feature pruning via distance, area or axial angle.

Morphology

Buffer Erosion-Dilation Minkowski Addition
A negative followed by a positive buffer (in a single operation). Minkowski sum and difference (a.k.a buffer one shape using another shape; the examples add a rotating & growing triangle).
Smoothing Gaussian Smoothing Rounding
Radial Warp Field Warp
Simplification Chaikin Cutting Interpolation

Geometry Processing

Points on Perimeter Point on Perimeter Densification
Find N points (evenly distributed) along the perimeter of a shape, or points every D distance (with optional perpendicular offset). Find a point some fraction along the perimeter of a shape (with perpendicular offset).
Perimeter Extraction Partitioning Splitting Slicing
Partition a shape into simple (convex) polygons. Subdivide (recursively) a shape into quadrants. Slice a shape in two along a given line.
Constrained Random Point Set Segment Set Intersection
Generate constrained random point sets where all points lie within a shape. Points can be distributed entirely randomly or according to grid with configurable tightness. Find all points of intersection between a collection of line segments.
Concave Hull Convex Hull
Concave hull of point sets via breadth-first or depth-first approaches.
Snap Hull Shape Intersection Polygonize Lines
A convex hull with some level of shape-feature snapping. Find all points of intersection between two shapes. Find the polygonal faces formed by a set of intersecting line segments.

Triangulation

Delaunay Triangulation Earcut Triangulation
Poisson Delaunay Triangulation
Delaunay triangulation of shapes where steiner points generated by poisson disk sampling are inserted.

Meshing

Urquhart Faces Gabriel Faces Triangulation Dual
Polygon faces of an Urquhart Graph (derived from a triangulation). Polygon faces of a Gabriel Graph (derived from a triangulation).
Centroid Quadrangulation Edge Collapse Quadrangulation Split Quadrangulation Spiral Quadrangulation

Geometric Optimisation

Maximum Inscribed Circle Minimum Bounding Rectangle Maximum Inscribed Rectangle
Minimum Bounding Circle Minimum Bounding Ellipse
Minimum Bounding Triangle Envelope Problem of Apollonius
Closest Vertex Closest Point Pair Farthest Point Pair

Circle Packing

Front Chain Trinscribed
Maximum Inscribed Stochastic
Square Lattice Hex Lattice

Coloring

Construction

Supercircle Supershape Star
Random Convex Polygon Heart Ring Linear Spiral
Fermat Spiral Sierpinski Curve

Point Sets

Random Gaussian Square Grid Hex Grid
Phyllotaxis Poisson Hexagon Ring
Halton LDS Hammersley LDS Plastic LDS Jittered Plastic LDS
N-Rooks LDS Distance Prune

Tiling & Subdivision

Random Quad Subdivision Random Rect Subdivision Random Triangle Subdivision Islamic Tiling
Doyle Spiral Hexagon Tiling Penrose Tiling
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].