GC-01.02 · Symbolic Model & Source¶
Companion symbolic Python construction for GC-01.02 · Right-Triangle Hypotenuse Transfer (1 : 2 : √5) (GC-01.02).
Programmatic Usage¶
from geometor.divine.catalog import build_construction
model, cert = build_construction("GC-01.02")
assert cert.ratio_expr == sp.GoldenRatio
Exact Builder Implementation¶
def build_pythagorean_transfer() -> ConstructionResult:
"""Heron-Ptolemy right-triangle hypotenuse transfer on a 1:2 right triangle."""
m = new_catalog_model("pythagorean-transfer")
A = m.set_point(0, 0, classes=["given"], ID="A")
B = m.set_point(2, 0, classes=["given"], ID="B")
M = m.set_point(1, 0, ID="M")
C = m.set_point(2, 1, ID="C")
seg_ab = m.construct_segment(A, B, ID="AB")
m.construct_segment(B, C, ID="BC")
ln_ac = m.construct_line(A, C, classes=["auxiliary"], ID="AC")
m.construct_polygon([A, B, C], ID="ABC")
c_bm = m.construct_circle(B, M, classes=["auxiliary"], ID="cBM")
_ = c_bm
c_cb = m.construct_circle(C, B, classes=["compass"], ID="cCB")
D = m.intersect(c_cb, ln_ac, between=(A, C), ID="D")
E = m.intersect(c_cb, ln_ac, beyond=(A, C), ID="E")
c_ad = m.construct_circle(A, D, classes=["golden"], ID="cAD")
m.intersect(c_ad, seg_ab, between=(A, B), classes=["golden"], ID="G")
_ = E
return make_result(m, ("A", "G"), ("G", "B"), ("A", "G", "B"))
Exact Symbolic Point Coordinates¶
All points in pythagorean-transfer are certified free of floating-point approximations over \(\mathbb{Q}(\phi)\):
Point |
Exact \(x\) |
Exact \(y\) |
|---|---|---|
|
\(0\) |
\(0\) |
|
\(2\) |
\(0\) |
|
\(1\) |
\(0\) |
|
\(2\) |
\(1\) |
|
\(2 - \frac{2 \sqrt{5}}{5}\) |
\(1 - \frac{\sqrt{5}}{5}\) |
|
\(\frac{2 \sqrt{5}}{5} + 2\) |
\(\frac{\sqrt{5}}{5} + 1\) |
|
\(-1 + \sqrt{5}\) |
\(0\) |
Certified Golden Ratio: AG / GB = GoldenRatio.