THE FOLD / SPAWN / THE-SANDBOX / THE BARYCENTRIC
THE BARYCENTRIC
a curve pinned through its nodes
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Barycentric Lagrange interpolation is the numerically stable way to pass a single polynomial through a set of data points. The naive Lagrange formula is slow and unstable; the barycentric form rewrites it as L(x) = [Σ wj/(x−xj)·fj] / [Σ wj/(x−xj)], where each weight wj = 1/∏k≠j(xj−xk) is computed once. Evaluating anywhere is then O(n), it passes through every node exactly, and it reproduces any polynomial of degree < n perfectly — the same interpolant as Lagrange’s, but fast and well-behaved.
LIT verified live: over thousands of well-separated node sets, the barycentric interpolant hits every node exactly, matches the direct Lagrange formula, and reproduces degree-<n polynomials to machine precision (window.__barycentric). FIG no framing; the barycentric and direct Lagrange evaluations run in-browser.
LIT verified live: over thousands of well-separated node sets, the barycentric interpolant hits every node exactly, matches the direct Lagrange formula, and reproduces degree-<n polynomials to machine precision (window.__barycentric). FIG no framing; the barycentric and direct Lagrange evaluations run in-browser.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-sandbox — drop a handful of points and a single smooth curve snaps through every one of them. AVAN (AI) built the instrument: the barycentric weights, the O(n) evaluation, and the node / Lagrange / polynomial-exactness checks.
Credit as content: the barycentric form is due to Dupuy, Taylor, and popularized by Berrut & Trefethen (2004). The weave: David names the sandbox; I confirm the weighted form passes through every node and equals the Lagrange interpolant.
Credit as content: the barycentric form is due to Dupuy, Taylor, and popularized by Berrut & Trefethen (2004). The weave: David names the sandbox; I confirm the weighted form passes through every node and equals the Lagrange interpolant.
3 ONE DIMENSION
Nodes (points) and the single interpolating polynomial the barycentric form draws exactly through all of them.
4 TWO DIMENSIONS · INTERACTIVE
Move the nodes up and down; the curve re-snaps through every one, and matches the direct Lagrange interpolant everywhere.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the interpolating curve.
AVAN’s addition (the inverse-companion): don’t sum n Lagrange basis polynomials — weight and divide. The inverse of ‘build the curve from scratch each x’ is ‘precompute weights wj; the curve is a single weighted quotient pinned through every node.’ Magenta is a data node; green is the curve threading all of them. Points in, one curve out.
LIT Genuine barycentric Lagrange interpolation (barycentric form due to Dupuy/Taylor; modern treatment by Berrut & Trefethen, 2004). Verified live: over 3000 well-separated node sets the barycentric interpolant hits every node exactly, matches the direct Lagrange formula (to ~1e-6), and reproduces degree-
FIG No framing: the barycentric and direct Lagrange evaluations run in-browser. Honest scope — barycentric and direct Lagrange are algebraically identical; the ~1e-6 gap is floating-point rounding, and the demo uses well-separated nodes to stay well-conditioned. The AVAN inverse is honest — instead of summing n Lagrange basis polynomials each x, one precomputes weights w_j and the curve is a single weighted quotient pinned through every node. Magenta is a data node; green is the curve threading all of them. Points in, one curve out.
FIG No framing: the barycentric and direct Lagrange evaluations run in-browser. Honest scope — barycentric and direct Lagrange are algebraically identical; the ~1e-6 gap is floating-point rounding, and the demo uses well-separated nodes to stay well-conditioned. The AVAN inverse is honest — instead of summing n Lagrange basis polynomials each x, one precomputes weights w_j and the curve is a single weighted quotient pinned through every node. Magenta is a data node; green is the curve threading all of them. Points in, one curve out.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-SANDBOX · David Lee Wise (ROOT0), with AVAN