Skip to main content

Module procedural_synthesis

Module procedural_synthesis 

Source
Expand description

Principled Procedural Geometry & Surface Synthesis for .10d Living Containers.

Replaces massive static geometry and texture assets with compact mathematical recipes evaluated deterministically on the GPU / SIMD hot paths in zero heap:

  1. Cellular Voronoi Micro-Surfaces: Organic scales, tree bark fissures, leaf venation, cracked mud, and corrosion pitting synthesized directly from a 64-bit seed.
  2. Implicit SDF Smooth-Fillets: Smooth-minimum blending $r$ for seamless branch-to-trunk unions and structural welded joints without hand-modeled seam meshes.
  3. Allometric Growth Curves ($y = b \cdot x^k$) & Logarithmic Spirals ($r = a e^{k \theta}$): Horns, tusks, antlers, shells, and ontogenetic proportion changes governed by ODEs.
  4. PGA Motor Oscillations: Projective Geometric Algebra motors for secondary wind/motion foliage rustle, tail wag, and vehicle chassis sway.
  5. CSG Stress-Tensor Cleavage: Dynamic fracture along physical cleavage planes when tensile stress exceeds $\sigma_{\text{crit}}$, avoiding duplicate pre-fractured mesh assets.

Structs§

ProceduralSynthesisHeader
64-byte POD header encoding procedural synthesis recipes in SectionType::ProceduralSynthesis (18).

Enums§

ProceduralSynthesisError

Constants§

FLAG_ALLOMETRIC_GROWTH
FLAG_CELLULAR_VORONOI
FLAG_IMPLICIT_FILLET
FLAG_LOG_SPIRAL_ODE
FLAG_PGA_MOTOR_DYNAMICS
FLAG_STRESS_FRACTURE
MAGIC_PROC
PROCEDURAL_SYNTHESIS_HEADER_SIZE
PROCEDURAL_SYNTHESIS_SECTION_VERSION

Functions§

decode_procedural_synthesis_section
Decode procedural synthesis header from a byte slice. Zero heap.
encode_procedural_synthesis_section
Encode procedural synthesis header into a caller-supplied byte slice.
evaluate_allometric_dimension
Evaluate allometric morphological dimension according to Huxley’s power equation: $y = b \cdot x^k$, where $x$ is body size / developmental progress.
evaluate_log_spiral_2d
Evaluate logarithmic spiral ODE position $(x, y) = (r \cos\theta, r \sin\theta)$ where $r = a \cdot e^{k \cdot \theta}$. Governs horns, tusks, and ammonite shells.
evaluate_pga_motor_oscillation
Projective Geometric Algebra (PGA) rotor oscillation displacement for secondary dynamics. Evaluates dynamic sway vector from time, natural frequency, damping, and an external drive force.
evaluate_smooth_minimum_sdf
Polynomial smooth-minimum blending (SDF implicit fillet) between two distances $d_1$ and $d_2$: $smin(d_1, d_2, r) = \min(d_1, d_2) - \frac{h^2}{4r}$ where $h = \max(r - |d_1 - d_2|, 0)$.
evaluate_stress_cleavage_partition
Evaluate structural fracture criterion under principal tensile stress $\sigma_1$. Returns true if $\sigma_1 \ge \sigma_{\text{crit}}$ and determines the cleavage partition sign.
evaluate_voronoi_cellular_f1
Zero-heap 2D Voronoi cellular distance perturbation for procedural micro-surfaces. Generates cell distance $F_1$ and cell hash from a coordinate and seed.