X253

X4-CROSS CONJUGATE OF X2

X253 is the perspector of ABC and the pedal triangle of X64.
< 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) { 20, 64 }: Central Line L(20, 64) { 7, 280 }: Central Line L(7, 280) { 8, 307 }: Central Line L(8, 307) { 193, 287 }: Central Line L(193, 287) { 306, 329 }: Central Line L(306, 329) { 318, 342 }: Central Line L(318, 342) 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_2 = CENTROID (0.5374, 0.2000) X_20 = DE LONGCHAMPS POINT (0.3878, -0.1916) X_64 = ISOGONAL CONJUGATE OF X(20) (0.5579, 1.5943) X_7 = GERGONNE POINT (0.5903, 0.2769) X_280 = -CROSS CONJUGATE OF X(8) (0.6379, 0.8041) X_8 = NAGEL POINT (0.4694, 0.1333) X_307 = ISOTOMIC CONJUGATE OF X(29) (0.4659, 0.0959) X_193 = -CEVA CONJUGATE OF X(2) (0.7878, 0.4690) X_287 = -HIRST INVERSE OF X(98) (0.7437, -0.0511) X_306 = ISOTOMIC CONJUGATE OF X(27) (0.3924, 0.0579) X_329 = ISOTOMIC CONJUGATE OF X(189) (0.3847, -0.0222) X_318 = ISOTOMIC CONJUGATE OF X(77) (0.5514, 0.2839) X_342 = ISOTOMIC CONJUGATE OF X(271) (0.5119, -0.1470) X_253 = -CROSS CONJUGATE OF X(2) (3.5087, 32.5688) A B C X4 X2 X20 X64 X7 X280 X8 X307 X193 X287 X306 X329 X318 X342 X253 (a, b, c) = (5, 6, 7) | AB = 1

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

"""GEOMETOR construction model for X_253 = X_4-CROSS CONJUGATE OF X_2."""

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


        def construct_x_00253(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_253 = X_4-CROSS CONJUGATE OF X_2 on reference triangle ABC."""
            X_154 = eval_trilinear_point(model, A, B, C, '(cos(A) - cos(B)*cos(C))*a**(2)', ID="X_154", classes=["center"])
            X_253 = isogonal_conjugate(model, A, B, C, X_154, ID="X_253", classes=["selected", "target"])
            X_20 = eval_trilinear_point(model, A, B, C, 'cos(A) - cos(B)*cos(C)', ID="X_20", classes=["center", "incident"])
            X_64 = eval_trilinear_point(model, A, B, C, '1/(cos(A) - cos(B)*cos(C))', ID="X_64", classes=["center", "incident"])
            central_line(model, X_20, X_64, 20, 64, incident=True)
            X_7 = gergonne_point_of(model, A, B, C, ID="X_7", classes=["center", "incident"])
            X_280 = eval_trilinear_point(model, A, B, C, '((csc(A/2))**(2))/(-1 - cos(A) + cos(B) + cos(C))', ID="X_280", classes=["center", "incident"])
            central_line(model, X_7, X_280, 7, 280, incident=True)
            X_8 = nagel_point_of(model, A, B, C, ID="X_8", classes=["center", "incident"])
            X_307 = eval_trilinear_point(model, A, B, C, 'b**(2)*c**(2)*(b + c)*(cos(A))/(b + c - a)', ID="X_307", classes=["center", "incident"])
            central_line(model, X_8, X_307, 8, 307, incident=True)
            return promote_point_to_top(model, X_253)


        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_253 on the given reference triangle."""
            model = create_model('X_253 = X_4-CROSS CONJUGATE OF X_2')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_00253(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-00253.json"))
            write_center_svg(
                model_acute,
                here / "x-00253.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )