X3058

INTERSECTION OF LINES X1X_30 AND X2X_11

X3058 = X2-of-Mandart-incircle-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) { 2, 11 }: Central Line L(2, 11) { 1, 30 }: Central Line L(1, 30) { 12, 381 }: Central Line L(12, 381) { 72, 519 }: Central Line L(72, 519) { 496, 549 }: Central Line L(496, 549) { 516, 553 }: Central Line L(516, 553) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_2 = CENTROID (0.5374, 0.2000) X_11 = FEUERBACH POINT (0.7347, 0.0667) X_1 = INCENTER (0.5714, 0.2333) X_30 = EULER INFINITY POINT (0.7469, 0.7481) X_12 = {X(1),X(5)}-HARMONIC CONJUGATE OF X(11) (0.5641, 0.2407) X_381 = MIDPOINT OF X(2) AND X(4) (0.5748, 0.2979) X_72 = ISOGONAL CONJUGATE OF X(28) (0.4367, 0.0733) X_519 = ISOGONAL CONJUGATE OF X(106) (0.9566, 0.6107) X_496 = {X(1),X(5)}-HARMONIC CONJUGATE OF X(495) (0.5843, 0.2201) X_549 = MIDPOINT OF X(2) AND X(3) (0.5187, 0.1510) X_516 = ISOGONAL CONJUGATE OF X(103) (0.7703, 0.7386) X_553 = POINT MAIA II (0.5963, 0.2857) X_3058 = INTERSECTION OF LINES X(1)X(30) AND X(2)X(11) (0.5543, 0.1885) A B C X2 X11 X1 X30 X12 X381 X72 X519 X496 X549 X516 X553 X3058 (a, b, c) = (5, 6, 7) | AB = 1

X3058 (INTERSECTION OF LINES X1X_30 AND X2X_11) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_3058 = INTERSECTION OF LINES X_1X_30 AND X_2X_11."""

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


        def construct_x_03058(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_3058 = INTERSECTION OF LINES X_1X_30 AND X_2X_11 on reference triangle ABC."""
            X_3058 = eval_trilinear_point(model, A, B, C, '(b*c*(b + c - a)*(2*a**(2) + b**(2) + c**(2) - 2*b*c))', ID="X_3058", classes=["selected", "target"])
            X_2 = centroid_of(model, A, B, C, ID="X_2", classes=["center", "incident"])
            X_11 = feuerbach_point_of(model, A, B, C, ID="X_11", classes=["center", "incident"])
            central_line(model, X_2, X_11, 2, 11, incident=True)
            X_1 = incenter_of(model, A, B, C, ID="X_1", classes=["center", "incident"])
            X_30 = eval_trilinear_point(model, A, B, C, 'cos(A) - 2*cos(B)*cos(C)', ID="X_30", classes=["center", "incident"])
            central_line(model, X_1, X_30, 1, 30, incident=True)
            X_12 = eval_trilinear_point(model, A, B, C, '1 + cos(B - C)', ID="X_12", classes=["center", "incident"])
            X_381 = eval_trilinear_point(model, A, B, C, '2*cos(B - C) - cos(A)', ID="X_381", classes=["center", "incident"])
            central_line(model, X_12, X_381, 12, 381, incident=True)
            return promote_point_to_top(model, X_3058)


        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_3058 on the given reference triangle."""
            model = create_model('X_3058 = INTERSECTION OF LINES X_1X_30 AND X_2X_11')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_03058(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-03058.json"))
            write_center_svg(
                model_acute,
                here / "x-03058.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )