X3738

X2804com(HEXYL TRIANGLE)

X3738 = X522-of-inner-Garcia 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) { 11, 124 }: Central Line L(11, 124) { 102, 104 }: Central Line L(102, 104) { 100, 109 }: Central Line L(100, 109) { 117, 119 }: Central Line L(117, 119) { 151, 153 }: Central Line L(151, 153) { 30, 511 }: Central Line L(30, 511) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_2222 = -ISOCONJUGATE OF X(654) (0.9870, 0.2545) X_11 = FEUERBACH POINT (0.7347, 0.0667) X_124 = -OF-MEDIAL-TRIANGLE (0.6243, 0.0030) X_102 = Λ(INCENTER, ORTHOCENTER) (0.6364, -0.3897) X_104 = ANTIPODE OF X(100) (0.8571, -0.2624) X_100 = ANTICOMPLEMENT OF FEUERBACH POINT (0.1429, 0.4666) X_109 = Ψ(INCENTER, CIRCUMCENTER) (0.3636, 0.5938) X_117 = MIDPOINT OF X(4) AND X(109) (0.4879, 0.4948) X_119 = FEUERBACH ANTIPODE (0.3776, 0.4312) X_151 = REFLECTION OF X(20) IN X(109) (0.3395, 1.3793) X_153 = REFLECTION OF X(20) IN X(100) (-0.1020, 1.1248) X_30 = EULER INFINITY POINT (0.7469, 0.7481) X_511 = ISOGONAL CONJUGATE OF X(98) (0.2335, -0.3020) X_3738 = com(HEXYL TRIANGLE) (0.0290, -0.0931) A B C X2222 X11 X124 X102 X104 X100 X109 X117 X119 X151 X153 X30 X511 X3738 (a, b, c) = (5, 6, 7) | AB = 1

X3738 (X2804com(HEXYL TRIANGLE)) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_3738 = X_2804com(HEXYL 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,
            feuerbach_point_of,
            isogonal_conjugate,
            promote_point_to_top,
        )
        from geometor.etc.render import write_center_svg


        def construct_x_03738(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_3738 = X_2804com(HEXYL TRIANGLE) on reference triangle ABC."""
            X_2222 = eval_barycentric_point(model, A, B, C, 'a*(a - b)*(a - c)*(a - b + c)*(a + b - c)*(a**(2) - b**(2) + c**(2) - a*c)*(a**(2) - c**(2) + b**(2) - a*b)', ID="X_2222", classes=["center"])
            X_3738 = isogonal_conjugate(model, A, B, C, X_2222, ID="X_3738", classes=["selected", "target"])
            X_11 = feuerbach_point_of(model, A, B, C, ID="X_11", classes=["center", "incident"])
            X_124 = eval_trilinear_point(model, A, B, C, '(b*c*(b + c - a)*(b - c)**(2)*((b + c)*(b**(2) + c**(2) - a**(2) - b*c) + a*b*c))', ID="X_124", classes=["center", "incident"])
            central_line(model, X_11, X_124, 11, 124, incident=True)
            X_102 = eval_trilinear_point(model, A, B, C, '1/(sin(B)*(sec(A) - sec(B)) + sin(C)*(sec(A) - sec(C)))', ID="X_102", classes=["center", "incident"])
            X_104 = eval_trilinear_point(model, A, B, C, '1/(-1 + cos(B) + cos(C))', ID="X_104", classes=["center", "incident"])
            central_line(model, X_102, X_104, 102, 104, incident=True)
            X_100 = eval_trilinear_point(model, A, B, C, '1/(b - c)', ID="X_100", classes=["center", "incident"])
            X_109 = eval_trilinear_point(model, A, B, C, 'a/(cos(B) - cos(C))', ID="X_109", classes=["center", "incident"])
            central_line(model, X_100, X_109, 100, 109, incident=True)
            return promote_point_to_top(model, X_3738)


        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_3738 on the given reference triangle."""
            model = create_model('X_3738 = X_2804com(HEXYL TRIANGLE)')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_03738(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-03738.json"))
            write_center_svg(
                model_acute,
                here / "x-03738.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )