X2982

DC(X21)

< 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) { 28, 65 }: Central Line L(28, 65) { 48, 57 }: Central Line L(48, 57) { 1, 201 }: Central Line L(1, 201) { 2, 219 }: Central Line L(2, 219) { 6, 278 }: Central Line L(6, 278) { 222, 279 }: Central Line L(222, 279) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_28 = CEVAPOINT OF X(19) AND X(25) (0.6285, 0.4382) X_65 = ORTHOCENTER OF THE INTOUCH TRIANGLE (0.6041, 0.2933) X_48 = CROSSPOINT OF X(1) AND X(63) (0.5412, 0.1246) X_57 = ISOGONAL CONJUGATE OF X(9) (0.6138, 0.3110) X_1 = INCENTER (0.5714, 0.2333) X_201 = -CEVA CONJUGATE OF X(12) (0.4897, 0.1062) X_2 = CENTROID (0.5374, 0.2000) X_219 = -CEVA CONJUGATE OF X(55) (0.4277, 0.0625) X_6 = SYMMEDIAN POINT (LEMOINE POINT, GREBE POINT) (0.6000, 0.2672) X_278 = ISOGONAL CONJUGATE OF X(219) (0.6278, 0.4577) X_222 = -CEVA CONJUGATE OF X(56) (0.5653, 0.1568) X_279 = ISOGONAL CONJUGATE OF X(220) (0.6236, 0.3540) X_2982 = DC(X(21)) (0.6020, 0.2808) A B C X28 X65 X48 X57 X1 X201 X2 X219 X6 X278 X222 X279 X2982 (a, b, c) = (5, 6, 7) | AB = 1

X2982 (DC(X21)) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_2982 = DC(X_21)."""

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


        def construct_x_02982(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_2982 = DC(X_21) on reference triangle ABC."""
            X_2982 = eval_trilinear_point(model, A, B, C, '1/((b + c)*cos(A) + b*cos(B) + c*cos(C))', ID="X_2982", classes=["selected", "target"])
            X_28 = eval_trilinear_point(model, A, B, C, '(tan(A))/(b + c)', ID="X_28", classes=["center", "incident"])
            X_65 = eval_trilinear_point(model, A, B, C, 'cos(B) + cos(C)', ID="X_65", classes=["center", "incident"])
            central_line(model, X_28, X_65, 28, 65, incident=True)
            X_48 = eval_trilinear_point(model, A, B, C, 'tan(B) + tan(C)', ID="X_48", classes=["center", "incident"])
            X_57 = eval_trilinear_point(model, A, B, C, '1/(b + c - a)', ID="X_57", classes=["center", "incident"])
            central_line(model, X_48, X_57, 48, 57, incident=True)
            X_1 = incenter_of(model, A, B, C, ID="X_1", classes=["center", "incident"])
            X_201 = eval_trilinear_point(model, A, B, C, '(cos(A))*(1 + cos(B - C))', ID="X_201", classes=["center", "incident"])
            central_line(model, X_1, X_201, 1, 201, incident=True)
            return promote_point_to_top(model, X_2982)


        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_2982 on the given reference triangle."""
            model = create_model('X_2982 = DC(X_21)')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_02982(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-02982.json"))
            write_center_svg(
                model_acute,
                here / "x-02982.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )