G.413 segments incommensurable square — Code¶
If two segments incommensurable in square which make the sum of the squares on them rational, but the rectangle contained by them medial, be added together, the whole segment is irrational: and let it be called major.
"""Programmatic construction for Book X, Proposition 39 (X.39)."""
from __future__ import annotations
from geometor.model import Model
def construct_g1() -> Model:
"""Construct the figure 0092.g1 using geometor.model."""
model = Model("X.39")
# Straight line AC divided into straight lines AB, BC incommensurable in square
A = model.set_point(17.0, -17.5, classes=["given"], ID="A")
B = model.set_point(135.0, -17.5, classes=["given"], ID="B")
C = model.set_point(215.0, -17.5, classes=["given"], ID="C")
model.construct_line(A, C)
model.set_segment(A, C)
model.set_segment(A, B)
model.set_segment(B, C)
model.set_section([A, B, C])
return model
if __name__ == "__main__":
construct_g1()