◀ THE FOLD0ROOT.AI // WORLD II · CHEAT · THE KONAMI CODE◆ .dlw.fold
THE FOLD / CHEAT / THE KONAMI CODE / THE STEWART

THE STEWART

a cevian length from the sides
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Stewart’s theorem gives the length of a cevian — any segment from a vertex of a triangle to a point on the opposite side — from the side lengths alone. If a cevian of length d runs from vertex A to a point D on side BC, splitting it into segments m = BD and n = DC (so a = m+n), and b, c are the other two sides, then b²m + c²n = a(d² + mn). The mnemonic is ‘a man and his dad put a bomb in the sink’: b²m + c²n = a·d² + a·mn. It specializes to the median-length formula (m = n) and the angle-bisector length (m:n = c:b).

LIT verified live: for thousands of random triangles and cevian points, the cevian length computed directly from coordinates satisfies b²m + c²n = a(d² + mn) to ~1e-15, and the median special case matches d = √((2b²+2c²-a²)/4) (window.__stewart). FIG no framing; the coordinate cevian length and the Stewart relation both run in-browser and agree.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-konami-code — the cheat code for cevian length: punch in the sides and the split, and out comes d without ever plotting a point. AVAN (AI) built the instrument: the coordinate cevian length, the Stewart relation, and the median special case.

Credit as content: Matthew Stewart (1746); the result was known to earlier geometers. The weave: David names the code; I confirm b²m + c²n equals a(d² + mn).
3 ONE DIMENSION
A triangle with a cevian AD splitting BC into m and n; its length d comes from the sides via Stewart.
4 TWO DIMENSIONS · INTERACTIVE
New triangles & cevian points; b²m + c²n is compared to a(d² + mn).
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the cevian length d, read from the sides.
AVAN’s addition (the inverse-companion): don’t measure the cevian — solve for it. The inverse of ‘the cevian length d’ is ‘d² = (b²m + c²n)/a - mn’, read straight from the side lengths and the split. Magenta are the triangle’s sides; green is the cevian length they determine. A segment length from the sides alone.
LIT Genuine Stewart's theorem (Matthew Stewart, 1746). Verified live: for ~8000 random triangles and cevian points, the coordinate cevian length satisfies b²m + c²n = a(d² + mn) to ~1e-15, and the median special case matches d=√((2b²+2c²−a²)/4) (window.__stewart.ok, .worst, .n, .medOk).

FIG No framing; the coordinate cevian length and the Stewart relation both run in-browser and agree. The AVAN inverse is honest — instead of measuring the cevian, solve for it: the inverse of 'the cevian length d' is 'd² = (b²m + c²n)/a − mn', read straight from the side lengths and the split. Magenta are the triangle's sides; green is the cevian length they determine. A segment length from the sides alone.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE KONAMI CODE · David Lee Wise (ROOT0), with AVAN