growing_tube#

ktch.coiling.growing_tube(e_g: float, c_g: float, t_g: float, delta_g: float = 0.0, gamma_g: float = 0.0, r0: float = 1.0, s_range: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None = None, phi_range: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None = None, aperture=None, p0: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None = None, frame0: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None = None, method: str = 'ode', output: str = 'surface') ndarray[tuple[Any, ...], dtype[float64]][source]#

Generate a form from the growing tube model.

Parameters:
e_g, c_g, t_gfloat, callable, or array

Expansion rate, standardized curvature (>= 0; c_g = 0 is a straight tube), and standardized torsion (t_g = 0 is a planispiral); Each may be a scalar, a callable s -> value, or an array aligned to s_range (heteromorph growth). Non-constant parameters require method="ode" and an explicit s_range. e_g is the logarithm of the original \(E\) described in [Okamoto_1988] ([Noshita_2014]).

delta_g, gamma_gfloat, default = 0.0

Aperture orientation in the Frenet frame. (0, 0) is perpendicular to the tangent.

r0float, default = 1.0

Initial tube radius.

s_rangearray-like of shape (n_s,), optional

Growth-stage samples. Defaults to three whorls (a fixed span if the tube is straight).

phi_rangearray-like of shape (n_phi,), optional

Aperture-angle samples. Defaults to np.linspace(0, 2*pi, 90).

apertureNone

Aperture shape; only the circular default is supported.

p0array-like of shape (3,), optional

Initial position p(0). Defaults to the origin.

frame0array-like of shape (3, 3), optional

Initial frame matrix \(\Xi(0)\); rows are \((\xi_1, \xi_2, \xi_3)\) (tangent, normal, binormal). Defaults to the identity.

method{“ode”, “closed”}, default = “ode”

"ode" integrates the frame ODE with scipy.integrate.solve_ivp; "closed" uses the Appendix A closed-form frame with an analytic trajectory.

output{“surface”}, default = “surface”

Form representation to return. Only "surface" is implemented.

Returns:
Xndarray of shape (n_s, n_phi, 3)

Surface coordinates.

References

[Okamoto_1988]

Okamoto, T., 1988. Analysis of heteromorph ammonoids by differential geometry. Palaeontology 31, 35–52.

[Noshita_2014]

Noshita, K., 2014. Quantification and geometric analysis of coiling patterns in gastropod shells based on 3D and 2D image data. Journal of Theoretical Biology 363, 93–104.