X3157

X1-CEVA CONJUGATE OF X3

< 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) { 3, 73 }: Central Line L(3, 73) { 12, 68 }: Central Line L(12, 68) { 1, 90 }: Central Line L(1, 90) { 6, 169 }: Central Line L(6, 169) { 56, 215 }: Central Line L(56, 215) { 72, 394 }: Central Line L(72, 394) 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_3 = CIRCUMCENTER (0.5000, 0.1021) X_73 = CROSSPOINT OF INCENTER AND CIRCUMCENTER (0.5487, 0.1428) X_12 = {X(1),X(5)}-HARMONIC CONJUGATE OF X(11) (0.5641, 0.2407) X_68 = PRASOLOV POINT (-0.0535, -0.0055) X_90 = -CROSS CONJUGATE OF X(1) (0.1022, 0.0201) X_6 = SYMMEDIAN POINT (LEMOINE POINT, GREBE POINT) (0.6000, 0.2672) X_169 = -CEVA CONJUGATE OF X(1) (0.5497, 0.2510) X_56 = EXSIMILICENTER(CIRCUMCIRCLE, INCIRCLE) (0.6316, 0.3438) X_215 = -CEVA CONJUGATE OF X(50) (0.4113, 0.3887) X_72 = ISOGONAL CONJUGATE OF X(28) (0.4367, 0.0733) X_394 = -CEVA CONJUGATE OF X(3) (0.3778, 0.0284) X_3157 = -CEVA CONJUGATE OF X(3) (0.7579, 0.3180) A B C X1 X3 X73 X12 X68 X90 X6 X169 X56 X215 X72 X394 X3157 (a, b, c) = (5, 6, 7) | AB = 1

X3157 (X1-CEVA CONJUGATE OF X3) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_3157 = X_1-CEVA CONJUGATE OF X_3."""

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


        def construct_x_03157(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_3157 = X_1-CEVA CONJUGATE OF X_3 on reference triangle ABC."""
            X_3 = circumcenter_of(model, A, B, C, ID="X_3", classes=["center"])
            X_73 = eval_trilinear_point(model, A, B, C, 'sec(B) + sec(C)', ID="X_73", classes=["center"])
            X_12 = eval_trilinear_point(model, A, B, C, '1 + cos(B - C)', ID="X_12", classes=["center"])
            X_68 = eval_trilinear_point(model, A, B, C, 'cos(A)*sec(2*A)', ID="X_68", classes=["center"])
            central_line(model, X_3, X_73, 3, 73)
            central_line(model, X_12, X_68, 12, 68)
            X_3157 = intersect_lines(model, X_3, X_73, X_12, X_68, ID="X_3157", classes=["selected", "target"])
            X_1 = incenter_of(model, A, B, C, ID="X_1", classes=["center", "incident"])
            X_90 = eval_trilinear_point(model, A, B, C, '1/(cos(B) + cos(C) - cos(A))', ID="X_90", classes=["center", "incident"])
            central_line(model, X_1, X_90, 1, 90, incident=True)
            return promote_point_to_top(model, X_3157)


        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_3157 on the given reference triangle."""
            model = create_model('X_3157 = X_1-CEVA CONJUGATE OF X_3')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_03157(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-03157.json"))
            write_center_svg(
                model_acute,
                here / "x-03157.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )