Geometry
Algorithms that reason about points, lines, shapes, and spaces.
Geometry algorithms answer spatial questions about shape boundaries, intersections, containment, and arrangements.
Convex Hull
Finds the smallest convex boundary that contains a set of points.
Graham Scan
Computes a convex hull by sorting points by angle and keeping valid turns.
Line Segment Intersection
Determines whether two line segments cross or touch.
Point in Polygon
Tests whether a point lies inside a polygon.
Delaunay Triangulation
Triangulates points so triangles avoid skinny angles as much as possible.
Jarvis March
Finds a convex hull by wrapping around the outside point by point.
Quickhull
Finds a convex hull by recursively choosing farthest outside points.
Separating Axis Theorem
Tests convex shape overlap by looking for an axis that separates them.
Sweep Line Algorithm
Processes geometric events in sorted order as a line moves across the plane.
Voronoi Diagram
Partitions space into regions closest to each input site.
Sutherland-Hodgman Polygon Clipping
Clips a polygon against each boundary of a convex clipping region.
Bentley-Ottmann Algorithm
Finds all line segment intersections with a sweep line and event queue.
Rotating Calipers
Solves convex polygon measurements by rotating supporting lines around the hull.
Fortune's Algorithm
Constructs a Voronoi diagram with a sweep line and beach line.
Bowyer-Watson Algorithm
Builds a Delaunay triangulation by inserting points and retriangulating invalid cavities.
Closest Pair of Points
Finds the two points with the smallest distance between them.
Ray-Triangle Intersection
Finds whether and where a ray hits a triangle.
Signed Distance Function Evaluation
Computes distance to a shape boundary with sign indicating inside or outside.
Weiler-Atherton Polygon Clipping
Clips complex polygons by walking between subject and clipping polygon boundaries at intersections.
Minimum Bounding Rectangle
Finds the smallest-area rectangle that encloses a set of points or a convex polygon.
Point-Line Distance
Computes the shortest distance from a point to a line.
Axis-Aligned Bounding Box Intersection
Tests whether two axis-aligned boxes overlap on every coordinate axis.
Oriented Bounding Box Intersection
Tests overlap between rotated boxes using candidate separating axes.
Bounding Volume Hierarchy Construction
Builds a tree of bounding volumes around geometry for faster spatial queries.
Minkowski Sum
Combines two shapes by adding every point in one shape to every point in the other.
Ramer-Douglas-Peucker
Simplifies a polyline by removing points whose deviation is below a tolerance.
Marching Squares
Extracts 2D contour lines from a scalar grid using cell case tables.
Ear Clipping Triangulation
Triangulates a simple polygon by repeatedly removing valid ears.
Barycentric Coordinates
Represents a point inside a triangle as weights on the triangle's vertices.
Laplacian Mesh Smoothing
Smooths a mesh by moving vertices toward the average of their neighbors.
Catmull-Clark Subdivision
Refines polygon meshes into smoother subdivision surfaces.
Quadric Error Mesh Simplification
Simplifies a mesh by collapsing edges that add the least quadric error.
Welzl's Minimum Enclosing Circle
Welzl's Minimum Enclosing Circle computes spatial relationships, shapes, or mesh changes from geometric predicates.
Andrew's Monotone Chain
Andrew's Monotone Chain computes spatial relationships, shapes, or mesh changes from geometric predicates.
Kirkpatrick-Seidel Algorithm
Kirkpatrick-Seidel Algorithm computes spatial relationships, shapes, or mesh changes from geometric predicates.
Plane Sweep Closest Pair
Plane Sweep Closest Pair computes spatial relationships, shapes, or mesh changes from geometric predicates.
Point Location in Triangulation
Point Location in Triangulation computes spatial relationships, shapes, or mesh changes from geometric predicates.
Polygon Boolean Operations
Polygon Boolean Operations computes spatial relationships, shapes, or mesh changes from geometric predicates.
Voronoi Relaxation
Voronoi Relaxation computes spatial relationships, shapes, or mesh changes from geometric predicates.
Lloyd's Algorithm
Lloyd's Algorithm computes spatial relationships, shapes, or mesh changes from geometric predicates.
Mesh Decimation
Mesh Decimation computes spatial relationships, shapes, or mesh changes from geometric predicates.
Half-Edge Mesh Traversal
Half-Edge Mesh Traversal computes spatial relationships, shapes, or mesh changes from geometric predicates.
Orientation Test
Determines whether three points make a left turn, right turn, or are collinear.
In-Circle Test
Tests whether a point lies inside, on, or outside the circumcircle of three oriented points.
Shewchuk Adaptive Predicates
Shewchuk Adaptive Predicates addresses robust geometric predicates by increasing arithmetic precision only when floating-point signs are uncertain.
Trapezoidal Map Point Location
Locates a query point in a planar subdivision using a trapezoidal decomposition and search DAG.
Kirkpatrick Point Location
Kirkpatrick Point Location addresses planar point location by building a hierarchy of simplified triangulations for logarithmic queries.
Straight Skeleton
Straight Skeleton addresses polygon offset structure by moving polygon edges inward and recording where wavefront events meet.
Voronoi-Based Medial Axis
Voronoi-Based Medial Axis addresses medial axis extraction by deriving central shape branches from Voronoi features.
Monotone Polygon Partitioning
Monotone Polygon Partitioning uses sweeping vertices to split a polygon into y-monotone pieces for polygon decomposition.
Hertel-Mehlhorn Convex Decomposition
Hertel-Mehlhorn Convex Decomposition addresses convex polygon decomposition by removing unnecessary triangulation diagonals while preserving convex pieces.
Bayazit Convex Decomposition
Bayazit Convex Decomposition addresses convex polygon decomposition by recursively splitting reflex vertices to create convex parts.
Visvalingam-Whyatt Simplification
Visvalingam-Whyatt Simplification handles polyline simplification by removing points with the smallest effective triangle area.
Hausdorff Distance
Measures the largest nearest-neighbor gap between two point sets or shapes.
Frechet Distance
Measures curve similarity while preserving the order of points along each curve.
Shape Context Matching
Shape Context Matching addresses shape matching by describing points by histograms of relative positions around them.
Procrustes Analysis
Aligns two point sets by choosing the translation, scale, and rotation that minimize squared error.
Topological Sweep
Topological Sweep addresses line arrangement traversal by sweeping an arrangement by maintaining a topological ordering instead of coordinates.
Zone Algorithm
Zone Algorithm addresses line arrangement update by walking the cells crossed by an inserted curve or line.
Incremental Line Arrangement Construction
Incremental Line Arrangement Construction addresses line arrangement construction by adding lines one at a time and updating affected cells.
Constrained Delaunay Triangulation
Constrained Delaunay Triangulation uses building Delaunay-like triangles while preserving required input edges for constrained triangulation.
Power Diagram
Power Diagram addresses weighted voronoi diagram by assigning points by weighted power distance instead of ordinary distance.
Configuration-Space Obstacle Construction
Configuration-Space Obstacle Construction addresses configuration-space construction by expanding obstacles by the robot shape to convert motion to point navigation.
Rotating Calipers Diameter
Finds the farthest pair of points on a convex polygon by scanning antipodal pairs.
Rotating Calipers Width
Rotating Calipers Width addresses polygon width by rotating support lines to find the minimum strip containing a convex polygon.
Rotating Calipers Antipodal Pairs
Rotating Calipers Antipodal Pairs addresses antipodal pair enumeration by advancing support vertices around a convex polygon.
Circle-Line Intersection
Finds where a line crosses, touches, or misses a circle.
Point-to-Segment Distance
Computes the shortest distance from a point to a finite line segment.
Orthogonal Range Search
Reports points inside an axis-aligned query rectangle or box.
Polygon Offset Curve
Polygon Offset Curve addresses polygon offsetting by shifting edges and resolving joins to expand or shrink a polygon.