W.15 Circumcenter, Orthocenter & Universal Affine Barycentrics — Code

Every non-null triangle A_1 A_2 A_3 over a field F (char F != 2) has a unique circumcenter C at the intersection of its side perpendicular bisectors and a unique orthocenter O at the intersection of its altitudes, with affine barycentric weights beta_i = Q_i*(Q_j + Q_k - Q_i)/(2*A) for C and gamma_i = (Q_i + Q_j - Q_k)*(Q_k + Q_i - Q_j)/(2*A) for O.
t t_orth c_circ (Q = 4225/64) / A_1 F_1 / (Q = 3136/25) / A_2 F_2 / (Q = 28224/169) / A_3 F_3 / (Q = 144) A_1 = [0, 0] A_2 = [14, 0] A_3 = [5, 12] C = [7, 33/8] O = [5, 15/4] F_1 = [224/25, 168/25] F_2 = [350/169, 840/169] F_3 = [5, 0] C = [7, 33/8] O = [5, 15/4] A1A1 A2A2 A3A3 CC OO F1F1 F2F2 F3F3 + − ⟲ Lbl Gde

Exact geometor.model SVG output of model.py for W.15 (Circumcenter, Orthocenter & Universal Affine Barycentrics).

Symbolic Construction & Verification Script (model.py)

"""GEOMETOR Wildberger symbolic model and proof script for W.15: Circumcenter, Orthocenter & Universal Affine Barycentrics.

        Enunciation: Every non-null triangle A_1 A_2 A_3 over a field F (char F != 2) has a unique circumcenter C at the intersection of its side perpendicular bisectors and a unique orthocenter O at the intersection of its altitudes, with affine barycentric weights beta_i = Q_i*(Q_j + Q_k - Q_i)/(2*A) for C and gamma_i = (Q_i + Q_j - Q_k)*(Q_k + Q_i - Q_j)/(2*A) for O.
        """

        from __future__ import annotations

        import sys
        from pathlib import Path

        _ROOT_SRC = Path(__file__).resolve().parents[3] / "src"
        if str(_ROOT_SRC) not in sys.path:
            sys.path.insert(0, str(_ROOT_SRC))

        from geometor.wildberger.models import (  # noqa: E402
            TopicBuildResult,
            assert_zero_floats,
            build_principle_model,
        )
        from geometor.wildberger.render import render_svg  # noqa: E402


        def construct_w_15() -> TopicBuildResult:
            """Construct the exact symbolic model and verifications for W.15.

            Returns:
                Populated `TopicBuildResult` for W.15 (Circumcenter, Orthocenter & Universal Affine Barycentrics).
            """
            result = build_principle_model("W.15")
            assert_zero_floats(result.model)
            return result


        def main() -> None:
            """Execute W.15 symbolic construction, render `w-15.svg`, and print invariants."""
            here = Path(__file__).resolve().parent
            bundle = construct_w_15()
            svg_out = render_svg(
                bundle.model,
                here / "w-15.svg",
                extra_curves=bundle.extra_curves,
                annotations=bundle.annotations,
            )
            print("W.15: Circumcenter, Orthocenter & Universal Affine Barycentrics")
            print(f"  Elements in model: {len(bundle.model)}")
            print(f"  Rendered SVG:      {svg_out.name}")
            for label, val, status in bundle.verifications:
                print(f"  [OK] {label}: {val} ({status})")


        if __name__ == "__main__":
            main()