A Unity library providing implementations of computational geometry algorithms for intersection detection, triangulation, mesh generation, and more.
Computational Geometry Unity Library is a C# library for the Unity game engine that provides implementations of fundamental computational geometry algorithms. It solves the problem of needing reliable, performant geometric computations—like collision detection, mesh generation, and spatial partitioning—without requiring developers to implement these complex algorithms from scratch.
Unity developers and game programmers who need to perform geometric calculations, such as those working on procedural content generation, physics systems, terrain editing, or visual effects.
Developers choose this library because it offers a wide range of well-documented, tested algorithms specifically for Unity, along with companion tutorials that explain the underlying math, making it both a practical tool and an educational resource.
Computational Geometry Unity library with implementations of intersection algorithms, triangulations like delaunay, voronoi diagrams, polygon clipping, bezier curves, ear clipping, convex hulls, mesh simplification, etc
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The library is paired with extensive visual tutorials on Habrador's website, explaining the math behind algorithms like Ear Clipping and Delaunay triangulation, making it a learning tool.
Offers a wide range of 2D/3D implementations, from intersection testing to mesh simplification, saving developers from reinventing the wheel for common geometry tasks.
Tested with Unity 2018.4 LTS and provided as drag-and-drop folders, with utilities like a Normalizer object to handle coordinate systems specific to Unity.
Includes several algorithms for key tasks, such as Jarvis March and Quickhull for convex hulls, allowing flexibility based on performance or robustness needs.
The README warns that algorithms like point-in-polygon suffer from floating-point errors, requiring manual input normalization which adds setup complexity and risk.
Admits limitations in the TODO list, such as unsupported holes-in-holes for Ear Clipping, and known issues like colinear point problems in Delaunay triangulation.
Focuses on clarity over speed; for instance, simpler algorithms like Jarvis March are included for understanding, but may not scale well for high-performance real-time applications.