GC-05.04 · Symbolic Model & Source

Companion symbolic Python construction for GC-05.04 · Tran Quang Hung’s Shared-Base Regular Pentagon & Hexagon (GC-05.04).

Programmatic Usage

from geometor.divine.catalog import build_construction

        model, cert = build_construction("GC-05.04")
        assert cert.ratio_expr == sp.GoldenRatio
        

Exact Builder Implementation

def build_tran_pentagon_hexagon() -> ConstructionResult:
            """Tran Quang Hung's regular pentagon inscribed on the base of a regular hexagon."""
            m = new_catalog_model("tran-pentagon-hexagon")
            phi, s36, _c36, _s72, _c72 = _pentagon_radicals()
            phi2 = phi + 1
            s3 = sp.sqrt(3)

            A = m.set_point(-1, 0, classes=["given"], ID="A")
            F = m.set_point(1, 0, classes=["given"], ID="F")
            E = m.set_point(2, s3, ID="E")
            D = m.set_point(1, 2 * s3, ID="D")
            C = m.set_point(-1, 2 * s3, ID="C")
            B = m.set_point(-2, s3, ID="B")
            m.construct_polygon([A, B, C, D, E, F], ID="ABCDEF")

            M = m.set_point(-phi, 2 * phi * s36, ID="M")
            N = m.set_point(0, 2 * phi2 * s36, ID="N")
            P = m.set_point(phi, 2 * phi * s36, ID="P")
            m.construct_polygon([A, M, N, P, F], classes=["golden"], ID="AMNPF")
            m.construct_segment(M, P, classes=["auxiliary"], ID="MP")

            ln_bc = m.construct_line(B, C, classes=["golden"], ID="BC")
            ln_de = m.construct_line(D, E, classes=["auxiliary"], ID="DE")

            # Perpendiculars to horizontal diagonal MP at M and P
            GM = m.set_point(-phi, 2 * phi * s36 + 1, guide=True, ID="GM")
            GP = m.set_point(phi, 2 * phi * s36 + 1, guide=True, ID="GP")
            ln_mq = m.construct_line(M, GM, classes=["golden"], ID="MQ")
            ln_pr = m.construct_line(P, GP, classes=["auxiliary"], ID="PR")

            m.intersect(ln_mq, ln_bc, classes=["golden"], ID="Q")
            R = m.intersect(ln_pr, ln_de, classes=["golden"], ID="R")
            _ = R

            return make_result(m, ("C", "Q"), ("Q", "B"), ("C", "Q", "B"))
        

Exact Symbolic Point Coordinates

All points in tran-pentagon-hexagon are certified free of floating-point approximations over \(\mathbb{Q}(\sqrt{3}, \phi, \sqrt{10 - 2\sqrt{5}})\):

Point

Exact \(x\)

Exact \(y\)

A

\(-1\)

\(0\)

F

\(1\)

\(0\)

E

\(2\)

\(\sqrt{3}\)

D

\(1\)

\(2 \sqrt{3}\)

C

\(-1\)

\(2 \sqrt{3}\)

B

\(-2\)

\(\sqrt{3}\)

M

\(- \frac{\sqrt{5}}{2} - \frac{1}{2}\)

\(\frac{\sqrt{2} \sqrt{5 - \sqrt{5}} + \sqrt{10} \sqrt{5 - \sqrt{5}}}{4}\)

N

\(0\)

\(\frac{\sqrt{10} \sqrt{5 - \sqrt{5}} + 3 \sqrt{2} \sqrt{5 - \sqrt{5}}}{4}\)

P

\(\frac{1}{2} + \frac{\sqrt{5}}{2}\)

\(\frac{\sqrt{2} \sqrt{5 - \sqrt{5}} + \sqrt{10} \sqrt{5 - \sqrt{5}}}{4}\)

Q

\(- \frac{\sqrt{5}}{2} - \frac{1}{2}\)

\(\frac{- \sqrt{15} + 5 \sqrt{3}}{2}\)

R

\(\frac{1}{2} + \frac{\sqrt{5}}{2}\)

\(\frac{- \sqrt{15} + 5 \sqrt{3}}{2}\)

Certified Golden Ratio: CQ / QB = GoldenRatio.