sdf.Scale

sdf.Scale(sdf, scale)

Scale an SDF component-wise.

Note: Non-uniform scaling doesn’t produce exact SDFs. For uniform scaling, we can divide the distance by the scale factor to maintain correctness.

Parameters

Name Type Description Default
sdf SDF The SDF to scale required
scale float | Array | Vector Per-axis scale as Array [sx, sy, sz], Vector parameter, or float for uniform scaling required

Methods

Name Description
patch_fields Forward the child’s patch fields through a uniform scale.
sdf Pure function for component-wise scaling.

patch_fields

sdf.Scale.patch_fields()

Forward the child’s patch fields through a uniform scale.

Uniform scaling maps queries into the child frame as :meth:sdf does (p / s) and rescales the distances by s, keeping them exact. Non-uniform scaling warps each patch field differently along each axis — no exact decomposition — so it reports None.

sdf

sdf.Scale.sdf(child_sdf, p, scale)

Pure function for component-wise scaling.

Parameters

Name Type Description Default
child_sdf SDF function to scale required
p Array Query point(s) required
scale Array Scale vector [sx, sy, sz] required

Returns

Name Type Description
Array Scaled SDF value