Baltor Get started

Gallery / Mesh algorithms

3D convex hull by quickhull

In your harnessMesh algorithmMIT

Compute the convex hull of 3D points as a closed mesh with outward faces, merging coplanar triangles into polygons. Use it for collision shapes, bounding volumes and faceted gem forms.

Render of 3D convex hull by quickhull
The render its check recorded in Godot 4.7.2, 256 by 256 pixels.

What it takes and gives

Entry points
convex_hull, sphere_points, random_points, build, main
Parameters
count, distribution, seed
Complexity
O(n log n) expected, O(n^2) worst case
Axes
+Y up, metres

Limits. Floating-point predicates with a relative tolerance (1e-9 of the bounding-box diagonal): points closer than that to a face count as inside, and nearly coplanar faces may stay split. Fewer than four distinct points, or points that are all collinear or coplanar, raise an error. The command line output is flat shaded, so it is not closed as stored; the function result is closed.

Details

Kind
Mesh algorithm
Engine
Python 3.10 or later
Files
10 files, 198.5 KB
Licence
MIT
Declared effects
reads files, runs commands, writes files
Checked with
Godot 4.7.2, gl_compatibility, OpenGL 3 driver, Mesa llvmpipe under Xvfb
Checks
generator runs system python, generator runs verifier python, gltf strict structure, interpreters agree, example matches generator, godot headless gltf load, godot compatibility render
Techniques
Quickhull (Barber, Dobkin and Huhdanpaa 1996), Horizon edge extraction, Coplanar facet merging by union-find, Golden-angle (Fibonacci) sphere sampling
Tags
convex hull, quickhull, computational geometry, collision, bounding volume, point cloud
Identity
library.supply.creative_originals.5b21a3e813eae9feab1ab48d.224a25cdb27bdda5
Version
224a25cdb27bdda5d731e8bf8df5621fca4784a90563724532e53bed875d9b69

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.