X1660

1st GRINBERG MIDPOINTS PERSPECTOR

The lines AXA, BXB, CXC concur in X20.
< 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) { 394, 1619 }: Central Line L(394, 1619) { 6, 25 }: Central Line L(6, 25) { 30, 156 }: Central Line L(30, 156) { 110, 1370 }: Central Line L(110, 1370) { 578, 1596 }: Central Line L(578, 1596) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_394 = -CEVA CONJUGATE OF X(3) (0.3778, 0.0284) X_1619 = TCC-PERSPECTOR OF X(63) (0.4315, -1.6641) X_6 = SYMMEDIAN POINT (LEMOINE POINT, GREBE POINT) (0.6000, 0.2672) X_25 = HOMOTHETIC CENTER OF ORTHIC AND TANGENTIAL TRIANGLES (0.6329, 0.4497) X_30 = EULER INFINITY POINT (0.7469, 0.7481) X_156 = -OF-TANGENTIAL-TRIANGLE (0.6520, -0.1707) X_110 = FOCUS OF KIEPERT PARABOLA (0.2516, 0.5478) X_1370 = ANTICOMPLEMENT OF X(25) (0.3465, -0.2995) X_578 = ORTHOHARMONIC OF X(216) (0.5933, 0.2561) X_1596 = POINT CHELEB II (0.6225, 0.4227) X_1660 = 1st GRINBERG MIDPOINTS PERSPECTOR (0.4046, -0.8179) A B C X394 X1619 X6 X25 X30 X156 X110 X1370 X578 X1596 X1660 (a, b, c) = (5, 6, 7) | AB = 1

X1660 (1st GRINBERG MIDPOINTS PERSPECTOR) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_1660 = 1st GRINBERG MIDPOINTS PERSPECTOR."""

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


        def construct_x_01660(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_1660 = 1st GRINBERG MIDPOINTS PERSPECTOR on reference triangle ABC."""
            X_394 = eval_trilinear_point(model, A, B, C, 'cos(A)*cot(A)', ID="X_394", classes=["center"])
            X_1619 = point_from_barycentrics(model, A, B, C, 1.6442071, 2.1299263, -2.7741334, ID="X_1619", classes=["center"])
            X_1660 = midpoint(model, X_394, X_1619, ID="X_1660", classes=["selected", "target"], guide=False)
            X_6 = symmedian_point_of(model, A, B, C, ID="X_6", classes=["center", "incident"])
            X_25 = eval_trilinear_point(model, A, B, C, 'sin(A)*tan(A)', ID="X_25", classes=["center", "incident"])
            central_line(model, X_6, X_25, 6, 25, incident=True)
            X_30 = eval_trilinear_point(model, A, B, C, 'cos(A) - 2*cos(B)*cos(C)', ID="X_30", classes=["center", "incident"])
            X_156 = eval_barycentric_point(model, A, B, C, 'a**(2)*(a**(8) - 3*a**(6)*(b**(2) + c**(2)) + a**(4)*(3*b**(4) + 2*b**(2)*c**(2) + 3*c**(4)) - a**(2)*(b**(6) + c**(6)) + b**(2)*c**(2)*(b**(2) - c**(2))**(2))', ID="X_156", classes=["center", "incident"])
            central_line(model, X_30, X_156, 30, 156, incident=True)
            X_110 = eval_trilinear_point(model, A, B, C, 'csc(B - C)', ID="X_110", classes=["center", "incident"])
            X_1370 = eval_trilinear_point(model, A, B, C, '(b*c*(b**(2)/(a**(2) - b**(2) + c**(2)) + c**(2)/(a**(2) + b**(2) - c**(2)) - a**(2)/(- a**(2) + b**(2) + c**(2))))', ID="X_1370", classes=["center", "incident"])
            central_line(model, X_110, X_1370, 110, 1370, incident=True)
            return promote_point_to_top(model, X_1660)


        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_1660 on the given reference triangle."""
            model = create_model('X_1660 = 1st GRINBERG MIDPOINTS PERSPECTOR')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_01660(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-01660.json"))
            write_center_svg(
                model_acute,
                here / "x-01660.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )