X3002

(BROCARD AXIS)∩(GERGONNE LINE)

< 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) { 3, 6 }: Brocard Axis { 241, 514 }: Central Line L(241, 514) { 36, 1951 }: Central Line L(36, 1951) { 978, 1047 }: Central Line L(978, 1047) { 1758, 1945 }: Central Line L(1758, 1945) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_3 = CIRCUMCENTER (0.5000, 0.1021) X_6 = SYMMEDIAN POINT (LEMOINE POINT, GREBE POINT) (0.6000, 0.2672) X_241 = -LINE CONJUGATE OF X(55) (1.1217, 1.2442) X_514 = ISOGONAL CONJUGATE OF X(101) (1.0761, -0.0329) X_36 = INVERSE-IN-CIRCUMCIRCLE OF INCENTER (1.3333, 1.6330) X_1951 = CROSSDIFFERENCE OF PU(20) (3.2396, 6.6676) X_978 = -CEVA CONJUGATE OF X(1) (0.7456, 0.4040) X_1047 = -CEVA CONJUGATE OF X(1) (0.5281, -0.0076) X_1758 = MIMOSA TRANSFORM OF X(296) (1.1982, 1.3847) X_1945 = TRILINEAR POLE OF PU(18) (0.9520, -0.5335) X_3002 = (BROCARD AXIS)∩(GERGONNE LINE) (1.1771, 1.2203) A B C X3 X6 X241 X514 X36 X1951 X978 X1047 X1758 X1945 X3002 (a, b, c) = (5, 6, 7) | AB = 1

X3002 ((BROCARD AXIS)∩(GERGONNE LINE)) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_3002 = (BROCARD AXIS)∩(GERGONNE LINE)."""

        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,
            circumcenter_of,
            construct_baseline_triangle,
            create_model,
            eval_trilinear_point,
            intersect_lines,
            promote_point_to_top,
            symmedian_point_of,
        )
        from geometor.etc.render import write_center_svg


        def construct_x_03002(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_3002 = (BROCARD AXIS)∩(GERGONNE LINE) on reference triangle ABC."""
            X_3 = circumcenter_of(model, A, B, C, ID="X_3", classes=["center"])
            X_6 = symmedian_point_of(model, A, B, C, ID="X_6", classes=["center"])
            X_241 = eval_trilinear_point(model, A, B, C, '(cos(B/2))**(4) - ((cos(A/2))**(2))*((cos(B/2))**(2) +(cos(C/2))**(2)) + (cos(C/2))**(4)', ID="X_241", classes=["center"])
            X_514 = eval_trilinear_point(model, A, B, C, '(b - c)/a', ID="X_514", classes=["center"])
            central_line(model, X_3, X_6, 3, 6)
            central_line(model, X_241, X_514, 241, 514)
            X_3002 = intersect_lines(model, X_3, X_6, X_241, X_514, ID="X_3002", classes=["selected", "target"])
            X_36 = eval_trilinear_point(model, A, B, C, '1 - 2*cos(A)', ID="X_36", classes=["center", "incident"])
            X_1951 = eval_trilinear_point(model, A, B, C, 'a*((cos(A))**(2) - cos(B)*cos(C))', ID="X_1951", classes=["center", "incident"])
            central_line(model, X_36, X_1951, 36, 1951, incident=True)
            return promote_point_to_top(model, X_3002)


        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_3002 on the given reference triangle."""
            model = create_model('X_3002 = (BROCARD AXIS)∩(GERGONNE LINE)')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_03002(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-03002.json"))
            write_center_svg(
                model_acute,
                here / "x-03002.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )