X2097

REFLECTION OF X6 IN X57

X2097 is the reflection of X6 in X57.
< 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) { 6, 57 }: Central Line L(6, 57) { 141, 329 }: Central Line L(141, 329) { 527, 599 }: Central Line L(527, 599) { 19, 1122 }: Central Line L(19, 1122) { 517, 990 }: Central Line L(517, 990) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_6 = SYMMEDIAN POINT (LEMOINE POINT, GREBE POINT) (0.6000, 0.2672) X_57 = ISOGONAL CONJUGATE OF X(9) (0.6138, 0.3110) X_141 = COMPLEMENT OF SYMMEDIAN POINT (0.5061, 0.1663) X_329 = ISOTOMIC CONJUGATE OF X(189) (0.3847, -0.0222) X_527 = DIRECTION OF VECTOR AX + BX + CX, where X = X(7) (0.8698, 0.6836) X_599 = ISOTOMIC CONJUGATE OF X(598) (0.4748, 0.1327) X_19 = CLAWSON POINT (0.6246, 0.4244) X_1122 = 1st GRINBERG POINT (0.6289, 0.3227) X_517 = ISOGONAL CONJUGATE OF X(104) (0.8180, 0.7154) X_990 = INTERSECTION OF LINES X(1)X(7) AND X(3)X(37) (0.6104, 0.3234) X_2097 = REFLECTION OF X(6) IN X(57) (0.6275, 0.3549) A B C X6 X57 X141 X329 X527 X599 X19 X1122 X517 X990 X2097 (a, b, c) = (5, 6, 7) | AB = 1

X2097 (REFLECTION OF X6 IN X57) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_2097 = REFLECTION OF X_6 IN X_57."""

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


        def construct_x_02097(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_2097 = REFLECTION OF X_6 IN X_57 on reference triangle ABC."""
            X_6 = symmedian_point_of(model, A, B, C, ID="X_6", classes=["center"])
            X_57 = eval_trilinear_point(model, A, B, C, '1/(b + c - a)', ID="X_57", classes=["center"])
            X_141 = eval_trilinear_point(model, A, B, C, 'b*c*(b**(2) + c**(2))', ID="X_141", classes=["center"])
            X_329 = eval_trilinear_point(model, A, B, C, '( -1 - cos(A) + cos(B) + cos(C))*(csc(A))', ID="X_329", classes=["center"])
            central_line(model, X_6, X_57, 6, 57)
            central_line(model, X_141, X_329, 141, 329)
            X_2097 = intersect_lines(model, X_6, X_57, X_141, X_329, ID="X_2097", classes=["selected", "target"])
            X_527 = eval_barycentric_point(model, A, B, C, '2*a**(2) - a*(b + c) - (b - c)**(2)', ID="X_527", classes=["center", "incident"])
            X_599 = eval_trilinear_point(model, A, B, C, 'b*c*(a**(2) - 2*b**(2) - 2*c**(2))', ID="X_599", classes=["center", "incident"])
            central_line(model, X_527, X_599, 527, 599, incident=True)
            return promote_point_to_top(model, X_2097)


        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_2097 on the given reference triangle."""
            model = create_model('X_2097 = REFLECTION OF X_6 IN X_57')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_02097(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-02097.json"))
            write_center_svg(
                model_acute,
                here / "x-02097.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )