โ† All examples

mesh algorithms

3D convex hull by quickhull

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.

Recorded render of 3D convex hull by quickhull

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • component.json
  • example.gltf
  • meshkit.py
  • preview.png
  • quickhull_3d.py
  • test_package.py
  • verification/native.json

How it works

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

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • generator_runs_system_python
  • generator_runs_verifier_python
  • gltf_strict_structure
  • interpreters_agree
  • example_matches_generator
  • godot_headless_gltf_load
  • godot_compatibility_render

Limits to consider

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.