X3901

X550com[INVERSE(n(3rd EULER 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) { 1, 21 }: Central Line L(1, 21) { 72, 1698 }: Central Line L(72, 1698) { 517, 1657 }: Central Line L(517, 1657) { 519, 1770 }: Central Line L(519, 1770) { 78, 3336 }: Central Line L(78, 3336) { 79, 3419 }: Central Line L(79, 3419) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_1 = INCENTER (0.5714, 0.2333) X_21 = SCHIFFLER POINT (0.5287, 0.1771) X_72 = ISOGONAL CONJUGATE OF X(28) (0.4367, 0.0733) X_1698 = INSIMILICENTER(BEVAN CIRCLE, NINE-POINTCIRCLE) (0.5306, 0.1933) X_517 = ISOGONAL CONJUGATE OF X(104) (0.8180, 0.7154) X_1657 = {X(3),X(4)}-HARMONIC CONJUGATE OF X(1656) (0.2755, -0.4853) X_519 = ISOGONAL CONJUGATE OF X(106) (0.9566, 0.6107) X_1770 = MIMOSA TRANSFORM OF X(943) (0.6554, 0.4275) X_78 = ISOGONAL CONJUGATE OF X(34) (0.3835, 0.0491) X_3336 = INTERSECTION OF LINES X(1)X(3) AND X(7)X(498) (0.6341, 0.3483) X_79 = ISOGONAL CONJUGATE OF X(35) (0.5976, 0.3019) X_3419 = ISOGONAL CONJUGATE OF X(3418) (0.4918, 0.1745) X_3901 = com[INVERSE(n(3rd EULER TRIANGLE))] (0.9061, 0.6732) A B C X1 X21 X72 X1698 X517 X1657 X519 X1770 X78 X3336 X79 X3419 X3901 (a, b, c) = (5, 6, 7) | AB = 1

X3901 (X550com[INVERSE(n(3rd EULER TRIANGLE))]) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_3901 = X_550com[INVERSE(n(3rd EULER 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,
            construct_baseline_triangle,
            create_model,
            eval_barycentric_point,
            eval_trilinear_point,
            incenter_of,
            promote_point_to_top,
        )
        from geometor.etc.render import write_center_svg


        def construct_x_03901(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_3901 = X_550com[INVERSE(n(3rd EULER TRIANGLE))] on reference triangle ABC."""
            X_3901 = eval_barycentric_point(model, A, B, C, '(a*(2*b**(3) + 2*c**(3) -2*a**(2)*b - 2*a**(2)*c - a*b*c))', ID="X_3901", classes=["selected", "target"])
            X_1 = incenter_of(model, A, B, C, ID="X_1", classes=["center", "incident"])
            X_21 = eval_trilinear_point(model, A, B, C, '1/(cos(B) + cos(C))', ID="X_21", classes=["center", "incident"])
            central_line(model, X_1, X_21, 1, 21, incident=True)
            X_72 = eval_trilinear_point(model, A, B, C, '(b + c)*cot(A)', ID="X_72", classes=["center", "incident"])
            X_1698 = eval_trilinear_point(model, A, B, C, '2*cos(B - C) + cos(A) - cos(B) - cos(C) + 1', ID="X_1698", classes=["center", "incident"])
            central_line(model, X_72, X_1698, 72, 1698, incident=True)
            X_517 = eval_trilinear_point(model, A, B, C, '-1 + cos(B) + cos(C)', ID="X_517", classes=["center", "incident"])
            X_1657 = eval_trilinear_point(model, A, B, C, '3*cos(A) - 4*cos(B)*cos(C)', ID="X_1657", classes=["center", "incident"])
            central_line(model, X_517, X_1657, 517, 1657, incident=True)
            return promote_point_to_top(model, X_3901)


        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_3901 on the given reference triangle."""
            model = create_model('X_3901 = X_550com[INVERSE(n(3rd EULER TRIANGLE))]')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_03901(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-03901.json"))
            write_center_svg(
                model_acute,
                here / "x-03901.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )