GC-03.07 · Symbolic Model & Source¶
Companion symbolic Python construction for GC-03.07 · Bùi Quang Tuân & Alexandre Borovik’s Greek Cross & Square (GC-03.07).
Programmatic Usage¶
from geometor.divine.catalog import build_construction
model, cert = build_construction("GC-03.07")
assert cert.ratio_expr == sp.GoldenRatio
Exact Builder Implementation¶
def build_bui_cross_and_square() -> ConstructionResult:
"""Bùi Quang Tuân & Alexandre Borovik's Greek cross and square in a circle."""
m = new_catalog_model("bui-cross-and-square")
s5 = sp.sqrt(5)
O = m.set_point(0, 0, classes=["given"], ID="O")
A = m.set_point(1, 3, classes=["given"], ID="A")
m.construct_circle(O, A, classes=["primary"], ID="cO")
# Greek cross of five 2x2 squares inscribed in cO (radius sqrt(10))
X1 = m.set_point(-1, 3, ID="X1")
C = m.set_point(1, 1, ID="C")
X2 = m.set_point(3, 1, ID="X2")
X3 = m.set_point(3, -1, ID="X3")
D = m.set_point(1, -1, ID="D")
X4 = m.set_point(1, -3, ID="X4")
X5 = m.set_point(-1, -3, ID="X5")
X6 = m.set_point(-1, -1, ID="X6")
X7 = m.set_point(-3, -1, ID="X7")
X8 = m.set_point(-3, 1, ID="X8")
X9 = m.set_point(-1, 1, ID="X9")
m.construct_polygon([X1, A, C, X2, X3, D, X4, X5, X6, X7, X8, X9], ID="CROSS")
# Inscribed concentric square S1 S2 S3 S4 of side 2*sqrt(5)
S1 = m.set_point(-s5, s5, ID="S1")
S2 = m.set_point(s5, s5, ID="S2")
S3 = m.set_point(s5, -s5, ID="S3")
S4 = m.set_point(-s5, -s5, ID="S4")
m.construct_polygon([S1, S2, S3, S4], classes=["golden"], ID="S1S2S3S4")
ln_ac = m.construct_line(A, C, classes=["golden"], ID="AC")
ln_s1s2 = m.construct_line(S1, S2, classes=["auxiliary"], ID="S1S2")
ln_s4s3 = m.construct_line(S4, S3, classes=["auxiliary"], ID="S4S3")
m.intersect(ln_ac, ln_s1s2, classes=["golden"], ID="B")
E = m.intersect(ln_ac, ln_s4s3, classes=["golden"], ID="E")
_ = E
return make_result(m, ("B", "C"), ("A", "B"), ("A", "B", "C"))
Exact Symbolic Point Coordinates¶
All points in bui-cross-and-square are certified free of floating-point approximations over \(\mathbb{Q}(\phi)\):
Point |
Exact \(x\) |
Exact \(y\) |
|---|---|---|
|
\(0\) |
\(0\) |
|
\(1\) |
\(3\) |
|
\(-1\) |
\(3\) |
|
\(1\) |
\(1\) |
|
\(3\) |
\(1\) |
|
\(3\) |
\(-1\) |
|
\(1\) |
\(-1\) |
|
\(1\) |
\(-3\) |
|
\(-1\) |
\(-3\) |
|
\(-1\) |
\(-1\) |
|
\(-3\) |
\(-1\) |
|
\(-3\) |
\(1\) |
|
\(-1\) |
\(1\) |
|
\(- \sqrt{5}\) |
\(\sqrt{5}\) |
|
\(\sqrt{5}\) |
\(\sqrt{5}\) |
|
\(\sqrt{5}\) |
\(- \sqrt{5}\) |
|
\(- \sqrt{5}\) |
\(- \sqrt{5}\) |
|
\(1\) |
\(\sqrt{5}\) |
|
\(1\) |
\(- \sqrt{5}\) |
Certified Golden Ratio: BC / AB = GoldenRatio.