Devlog #60 – Wave 40: Bézier Curves, Hall Effect & Catenary

Wave 40 spans computer graphics, semiconductor physics, and classical mechanics. A De Casteljau explorer lets you drag control points to sculpt polynomial curves of arbitrary degree and watch the recursive construction animate step-by-step; a Hall effect simulator shows 40 charge carriers deflecting under the Lorentz force with VH = IB/(nqd) computed in real time; and a catenary simulator solves the parameter a via Newton’s method and renders the exact y = a⋅cosh(x/a) shape — proving Galileo wrong about parabolas. All three launch with Ukrainian translations.

Release Stats

493
Total simulations
60
Devlog entries
40
Release waves
1708
Sitemap URLs

New Simulations

🎯

Bézier Curves

Drag control points to build degree 1–5 Bézier curves via De Casteljau. Animate the recursive construction and compare against a B-spline.

Open simulation →
🔵

Hall Effect

Watch 40 animated charge carriers deflect under the Lorentz force. Toggle n-type / p-type, adjust current and B-field, and read VH = IB/(nqd) live.

Open simulation →
⛓️

Catenary

Drag anchor points and see the exact hanging-chain shape y = a⋅cosh(x/a) update instantly. Overlay a parabola and explore tension vectors along the cable.

Open simulation →

Bézier Curves

Bézier curves are the backbone of vector graphics, font rendering, animation paths, and CAD design. Unlike interpolating splines that pass through each control point, a Bézier curve is defined by the convex hull of its control points and passes only through the first and last. The degree-n Bézier is a polynomial of degree n in the parameter t ∈ [0, 1].

The De Casteljau algorithm evaluates this polynomial geometrically: at each level of the recursion, consecutive pairs of points are linearly interpolated at the current t. For a cubic (degree 3) with four control points P0–P3, three rounds of lerps produce a single point on the curve. The simulator draws each intermediate polygon in a distinct colour, so you can trace exactly how the final curve point is constructed.

Technical details

Hall Effect

When a current-carrying conductor is placed in a magnetic field perpendicular to the current, charge carriers are deflected sideways by the Lorentz force F = qv×B. This builds up a transverse electric field until the electrostatic force exactly balances the magnetic deflection. The resulting transverse voltage is the Hall voltage:

VH = IB / (nqd)

where n is the carrier density, q the carrier charge, and d the conductor thickness. The sign of VH depends on the carrier type: electrons (n-type) deflect opposite to holes (p-type), so the Hall voltage polarity directly identifies the dominant carrier. This is the basis of Hall sensors, which are used everywhere from brushless motor controllers to touchless position encoders and smartphone compasses.

Simulation details

Catenary

Galileo claimed that the shape of a hanging chain is a parabola. In 1691, Leibniz, Huygens, and Johann Bernoulli independently derived the correct answer: the hyperbolic cosine, now called the catenary (from Latin catena, chain). The equation is y = a⋅cosh(x/a), where the parameter a = T0/(wg) encodes the ratio of horizontal tension to weight per unit length.

The simulator accepts two anchor points at arbitrary heights and solves for a numerically. Given horizontal span d and desired arc length L, the constraint is:

2a · sinh(d / (2a)) = L

This transcendental equation has no closed-form solution, so the simulator runs Newton’s method for up to 80 iterations until |Δa| < 10−6. The resulting a typically converges in 15–25 iterations.

Technical details

Technical Notes

All three simulations are zero-dependency HTML5/Canvas 2D files. The De Casteljau recursion is computed at every animation frame without pre-caching, keeping the code simple while staying well within the 16 ms frame budget for up to degree-5 curves. The Hall effect simulation uses an O(n) particle loop (40 particles) updated via requestAnimationFrame. The catenary Newton solver runs deterministically in the draw() call, completing in under 0.1 ms.

Tags

Computer Graphics Bézier Curves De Casteljau B-Spline Parametric Curves Hall Effect Lorentz Force Semiconductor Hall Voltage Electromagnetism Catenary Hanging Chain Hyperbolic Cosine Newton’s Method Wave 40