superquadric_residual — 3D superquadric op

• Data kinds: points → measurement

• Call: import fullseye as fs; fs.ledger.superquadric_residual(points, a, eps, R, t) -> 'float' (to call the implementation directly, import superquadric; superquadric.superquadric_residual(points, a, eps, R, t) -> 'float'; from the registry, ops3d.get("superquadric_residual"))

Usage

The Gross-Boult volume-corrected residual mean((sqrt(a1 a2 a3)(F^eps1 − 1))²).

Computes the inside-outside function F of each point with inside_outside(points, a, eps, R, t) and returns, as a float, the mean of the 2nd powers of the per-point residual r_i = sqrt(a1*a2*a3) * (F_i**eps1 - 1). Points on the surface have F=1, so their residual is 0; points inside get a negative residual and points outside a positive one (taking the 2nd power removes the sign). This is the same quantity that fit_superquadric minimises, and the residual in its returned dict is this value.

• points: point cloud reshapeable to (N,3) (world coordinates).

• a: radii (a1,a2,a3). eps: shape exponents (eps1,eps2) (both are used to compute F; the outer F**eps1 uses only eps1).

• R/t: pose (X_body = R.T @ (X - t)). None means identity rotation / origin.

Numerical protection: F is clipped to [0, 1e12], and a1*a2*a3 is raised to at least 1e-12 before taking sqrt (so that degenerate parameters do not give inf/NaN; values near the surface are unaffected).

Dimensions: sqrt(a1 a2 a3) is length to the power 3/2 and F^eps1 - 1 is dimensionless, so the return value has the dimension of length to the power 3 and depends on the scale of the point cloud. It is not suited to comparing objects of different sizes. It is not the true point-to-surface Euclidean distance but a radial-distance approximation, and it is defenceless against outliers, as the module docstring says.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

Runnable examples (verified samples that actually call this op)

• superquadric_fit — py -3.11 examples_3d/superquadric_fit.py

Ops the type connects to (they accept measurement as input)

vol_gaussian_psf · fuse_to_voxel · fresnel_reflectance · snell_angle

Same category (superquadric)

fit_superquadric · sample_surface · inside_outside


*Provenance: superquadric.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.