โ† All examples

mesh algorithms

Superellipsoid superquadric

Generate Barr superquadric solids whose two exponents morph between boxes, cylinders, ellipsoids, diamonds and pinched stars, with the exact smooth volume available. Use it for rounded props and shape fitting.

Recorded render of Superellipsoid superquadric

What this component contains

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

How it works

Entry points
superellipsoid_point, superellipsoid, superellipsoid_volume, main
Parameters
size_x, size_y, size_z, north_south, east_west, segments, rings
Complexity
O(segments * rings)
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

Even angle sampling crowds vertices near sharp edges and leaves flat sides coarse for small exponents; exponents near 0 produce nearly degenerate thin faces. No texture coordinates. Normals are mesh normals, not the analytic surface normals.