Symbolic Demonstrations

100% Exact SymPy & geometor.model Constructions of Planar, Spherical & Dual Menelaus Geometry

Every construction in geometor.menelaus executes with zero floating-point approximations over \(\mathbb{Q}\) and closed-form quadratic radical extensions, rendering interactive .euclid-graphic SVGs via scripts/build_figures.py. Hover or click any inline :g: geometric element reference below to highlight its exact counterpart inside the figure!


1. Planar Menelaus & Euclidean Parallel Auxiliary (Halley Lemma I / Almagest I.13)

Given reference triangle ABC (A = (3, 6), B = (0, 0), C = (9, 0)) and transversal DF cutting extended side BC externally at D ((12, 0)), side CA internally at E ((7, 2)), and side AB internally at F ((2, 4)), drawing auxiliary segment CH through C parallel to DF ([I.31]) meets AB at H ((3/2, 3)):

\[\frac{\overline{AF}}{\overline{FB}} \cdot \frac{\overline{BD}}{\overline{DC}} \cdot \frac{\overline{CE}}{\overline{EA}} = \frac{1}{2} \cdot (-4) \cdot \frac{1}{2} = -1, \qquad \left|\frac{AF}{FB} \cdot \frac{BD}{DC} \cdot \frac{CE}{EA}\right| = +1.\]
A = (3, 6) B = (0, 0) C = (9, 0) D = (12, 0) F = (2, 4) E = (7, 2) H = (3/2, 3) A B C D F E H
Planar Menelaus's Theorem: similar triangles via auxiliary segment CH parallel to transversal DF.

Constructed symbolically via construct_menelaus_planar().


2. Wildberger Rational Trigonometry Formulation (Quadrance & Spread Laws)

Using quadrance() and line_spread() (menelaus_rational_trig_invariants()), Planar Menelaus on ABC and transversal DF holds purely over \(\mathbb{Q}\) with zero square roots:

\[\frac{Q(A, F)\,Q(B, D)\,Q(C, E)}{Q(F, B)\,Q(D, C)\,Q(E, A)} = \frac{s(t, b)}{s(t, c)} \cdot \frac{s(t, c)}{s(t, a)} \cdot \frac{s(t, a)}{s(t, b)} = 1.\]
A = (4, 8) B = (0, 0) C = (10, 0) D = (15, 0) F = (2, 4) E = (17/2, 2) H = (4/3, 8/3) A B C D F E H
Rational Trigonometry formulation: spread ratios across sub-triangles △AFE, △BDF, and △CDE telescope identically to 1 over ℚ.


4. Unit-Sphere Intrinsic Geometry, Spherical Menelaus & Cross-Ratio Pencil

4.1 Spherical Excess (\(A+B+C > \pi\)) & Polar Triangle AAA Congruence (Sphaerica I.11 & I.17)

Via polar_triangle(), spherical triangle A, B, C (AB, BC, CA) and its supplementary polar triangle A, B, C satisfy \(\cos a^* = -\cos A\), confirming that three dihedral angles uniquely determine all three arc lengths on \(S^2\) (Sphaerica Prop. I.17).

A = (0, 0, 1) B = (4/5, 0, 3/5) C = (12/25, 16/25, 3/5) A* = (-6*sqrt(109)/109, -3*sqrt(109)/109, 8*sqrt(109)/109) B* = (4/5, -3/5, 0) C* = (0, 1, 0) A B C A* B* C*
Intrinsic spherical triangle △ABC and its supplementary polar triangle △A*B*C* on the unit sphere S² (Sphaerica I.11 & I.17).

4.2 Spherical Menelaus Theorem (Sphaerica III.1) & Spherical Cross-Ratio Pencil (Sphaerica III.8)

On \(S^2(\mathbb{Q})\) with A = (0, 0, 1), B = (3/5, 4/5, 0), and C = (2/3, 2/3, 1/3) cut by transversal normal (2, -3, 1):

\[\frac{\sin_{\pm}\widehat{AF}}{\sin_{\pm}\widehat{FB}} \cdot \frac{\sin_{\pm}\widehat{BD}}{\sin_{\pm}\widehat{DC}} \cdot \frac{\sin_{\pm}\widehat{CE}}{\sin_{\pm}\widehat{EA}} = \left(\frac{5}{6}\right)\left(-\frac{18}{5}\right)\left(\frac{1}{3}\right) = -1, \qquad \tan\!\left(\frac{E}{2}\right) = \frac{1}{17} > 0.\]

In verify_spherical_cross_ratio_invariance(), four great circles concurrent at pole V cut oblique great circles X1X4 (X1, X2, X3, X4) and Y1Y4 (Y1, Y2, Y3, Y4) with identical spherical sine cross-ratio \(-2\):

V = (0, 0, 1) X1 = (0, 3*sqrt(13)/13, 2*sqrt(13)/13) X2 = (3*sqrt(10)/10, 0, sqrt(10)/10) X3 = (sqrt(3)/3, sqrt(3)/3, sqrt(3)/3) X4 = (-sqrt(6)/6, sqrt(6)/3, sqrt(6)/6) Y1 = (0, 4*sqrt(17)/17, sqrt(17)/17) Y2 = (-2*sqrt(5)/5, 0, sqrt(5)/5) Y3 = (-4*sqrt(33)/33, -4*sqrt(33)/33, sqrt(33)/33) Y4 = (-sqrt(6)/6, sqrt(6)/3, sqrt(6)/6) V X1 X2 X3 X4 Y1 Y2 Y3 Y4
Spherical pencil invariance (Sphaerica Prop. III.8): four great circles concurrent at pole V cut two transversals with identical sine cross-ratio −2.

5. Projective Point-Line Duality: Ceva (+1) vs. Menelaus (-1) & Trilinear Polars

Given perspector P = (3, 3) inside ABC, construct_trilinear_polar() constructs its concurrent cevians meeting the sides at Dc, Ec, Fc (Ceva product = +1). Intersecting the cevian sides with the extended sides of ABC produces the harmonic conjugates Dm, Em, Fm, satisfying \((B, C; D_c, D_m) = (C, A; E_c, E_m) = (A, B; F_c, F_m) = -1\), negating all three ratios \((-1)^3(+1) = -1\) and aligning them on the trilinear polar DmEm!

A = (2, 9) B = (0, 0) C = (10, 0) P = (3, 3) Dc = (7/2, 0) Ec = (90/17, 90/17) Fc = (20/23, 90/23) Dm = (-35/3, 0) Em = (-50/3, 30) Fm = (-20/3, -30) A B C P Dc Ec Fc Dm Em Fm
Ceva–Menelaus Harmonic Duality: harmonic conjugates Dm, Em, and Fm of cevian traces Dc, Ec, and Fc align on the trilinear polar of P.

Executable Demo Scripts

Run all three verification demos offline from the repository root:

/home/phi/PROJECTS/geometor/.venv/bin/python demos/planar_menelaus_demo.py
        /home/phi/PROJECTS/geometor/.venv/bin/python demos/spherical_menelaus_demo.py
        /home/phi/PROJECTS/geometor/.venv/bin/python demos/ceva_menelaus_duality_demo.py