X2096

REFLECTION OF X4 IN X57

X2096 is the reflection of X4 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) { 4, 57 }: Central Line L(4, 57) { 7, 104 }: Central Line L(7, 104) { 20, 145 }: Central Line L(20, 145) { 3, 329 }: Central Line L(3, 329) { 376, 527 }: Central Line L(376, 527) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_4 = ORTHOCENTER (0.6122, 0.3958) X_57 = ISOGONAL CONJUGATE OF X(9) (0.6138, 0.3110) X_7 = GERGONNE POINT (0.5903, 0.2769) X_104 = ANTIPODE OF X(100) (0.8571, -0.2624) X_20 = DE LONGCHAMPS POINT (0.3878, -0.1916) X_145 = ANTICOMPLEMENT OF NAGEL POINT (0.6735, 0.3333) X_3 = CIRCUMCENTER (0.5000, 0.1021) X_329 = ISOTOMIC CONJUGATE OF X(189) (0.3847, -0.0222) X_376 = CENTROID OF THE ANTIPEDAL TRIANGLE OF X(2) (0.4626, 0.0042) X_527 = DIRECTION OF VECTOR AX + BX + CX, where X = X(7) (0.8698, 0.6836) X_2096 = REFLECTION OF X(4) IN X(57) (0.6153, 0.2263) A B C X4 X57 X7 X104 X20 X145 X3 X329 X376 X527 X2096 (a, b, c) = (5, 6, 7) | AB = 1

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

"""GEOMETOR construction model for X_2096 = REFLECTION OF X_4 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_trilinear_point,
            gergonne_point_of,
            intersect_lines,
            orthocenter_of,
            promote_point_to_top,
        )
        from geometor.etc.render import write_center_svg


        def construct_x_02096(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_2096 = REFLECTION OF X_4 IN X_57 on reference triangle ABC."""
            X_4 = orthocenter_of(model, A, B, C, ID="X_4", classes=["center"])
            X_57 = eval_trilinear_point(model, A, B, C, '1/(b + c - a)', ID="X_57", classes=["center"])
            X_7 = gergonne_point_of(model, A, B, C, ID="X_7", classes=["center"])
            X_104 = eval_trilinear_point(model, A, B, C, '1/(-1 + cos(B) + cos(C))', ID="X_104", classes=["center"])
            central_line(model, X_4, X_57, 4, 57)
            central_line(model, X_7, X_104, 7, 104)
            X_2096 = intersect_lines(model, X_4, X_57, X_7, X_104, ID="X_2096", classes=["selected", "target"])
            X_20 = eval_trilinear_point(model, A, B, C, 'cos(A) - cos(B)*cos(C)', ID="X_20", classes=["center", "incident"])
            X_145 = eval_trilinear_point(model, A, B, C, 'b*c*(3*a - b - c)', ID="X_145", classes=["center", "incident"])
            central_line(model, X_20, X_145, 20, 145, incident=True)
            return promote_point_to_top(model, X_2096)


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