The 3D version bends a tube mesh into a closed-form circular arc (θ solved from θ/(2·sin(θ/2)) = L/D) and views it with a camera. This 2D build renders the same buckling physics from an independent numerical method: the heart tube is modeled as a discrete chain of 40 rigid links, pinned at both ends to the fixed cavity chord, that relaxes every frame toward a minimum-bending-energy shape via iterative constraint relaxation (position-based dynamics) — nobody tells it to become an arc, it finds that shape on its own because that is genuinely the lowest-energy way to fit excess length between two fixed points.
per relaxation iteration:
bend: P_i ← P_i + 0.5·(midpoint(P_i-1, P_i+1) − P_i) for interior i
bias: P_i.y ← P_i.y + k·sign·sin(π·s_i) (Nodal/Pitx2, persistent)
S-loop: P_i.y ← P_i.y + k2·(−sign)·sin(2π·s_i)·sAmt (ventral roll, in-plane)
length: project each link back to rest length ℓ0 = L/N (inextensibility)
pin: P_0, P_N held at the two fixed cavity anchors
The bottom panel is new: a pitchfork bifurcation diagram plotting final loop chirality against the left-right bias. It makes explicit what the 3D build only describes in prose — that near zero bias the straight/symmetric state is mechanically unstable (dashed branch) and the tube must fall onto one of two stable branches (solid, D-loop above / L-loop below), a coin flip exactly like real Nodal/Pitx2 loss-of-function heterotaxy. Away from zero, bias pulls the system cleanly onto one branch.
- Growth differential — sets the excess length ℓ0 the relaxed chain must absorb; higher values buckle sooner and further.
- Left-right bias — the persistent perpendicular forcing term in the relaxation; strong bias reliably wins the buckle direction, weak bias lets it go either way (see the live dot on the bifurcation diagram).
- Developmental stage — ramps the growth ratio and, in its later part, the in-plane S-loop forcing term.