Home▸Geometry▸Computational Geometry Explorer

🧪 Computational Geometry Explorer (3D)

A real 3D computational-geometry engine: an incremental convex-hull algorithm, a Delaunay triangulation built through the classic paraboloid-lift duality, and a genuine divide-and-conquer closest-pair search — pick a mode, regenerate the points, and orbit the result.

Geometry3DHard60 FPS⇄ 2D version
3d-computational-geometry-explainer ↗ Open standalone

Computational geometry is the branch of computer science that designs correct, efficient algorithms for problems built from points, lines and polygons — convex hulls, triangulations, nearest-neighbour queries and the data structures that support them. The 2D original covering this topic explained those ideas in prose and pseudocode, but its own "Interactive Demo" never executed a single one of them: it just scattered random points on the page and flipped each one's colour with a coin flip. This 3D companion runs the real algorithms instead — a genuine incremental convex-hull construction, a Delaunay triangulation obtained through the classical paraboloid-lift duality, and a real divide-and-conquer closest-pair search — rendered as an orbitable 3D scene you can rebuild and rotate around.

⚙ Under the hood

Convex Hull mode builds a seed tetrahedron, then for each remaining point removes every face it can see and stitches new faces along the resulting horizon — verified against a unit cube (exact volume 8, Euler's formula V−E+F=2 holds) and against 40-point random clouds. Delaunay mode lifts each 2D point (x,y) onto the paraboloid z=x²+y² and takes the lower faces of that point set's 3D convex hull — the textbook duality that turns triangle-quality comparisons into a pure convex-hull question, verified to produce zero degenerate triangles and use every input point. Closest Pair mode sorts points by x, recurses on each half, and rechecks only the strip straddling the split bounded by the best distance found so far — verified to exactly match brute-force search across 20 random trials of up to 65 points.

Convex HullDelaunay TriangulationClosest Pair

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)