G.388 incommensurable magnitudes added — Code¶
If two incommensurable magnitudes be added together, the whole is incommensurable with each of them; and, if the whole be incommensurable with one of them, the original magnitudes is incommensurable.
g1.py
"""Programmatic construction for Book X, Proposition 16 (X.16 - g1)."""
from __future__ import annotations
from geometor.model import Model
def construct_g1() -> Model:
"""Construct the figure 0044.g1 using geometor.model."""
model = Model("X.16.g1")
# Collinear points A, B, C on vertical line AC
A = model.set_point(24.5, -14.0, classes=["given"], ID="A")
B = model.set_point(24.5, -123.0, classes=["given"], ID="B")
C = model.set_point(24.5, -195.0, classes=["given"], ID="C")
# Common measure magnitude D
D_t = model.set_point(64.5, -15.0, ID="D")
D_b = model.set_point(64.5, -56.0, ID="D_b")
# Base lines
model.construct_line(A, C)
model.construct_line(D_t, D_b)
# Whole and subdivided segments on AC
model.set_segment(A, C)
model.set_segment(A, B)
model.set_segment(B, C)
model.set_section([A, B, C])
# Magnitude segment D
model.set_segment(D_t, D_b)
return model
if __name__ == "__main__":
construct_g1()
g2.py
"""Programmatic construction for Book X, Proposition 16 Lemma (X.16 - g2)."""
from __future__ import annotations
from geometor.model import Model
def construct_g2() -> Model:
"""Construct the figure 0045.g1 using geometor.model."""
model = Model("X.16.g2")
# Bottom line AB divided at C
A = model.set_point(20.0, -73.5, classes=["given"], ID="A")
C = model.set_point(141.0, -73.5, ID="C")
B = model.set_point(194.0, -73.5, classes=["given"], ID="B")
# Top line E-D-F completing parallelogram AD and square DB
E = model.set_point(20.0, -20.5, ID="E")
D = model.set_point(141.0, -20.5, ID="D")
F = model.set_point(194.0, -20.5, ID="F")
# Base lines
model.construct_line(A, B)
model.construct_line(E, F)
model.construct_line(A, E)
model.construct_line(C, D)
model.construct_line(B, F)
# Segments
model.set_segment(A, B)
model.set_segment(A, C)
model.set_segment(C, B)
model.set_segment(C, D)
model.set_segment(A, E)
model.set_segment(B, F)
model.set_segment(E, D)
model.set_segment(D, F)
model.set_section([A, C, B])
# Applied parallelogram AD (< A C D E >) and deficient square DB (< C B F D >)
model.set_polygon([A, C, D, E])
model.set_polygon([C, B, F, D])
model.set_polygon([A, B, F, E])
return model
if __name__ == "__main__":
construct_g2()