Function reference

Parameter Extraction

extraction.extract_parameters Extract parameters from a Fluent tree.

Functionalize

functionalize.functionalize Compile an SDF to a pure function with free and fixed parameters.
render.functionalize.functionalize_render Compile a Scene to a differentiable render function.

Parametrization

parametrization.to_normalized to_unconstrained followed by normalize.
parametrization.from_normalized unnormalize followed by to_constrained.
parametrization.compute_param_scales Compute per-parameter normalization scales.

Constraints — types

constraints.types.base.Constraint Base class for geometric constraints.
constraints.types.distance.DistanceConstraint Constraint that fixes the distance between two points/vectors.
constraints.types.angle.AngleConstraint Constraint that fixes the angle between two vectors.
constraints.types.parallel.ParallelConstraint Constraint that forces two vectors to be parallel.
constraints.types.perpendicular.PerpendicularConstraint Constraint that forces two vectors to be perpendicular.

Constraints — solver

constraints.solve.solve_constraints Solve geometric constraints attached to a scene’s free parameters.
constraints.solve.project_to_manifold Project free_params onto the constraint manifold via Newton correction(s).
constraints.solve.constraint_residuals Evaluate the constraint residuals at free_params.
constraints.solve.make_manifold_projection Return an optax transform that projects params onto the constraint manifold.

Geometry

geometry.parameters.Vector 3D vector parameter (position, offset, direction, size).
geometry.parameters.Scalar Scalar parameter (radius, distance, angle, scale, strength, etc.).

Render

render.raymarch.render.raymarch Render an SDF via sphere tracing and return an RGB image array.
render.raymarch.render.render_raymarched Render an SDF via sphere tracing and display with matplotlib.
render.marching_cubes.render_marching_cubes Render an SDF by extracting a mesh with marching cubes.