X3160

X2-CEVA CONJUGATE OF X7

X3160 = perspector of triangle ABC and the tangential triangle of the conic that passes through A, B, C and has center 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) { 175, 176 }: Soddy Line { 1, 7 }: Soddy Line { 8, 348 }: Central Line L(8, 348) { 220, 651 }: Central Line L(220, 651) { 3, 934 }: Central Line L(3, 934) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_175 = ISOPERIMETRIC POINT (0.4271, -0.1006) X_176 = EQUAL DETOUR POINT (0.5803, 0.2537) X_1 = INCENTER (0.5714, 0.2333) X_7 = GERGONNE POINT (0.5903, 0.2769) X_8 = NAGEL POINT (0.4694, 0.1333) X_348 = ISOTOMIC CONJUGATE OF X(281) (0.4854, 0.1069) X_220 = -CEVA CONJUGATE OF X(55) (0.4826, 0.1278) X_651 = TRILINEAR POLE OF LINE X(1)X(3) (0.3048, 0.5599) X_3 = CIRCUMCENTER (0.5000, 0.1021) X_934 = -CROSS CONJUGATE OF X(57) (0.4269, 0.6071) X_3160 = -CEVA CONJUGATE OF X(7) (0.5037, 0.0766) A B C X175 X176 X1 X7 X8 X348 X220 X651 X3 X934 X3160 (a, b, c) = (5, 6, 7) | AB = 1

X3160 (X2-CEVA CONJUGATE OF X7) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_3160 = X_2-CEVA CONJUGATE 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,
            incenter_of,
            midpoint,
            nagel_point_of,
            promote_point_to_top,
        )
        from geometor.etc.render import write_center_svg


        def construct_x_03160(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_3160 = X_2-CEVA CONJUGATE OF X_7 on reference triangle ABC."""
            X_175 = eval_trilinear_point(model, A, B, C, '-1 + sec(A/2)*cos(B/2)*cos(C/2)', ID="X_175", classes=["center"])
            X_176 = eval_trilinear_point(model, A, B, C, '1 + sec(A/2)*cos(B/2)*cos(C/2)', ID="X_176", classes=["center"])
            X_3160 = midpoint(model, X_175, X_176, ID="X_3160", classes=["selected", "target"], guide=False)
            X_1 = incenter_of(model, A, B, C, ID="X_1", classes=["center", "incident"])
            X_7 = gergonne_point_of(model, A, B, C, ID="X_7", classes=["center", "incident"])
            central_line(model, X_1, X_7, 1, 7, incident=True)
            X_8 = nagel_point_of(model, A, B, C, ID="X_8", classes=["center", "incident"])
            X_348 = eval_trilinear_point(model, A, B, C, 'cot(A)*(sec(A/2))**(2)', ID="X_348", classes=["center", "incident"])
            central_line(model, X_8, X_348, 8, 348, incident=True)
            X_220 = eval_trilinear_point(model, A, B, C, 'a*(b + c - a)**(2)', ID="X_220", classes=["center", "incident"])
            X_651 = eval_trilinear_point(model, A, B, C, '1/(cos(B) - cos(C))', ID="X_651", classes=["center", "incident"])
            central_line(model, X_220, X_651, 220, 651, incident=True)
            return promote_point_to_top(model, X_3160)


        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_3160 on the given reference triangle."""
            model = create_model('X_3160 = X_2-CEVA CONJUGATE OF X_7')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_03160(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-03160.json"))
            write_center_svg(
                model_acute,
                here / "x-03160.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )