X3951

X3303com[INVERSE(n(TANGENTIAL TRIANGLE))]

< 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) circumcircle: Circumcircle of △ABC { 3, 63 }: Central Line L(3, 63) { 8, 144 }: Central Line L(8, 144) { 77, 201 }: Central Line L(77, 201) { 377, 527 }: Central Line L(377, 527) { 612, 1046 }: Central Line L(612, 1046) { 1, 2308 }: Central Line L(1, 2308) 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_63 = ISOGONAL CONJUGATE OF X(19) (0.4566, 0.0823) X_8 = NAGEL POINT (0.4694, 0.1333) X_144 = ANTICOMPLEMENT OF X(7) (0.4317, 0.0461) X_77 = ISOGONAL CONJUGATE OF X(33) (0.5270, 0.1305) X_201 = -CEVA CONJUGATE OF X(12) (0.4897, 0.1062) X_377 = EULER LINE INTERCEPT OF LINE X(7)X(8) (0.5473, 0.2258) X_527 = DIRECTION OF VECTOR AX + BX + CX, where X = X(7) (0.8698, 0.6836) X_612 = INTERSECTION OF LINES X(1)X(2) AND X(9)X(31) (0.5582, 0.2203) X_1046 = -CEVA CONJUGATE OF X(1) (0.6500, 0.3366) X_1 = INCENTER (0.5714, 0.2333) X_2308 = -ISOCONJUGATE OF X(1255) (0.6059, 0.2758) X_3951 = com[INVERSE(n(TANGENTIAL TRIANGLE))] (0.4451, 0.0771) A B C X3 X63 X8 X144 X77 X201 X377 X527 X612 X1046 X1 X2308 X3951 (a, b, c) = (5, 6, 7) | AB = 1

X3951 (X3303com[INVERSE(n(TANGENTIAL TRIANGLE))]) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_3951 = X_3303com[INVERSE(n(TANGENTIAL TRIANGLE))]."""

        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_barycentric_point,
            eval_trilinear_point,
            nagel_point_of,
            promote_point_to_top,
        )
        from geometor.etc.render import write_center_svg


        def construct_x_03951(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_3951 = X_3303com[INVERSE(n(TANGENTIAL TRIANGLE))] on reference triangle ABC."""
            X_3951 = eval_barycentric_point(model, A, B, C, '(a*(3*b + 3*c + a)*(b**(2) + c**(2) - a**(2)))', ID="X_3951", classes=["selected", "target"])
            X_3 = circumcenter_of(model, A, B, C, ID="X_3", classes=["center", "incident"])
            X_63 = eval_trilinear_point(model, A, B, C, 'cot(A)', ID="X_63", classes=["center", "incident"])
            central_line(model, X_3, X_63, 3, 63, incident=True)
            X_8 = nagel_point_of(model, A, B, C, ID="X_8", classes=["center", "incident"])
            X_144 = eval_trilinear_point(model, A, B, C, '(csc(A))*(tan(B/2) + tan(C/2) - tan(A/2))', ID="X_144", classes=["center", "incident"])
            central_line(model, X_8, X_144, 8, 144, incident=True)
            X_77 = eval_trilinear_point(model, A, B, C, '1/(1 + sec(A))', ID="X_77", classes=["center", "incident"])
            X_201 = eval_trilinear_point(model, A, B, C, '(cos(A))*(1 + cos(B - C))', ID="X_201", classes=["center", "incident"])
            central_line(model, X_77, X_201, 77, 201, incident=True)
            return promote_point_to_top(model, X_3951)


        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_3951 on the given reference triangle."""
            model = create_model('X_3951 = X_3303com[INVERSE(n(TANGENTIAL TRIANGLE))]')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_03951(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-03951.json"))
            write_center_svg(
                model_acute,
                here / "x-03951.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )