X3258

CROSSSUM OF X74 AND X110

X3258 = midpoint of X4 and X477
< 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) { 4, 477 }: Central Line L(4, 477) { 30, 113 }: Central Line L(30, 113) { 2, 476 }: Central Line L(2, 476) { 133, 403 }: Central Line L(133, 403) { 132, 468 }: Central Line L(132, 468) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_4 = ORTHOCENTER (0.6122, 0.3958) X_477 = TIXIER ANTIPODE (0.0176, -0.0644) X_30 = EULER INFINITY POINT (0.7469, 0.7481) X_113 = JERABEK ANTIPODE (0.4319, 0.4718) X_2 = CENTROID (0.5374, 0.2000) X_476 = TIXIER POINT (0.9824, 0.2685) X_133 = INTERSECTION OF LINES X(4)X(74) AND X(5)X(122) (0.5928, 0.5014) X_403 = OF THE ORTHIC TRIANGLE (0.7040, 0.6358) X_132 = ∩X(4)X(32) (0.5642, 0.5039) X_468 = -LINE CONJUGATE OF X(3) (0.7498, 0.7558) X_3258 = CROSSSUM OF X(74) AND X(110) (0.3149, 0.1657) A B C X4 X477 X30 X113 X2 X476 X133 X403 X132 X468 X3258 (a, b, c) = (5, 6, 7) | AB = 1

X3258 (CROSSSUM OF X74 AND X110) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_3258 = CROSSSUM OF X_74 AND X_110."""

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


        def construct_x_03258(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_3258 = CROSSSUM OF X_74 AND X_110 on reference triangle ABC."""
            X_4 = orthocenter_of(model, A, B, C, ID="X_4", classes=["center"])
            X_477 = eval_trilinear_point(model, A, B, C, '1/(4*cos(A) + cos(A - 2*B) + cos(A - 2*C) - 3*cos(B - C))', ID="X_477", classes=["center"])
            X_3258 = midpoint(model, X_4, X_477, ID="X_3258", classes=["selected", "target"], guide=False)
            X_30 = eval_trilinear_point(model, A, B, C, 'cos(A) - 2*cos(B)*cos(C)', ID="X_30", classes=["center", "incident"])
            X_113 = eval_trilinear_point(model, A, B, C, 'sin(B)*sin(C)*((sin(C))/(cos(C) - 2*cos(A)*cos(B)) + (sin(B))/(cos(B) - 2*cos(A)*cos(C)))', ID="X_113", classes=["center", "incident"])
            central_line(model, X_30, X_113, 30, 113, incident=True)
            X_2 = centroid_of(model, A, B, C, ID="X_2", classes=["center", "incident"])
            X_476 = eval_trilinear_point(model, A, B, C, '1/((1 + 2*cos(2*A))*sin(B - C))', ID="X_476", classes=["center", "incident"])
            central_line(model, X_2, X_476, 2, 476, incident=True)
            central_line(model, X_4, X_477, 4, 477, incident=True)
            return promote_point_to_top(model, X_3258)


        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_3258 on the given reference triangle."""
            model = create_model('X_3258 = CROSSSUM OF X_74 AND X_110')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_03258(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-03258.json"))
            write_center_svg(
                model_acute,
                here / "x-03258.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )