X3961

X171com[INVERSE(n(INTOUCH TRIANGLE))]

< 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) incircle: Incircle of △ABC { 1, 2 }: Nagel Line { 38, 100 }: Central Line L(38, 100) { 33, 242 }: Central Line L(33, 242) { 210, 238 }: Central Line L(210, 238) { 171, 518 }: Central Line L(171, 518) { 55, 846 }: Central Line L(55, 846) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_1 = INCENTER (0.5714, 0.2333) X_2 = CENTROID (0.5374, 0.2000) X_38 = CROSSPOINT OF X(1) AND X(75) (0.5443, 0.1976) X_100 = ANTICOMPLEMENT OF FEUERBACH POINT (0.1429, 0.4666) X_33 = PERSPECTOR OF THE ORTHIC AND INTANGENTS TRIANGLES (0.6019, 0.3546) X_242 = -LINE CONJUGATE OF X(71) (0.7507, 0.7161) X_210 = -CEVA CONJUGATE OF X(37) (0.4925, 0.1466) X_238 = -LINE CONJUGATE OF X(37) (1.6190, 1.4775) X_171 = {X(2), X(31)}-HARMONIC CONJUGATE OF X(238) (0.5819, 0.2525) X_518 = ISOGONAL CONJUGATE OF X(105) (0.9154, 0.6489) X_55 = INSIMILICENTER(CIRCUMCIRCLE, INCIRCLE) (0.5490, 0.1921) X_846 = 4th SHARYGIN POINT (0.5437, 0.1969) X_3961 = com[INVERSE(n(INTOUCH TRIANGLE))] (0.5388, 0.2013) A B C X1 X2 X38 X100 X33 X242 X210 X238 X171 X518 X55 X846 X3961 (a, b, c) = (5, 6, 7) | AB = 1

X3961 (X171com[INVERSE(n(INTOUCH TRIANGLE))]) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_3961 = X_171com[INVERSE(n(INTOUCH TRIANGLE))]."""

        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,
            centroid_of,
            construct_baseline_triangle,
            create_model,
            eval_barycentric_point,
            eval_trilinear_point,
            incenter_of,
            promote_point_to_top,
        )
        from geometor.etc.render import write_center_svg


        def construct_x_03961(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_3961 = X_171com[INVERSE(n(INTOUCH TRIANGLE))] on reference triangle ABC."""
            X_3961 = eval_barycentric_point(model, A, B, C, '(a*(a**(2) + b**(2) + c**(2) - a*b - a*c + b*c))', ID="X_3961", classes=["selected", "target"])
            X_1 = incenter_of(model, A, B, C, ID="X_1", classes=["center", "incident"])
            X_2 = centroid_of(model, A, B, C, ID="X_2", classes=["center", "incident"])
            central_line(model, X_1, X_2, 1, 2, incident=True)
            X_38 = eval_trilinear_point(model, A, B, C, 'b**(2) + c**(2)', ID="X_38", classes=["center", "incident"])
            X_100 = eval_trilinear_point(model, A, B, C, '1/(b - c)', ID="X_100", classes=["center", "incident"])
            central_line(model, X_38, X_100, 38, 100, incident=True)
            X_33 = eval_trilinear_point(model, A, B, C, '1 + sec(A)', ID="X_33", classes=["center", "incident"])
            X_242 = eval_trilinear_point(model, A, B, C, '((sec(A))*((sin(A))**(2) - sin(B)*sin(C)))', ID="X_242", classes=["center", "incident"])
            central_line(model, X_33, X_242, 33, 242, incident=True)
            return promote_point_to_top(model, X_3961)


        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_3961 on the given reference triangle."""
            model = create_model('X_3961 = X_171com[INVERSE(n(INTOUCH TRIANGLE))]')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_03961(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-03961.json"))
            write_center_svg(
                model_acute,
                here / "x-03961.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )