X496

{X1,X5}-HARMONIC CONJUGATE OF X495

X496 is the {X1,X5}-harmonic conjugate of X495.
< 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) { 1, 5 }: Feuerbach Line { 30, 56 }: Central Line L(30, 56) { 55, 140 }: Central Line L(55, 140) { 149, 404 }: Central Line L(149, 404) { 202, 397 }: Central Line L(202, 397) A = Vertex A (0.0000, 0.0000) B = Vertex B (1.0000, 0.0000) C = Vertex C (0.6122, 0.5999) X_495 = JOHNSON MIDPOINT (0.5666, 0.2382) X_1 = INCENTER (0.5714, 0.2333) X_5 = NINE-POINT CENTER (0.5561, 0.2489) X_30 = EULER INFINITY POINT (0.7469, 0.7481) X_56 = EXSIMILICENTER(CIRCUMCIRCLE, INCIRCLE) (0.6316, 0.3438) X_55 = INSIMILICENTER(CIRCUMCIRCLE, INCIRCLE) (0.5490, 0.1921) X_140 = MIDPOINT OF X(3) AND X(5) (0.5281, 0.1755) X_149 = REFLECTION OF X(20) IN X(104) (1.3265, -0.3333) X_404 = {X(2),X(3)}-HARMONIC CONJUGATE OF X(21) (0.5538, 0.2429) X_202 = -CEVA CONJUGATE OF X(15) (0.5962, 0.2697) X_397 = CROSSPOINT OF X(4) AND X(17) (0.6029, 0.2975) X_496 = {X(1),X(5)}-HARMONIC CONJUGATE OF X(495) (0.5843, 0.2201) A B C X495 X1 X5 X30 X56 X55 X140 X149 X404 X202 X397 X496 (a, b, c) = (5, 6, 7) | AB = 1

X496 ({X1,X5}-HARMONIC CONJUGATE OF X495) constructed on acute reference triangle \((a, b, c) = (5, 6, 7)\) with unit baseline AB = \(1\).

"""GEOMETOR construction model for X_496 = {X_1,X_5}-HARMONIC CONJUGATE OF X_495."""

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


        def construct_x_00496(
            model: Model, A: spg.Point, B: spg.Point, C: spg.Point
        ) -> spg.Point:
            """Construct X_496 = {X_1,X_5}-HARMONIC CONJUGATE OF X_495 on reference triangle ABC."""
            X_496 = eval_trilinear_point(model, A, B, C, '2 - cos(B - C)', ID="X_496", classes=["selected", "target"])
            X_1 = incenter_of(model, A, B, C, ID="X_1", classes=["center", "incident"])
            X_5 = nine_point_center_of(model, A, B, C, ID="X_5", classes=["center", "incident"])
            central_line(model, X_1, X_5, 1, 5, incident=True)
            X_30 = eval_trilinear_point(model, A, B, C, 'cos(A) - 2*cos(B)*cos(C)', ID="X_30", classes=["center", "incident"])
            X_56 = eval_trilinear_point(model, A, B, C, 'a/(b + c - a)', ID="X_56", classes=["center", "incident"])
            central_line(model, X_30, X_56, 30, 56, incident=True)
            X_55 = eval_trilinear_point(model, A, B, C, 'a*(b + c - a)', ID="X_55", classes=["center", "incident"])
            X_140 = eval_trilinear_point(model, A, B, C, '2*cos(A) + cos(B - C)', ID="X_140", classes=["center", "incident"])
            central_line(model, X_55, X_140, 55, 140, incident=True)
            return promote_point_to_top(model, X_496)


        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_496 on the given reference triangle."""
            model = create_model('X_496 = {X_1,X_5}-HARMONIC CONJUGATE OF X_495')
            A, B, C = construct_baseline_triangle(model, *sides, show_guides=show_guides)
            construct_x_00496(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-00496.json"))
            write_center_svg(
                model_acute,
                here / "x-00496.svg",
                subtitle="(a, b, c) = (5, 6, 7) | AB = 1",
            )