X652

CROSSDIFFERENCE OF X1 AND X4

X652 = crossdifference of every pair of points on line X1X4
< A B C >: Reference Triangle △ABC [ A B ]: Sideline AB (Base c = 1) [ B C ]: Sideline BC (Side a) [ C A ]: Sideline CA (Side b) { 44, 513 }: Central Line L(44, 513) { 243, 522 }: Central Line L(243, 522) { 520, 647 }: Central Line L(520, 647) { 663, 1951 }: Central Line L(663, 1951) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_653 = TRILINEAR POLE OF LINE X(1)X(4) (0.5097, 0.6030) X_44 = -LINE CONJUGATE OF X(1) (2.1429, 2.0996) X_513 = ISOGONAL CONJUGATE OF X(100) (1.0529, -0.0806) X_243 = -LINE CONJUGATE OF X(73) (0.7516, 0.9505) X_522 = ISOGONAL CONJUGATE OF X(109) (-0.0318, 0.3430) X_520 = ISOGONAL CONJUGATE OF X(107) (-0.0490, 0.2227) X_647 = CROSSDIFFERENCE OF X(2) AND X(3) (4.2063, -0.5653) X_663 = CROSSDIFFERENCE OF X(2) AND X(7) (8.6667, -3.2660) X_1951 = CROSSDIFFERENCE OF PU(20) (3.2396, 6.6676) X_652 = CROSSDIFFERENCE OF X(1) AND X(4) (7.2558, -0.6836) A B C X653 X44 X513 X243 X522 X520 X647 X663 X1951 X652 (a, b, c) = (5, 6, 7) | AB = 1

X652 (CROSSDIFFERENCE OF X1 AND X4) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_652 = CROSSDIFFERENCE OF X_1 AND X_4."""

        from __future__ import annotations

        from pathlib import Path

        import sympy.geometry as spg
        from geometor.model import Model

        from geometor.etc.ops import (
            central_line,
            construct_baseline_triangle,
            create_model,
            eval_trilinear_point,
            promote_point_to_top,
        )
        from geometor.etc.render import write_center_svg


        def construct_x_00652(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_652 = CROSSDIFFERENCE OF X_1 AND X_4 on reference triangle ABC."""
            X_652 = eval_trilinear_point(model, A, B, C, 'sec(B) - sec(C)', ID="X_652", classes=["selected", "target"])
            X_44 = eval_trilinear_point(model, A, B, C, 'b + c - 2*a', ID="X_44", classes=["center", "incident"])
            X_513 = eval_trilinear_point(model, A, B, C, 'b - c', ID="X_513", classes=["center", "incident"])
            central_line(model, X_44, X_513, 44, 513, incident=True)
            X_243 = eval_trilinear_point(model, A, B, C, '(sec(A))*((cos(A))**(2) - cos(B)*cos(C))', ID="X_243", classes=["center", "incident"])
            X_522 = eval_trilinear_point(model, A, B, C, '(cos(B) - cos(C))*(csc(A))', ID="X_522", classes=["center", "incident"])
            central_line(model, X_243, X_522, 243, 522, incident=True)
            X_520 = eval_trilinear_point(model, A, B, C, '(cos(A))*(sin(2*B) - sin(2*C))', ID="X_520", classes=["center", "incident"])
            X_647 = eval_trilinear_point(model, A, B, C, 'a*(b**(2) - c**(2))*(b**(2) + c**(2) - a**(2))', ID="X_647", classes=["center", "incident"])
            central_line(model, X_520, X_647, 520, 647, incident=True)
            return promote_point_to_top(model, X_652)


        def build_model(
            sides: tuple[float, float, float] = (5.0, 6.0, 7.0),
            show_guides: bool = False,
        ) -> Model:
            """Build a `geometor.model.Model` for X_652 on the given reference triangle."""
            model = create_model('X_652 = CROSSDIFFERENCE OF X_1 AND X_4')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_00652(model, A, B, C)
            return model


        if __name__ == "__main__":
            here = Path(__file__).resolve().parent
            model_acute = build_model((5.0, 6.0, 7.0))
            model_acute.save(str(here / "x-00652.json"))
            write_center_svg(
                model_acute,
                here / "x-00652.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )