X1602

TCC-PERSPECTOR OF X7

X1602 is the tcc-perspector of X7.
< 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) { 24, 242 }: Central Line L(24, 242) { 7, 1486 }: Central Line L(7, 1486) { 22, 1626 }: Central Line L(22, 1626) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_24 = PERSPECTOR OF ABC AND ORTHIC-OF-ORTHIC TRIANGLE (0.6627, 0.5278) X_242 = -LINE CONJUGATE OF X(71) (0.7507, 0.7161) X_7 = GERGONNE POINT (0.5903, 0.2769) X_1486 = PERSPECTOR OF TANGENTIAL AND INTOUCH TRIANGLES (0.5798, 0.2866) X_22 = EXETER POINT (0.4143, -0.1221) X_1626 = TCC-PERSPECTOR OF X(174) (0.5286, 0.2160) X_1602 = TCC-PERSPECTOR OF X(7) (0.5590, 0.3060) A B C X24 X242 X7 X1486 X22 X1626 X1602 (a, b, c) = (5, 6, 7) | AB = 1

X1602 (TCC-PERSPECTOR OF X7) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_1602 = TCC-PERSPECTOR OF X_7."""

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


        def construct_x_01602(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_1602 = TCC-PERSPECTOR OF X_7 on reference triangle ABC."""
            X_24 = eval_trilinear_point(model, A, B, C, 'sec(A)*cos(2*A)', ID="X_24", classes=["center"])
            X_242 = eval_trilinear_point(model, A, B, C, '((sec(A))*((sin(A))**(2) - sin(B)*sin(C)))', ID="X_242", classes=["center"])
            X_7 = gergonne_point_of(model, A, B, C, ID="X_7", classes=["center"])
            X_1486 = eval_trilinear_point(model, A, B, C, 'a*( - a**(2)*(b + c - a) + b**(2)*(c + a - b) + c**(2)*(a + b - c))', ID="X_1486", classes=["center"])
            central_line(model, X_24, X_242, 24, 242)
            central_line(model, X_7, X_1486, 7, 1486)
            X_1602 = intersect_lines(model, X_24, X_242, X_7, X_1486, ID="X_1602", classes=["selected", "target"])
            X_22 = eval_trilinear_point(model, A, B, C, 'a*(b**(4) + c**(4) - a**(4))', ID="X_22", classes=["center", "incident"])
            X_1626 = point_from_barycentrics(model, A, B, C, 0.33171058, 0.30813288, 0.36015655, ID="X_1626", classes=["center", "incident"])
            central_line(model, X_22, X_1626, 22, 1626, incident=True)
            return promote_point_to_top(model, X_1602)


        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_1602 on the given reference triangle."""
            model = create_model('X_1602 = TCC-PERSPECTOR OF X_7')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_01602(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-01602.json"))
            write_center_svg(
                model_acute,
                here / "x-01602.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )