modules¶
geometor.petersen¶
GEOMETOR • petersen: Digital Scriptorium Codex & Exact Constructive Pattern Library.
Scholarly 3-track edition (English 1879 · Summary · Notes) and 100% exact symbolic
geometor.model constructions for Julius Petersen’s Methods and Theories for the
Solution of Problems of Geometrical Constructions, Applied to 410 Problems
(Copenhagen, 1866; Authorized English Edition translated by Sophus Haagensen, 1879).
Submodules¶
Attributes¶
Classes¶
Single cross-repository concordance entry linking Petersen to the GEOMETOR canon. |
|
Loaded scholarly apparatus and concordance tables for Methods and Theories. |
|
Metadata specification for one 3-track Book Codex unit. |
Functions¶
|
Compile all 3-track Book Codex RST files, root apparatus mirrors, and SVG figures. |
|
Build all 8 exact symbolic models and export calibrated |
|
Convert an apparatus key (e.g. |
|
Load and validate all JSON apparatus files from |
|
Find points |
|
Construct right triangles on hypotenuse |
|
Through external point |
|
Place an equilateral triangle |
|
Find |
|
Inscribe a square |
|
Construct a circle touching three circles |
|
Construct trapezoid |
|
Write a |
|
Render |
Package Contents¶
- geometor.petersen.__version__ = '0.1.0'¶
- geometor.petersen.build_codex(repo_root: pathlib.Path | None = None, *, export_figures: bool = True) list[pathlib.Path]¶
Compile all 3-track Book Codex RST files, root apparatus mirrors, and SVG figures.
- geometor.petersen.export_all_figures(repo_root: pathlib.Path | None = None) list[pathlib.Path]¶
Build all 8 exact symbolic models and export calibrated
.euclid-graphicSVGs.
- class geometor.petersen.ConcordanceEntry¶
Single cross-repository concordance entry linking Petersen to the GEOMETOR canon.
- id: str¶
- unit: str¶
- petersen_locus: str¶
- problems: tuple[str, ...]¶
- title: str¶
- summary: str¶
- constructor: str | None¶
- cross_refs: tuple[dict[str, str], ...]¶
- class geometor.petersen.PetersenApparatus¶
Loaded scholarly apparatus and concordance tables for Methods and Theories.
- sources_manifest: dict[str, Any]¶
- entries: tuple[ConcordanceEntry, ...]¶
- persons: dict[str, dict[str, Any]]¶
- citations: dict[str, dict[str, Any]]¶
- glossary: dict[str, dict[str, Any]]¶
- property concordance: tuple[ConcordanceEntry, ...]¶
Alias returning all
ConcordanceEntryrecords.
- by_unit(unit_slug: str) list[ConcordanceEntry]¶
Return concordance entries belonging to
unit_slug.
- geometor.petersen.apparatus_slug(key: str) str¶
Convert an apparatus key (e.g.
'euclid:elements') to a safe RST anchor slug.
- geometor.petersen.load_apparatus(repo_root: pathlib.Path | None = None) PetersenApparatus¶
Load and validate all JSON apparatus files from
resources/methods_and_theories/.
- geometor.petersen.ALL_CONSTRUCTIONS: dict[str, collections.abc.Callable[..., tuple[geometor.model.Model, dict[str, Any]]]]¶
- geometor.petersen.apollonius_two_loci(model: geometor.model.Model | None = None, A: tuple[Any, Any] | sympy.geometry.Point2D = (0, 0), B: tuple[Any, Any] | sympy.geometry.Point2D = (15, 0), ratio: tuple[int | sympy.Expr, int | sympy.Expr] = (2, 1), altitude: int | sympy.Expr = 8) tuple[geometor.model.Model, dict[str, Any]]¶
Find points
PwithPA : PB = m : nat given distancehfrom lineAB.Combines Petersen’s Locus f (the Circle of Apollonius on harmonic diameter
CC1whereCA:CB = C1A:C1B = m:nand(A, B; C, C1) = -1, pp. 11–12) with Locus b (parallel line at distancehfromAB, p. 8) under the Method of Two Loci (p. 5).Default
A=(0,0), B=(15,0), m:n=2:1, h=8yields internal/external harmonic pointsC=(10,0), C1=(30,0), Apollonius circle centered atM=(20,0)of radius10, and exact integer intersectionsP1=(14,8)andP2=(26,8).
- geometor.petersen.discussion_mean_proportional(model: geometor.model.Model | None = None, hypotenuse: int | sympy.Expr = 10, altitude: int | sympy.Expr = 4) tuple[geometor.model.Model, dict[str, Any]]¶
Construct right triangles on hypotenuse
BC = awith given altitudeh_a(Loci e & b).Illustrates Petersen’s canonical 4-part anatomy of a problem of construction (Analysis, Mode of Proceeding, Proof, Discussion, pp. 4–5) via Problem 42 (p. 15): Divide a given segment BC into two parts BD, DC having a given segment h as mean proportional. Intersecting the Thales circle on diameter
BC(Locus e,90°) with the parallel line at distanceh(Locus b) yields:2 solutions
A1, A2when0 < h < a/2(defaulta=10, h=4 -> A1=(2,4), A2=(8,4)),1 tangent solution when
h = a/2, and0 real solutions when
h > a/2.
- geometor.petersen.equal_chords_line_locus(model: geometor.model.Model | None = None, O: tuple[Any, Any] | sympy.geometry.Point2D = (0, 0), outer_radius: int | sympy.Expr = 17, chord_length: int | sympy.Expr = 16, P: tuple[Any, Any] | sympy.geometry.Point2D = (25, 0)) tuple[geometor.model.Model, dict[str, Any]]¶
Through external point
Pdraw lines intercepting a chord of lengthLin circle(O, R).Following Petersen’s Loci of Lines (Locus l, p. 40 & Problem 220, p. 42), all straight lines cutting chords of length
Lfrom circle(O, R)lie at fixed distance \(r = \sqrt{R^2 - (L/2)^2}\) fromOand therefore envelop the concentric circle(O, r). Drawing tangents fromPto(O, r)(Problem 16 / Euclid III.17) solves the problem immediately.Default triple-Pythagorean parameters
R=17, L=16, P=(25,0)give concentric envelope radiusr=15(8^2 + 15^2 = 17^2), exact integer contact pointsT1=(9,12)andT2=(9,-12)(15^2 + 20^2 = 25^2), and exact rational chord endpoints on(O, 17).
- geometor.petersen.equilateral_on_three_parallels(model: geometor.model.Model | None = None, y1: int | sympy.Expr = 0, y2: int | sympy.Expr = 1, y3: int | sympy.Expr = 3, x0: int | sympy.Expr = 0) tuple[geometor.model.Model, dict[str, Any]]¶
Place an equilateral triangle
PQRwith vertices on three parallel linesL1, L2, L3.Following Petersen’s Theory of Revolution (Ch. III, § 1–4 & Problem 349, pp. 65–67), choose
PonL1as the pivot point with angle of revolutionv = 60°and ratio of revolutionf = 1. RevolvingL2by+60°aroundPvia two EuclideanI.1equilateral subconstructions produces the rotated lineL2', whose intersection withL3determinesR; revolving back (I.1onPR) yieldsQonL2in \(\mathbb{Q}(\sqrt{3})\).
- geometor.petersen.hero_reflection_shortest_path(model: geometor.model.Model | None = None, A: tuple[Any, Any] | sympy.geometry.Point2D = (2, 6), B: tuple[Any, Any] | sympy.geometry.Point2D = (14, 10), axis_pts: tuple[tuple[Any, Any], tuple[Any, Any]] = ((0, 0), (16, 0))) tuple[geometor.model.Model, dict[str, Any]]¶
Find
Xon a given line soAXandBXmake equal angles with the line (Prob. 338).Following Petersen’s Revolution Around an Axis (p. 60–61, Problem 338), revolving
Aacross the mirror axis intoA1straightens the reflected path into the single segmentA1 X B. With defaultA=(2,6), B=(14,10)and axisy=0,A1=(2,-6),X=(13/2, 0), andQ(A1, B) = 12^2 + 16^2 = 400 = 20^2!
- geometor.petersen.inscribe_square_by_homothety(model: geometor.model.Model | None = None, A: tuple[Any, Any] | sympy.geometry.Point2D = (0, 0), B: tuple[Any, Any] | sympy.geometry.Point2D = (14, 0), C: tuple[Any, Any] | sympy.geometry.Point2D = (5, 12)) tuple[geometor.model.Model, dict[str, Any]]¶
Inscribe a square
DEFGresting on baseABofABCvia homothety fromA.Following Petersen’s Method of Similitude (Case b, p. 28–29, Problem 155), relaxing the condition that the upper-right vertex lie on
BCmakes all candidate squares resting onABwith upper-left vertex onAChomothetic from centre of similitudeA. Constructing the prototype squareD0 E0 F0 Cof side equal to altitudeh_cand intersecting rayA F0withBCyieldsFdirectly.Default
(15, 13, 14)Heronian triangleA=(0,0), B=(14,0), C=(5,12)yields exact rational inscribed square side84/13with verticesD=(35/13, 0), E=(119/13, 0), F=(119/13, 84/13), G=(35/13, 84/13).
- geometor.petersen.tangent_circle_by_inversion(model: geometor.model.Model | None = None, O: tuple[Any, Any] | sympy.geometry.Point2D = (0, 0), M1: tuple[Any, Any] | sympy.geometry.Point2D = (-12, 0), M2: tuple[Any, Any] | sympy.geometry.Point2D = (0, -9), M3: tuple[Any, Any] | sympy.geometry.Point2D = (12, 9), inversion_radius: int | sympy.Expr = 12) tuple[geometor.model.Model, dict[str, Any]]¶
Construct a circle touching three circles
K1, K2, K3concurrent atOvia inversion.Following Petersen’s Inverse Figures (pp. 33–36, Problem 199):
Invert
K1, K2, K3(all passing throughO) in circleOmega(O, R0). Because each circle passes through the centre of inversionO, their inverse curves are three straight linesL1, L2, L3forming triangleV1 V2 V3.Construct the incircle
omega'ofV1 V2 V3(Euclid IV.4) touchingL1, L2, L3atT1', T2', T3'.Invert
T1', T2', T3'back acrossOmegato obtain the three points of contactT1, T2, T3and circumscribe the tangent circleomega(centerJ).
With default integer lattice parameters
O=(0,0), M1=(-12,0), M2=(0,-9), M3=(12,9), R0=12(radii12, 9, 15),L1, L2, L3form an(18, 24, 30)right triangle with incenterJ'=(0,-2), inradius6, and inverted tangent circleomegacentered atJ=(0,9)of exact integer radius27!
- geometor.petersen.trapezoid_from_four_sides(model: geometor.model.Model | None = None, a: int | sympy.Expr = 19, b: int | sympy.Expr = 5, c: int | sympy.Expr = 13, d: int | sympy.Expr = 15) tuple[geometor.model.Model, dict[str, Any]]¶
Construct trapezoid
ABCD(AB || DC,AB=a, CD=b, BC=c, DA=d) via translation.Following Petersen’s Parallel Translation (Ch. II.A, Problem 259, p. 49), translating non-parallel leg
BCparallel to baseCDsoB -> EandC -> Dgathers the four dispersed lengths into the constructible triangleAEDwith known sidesAE = a - b,AD = d, andED = c.With default Heronian lengths
(a=19, b=5, c=13, d=15), auxiliary triangleAEDhas sides(14, 15, 13)and every vertex lies on the exact integer lattice:A=(0,0), E=(14,0), B=(19,0), D=(9,12), C=(14,12).
- geometor.petersen.export_euclid_svg¶
- geometor.petersen.export_svg(model: geometor.model.Model, output_path: str | pathlib.Path, *, graphic_id: str = 'petersen-fig', title: str = 'Petersen Constructive Geometry Figure', width: int = 680, height: int = 440, margin: float = 40.0, bbox: tuple[float, float, float, float] | None = None, focus_points: collections.abc.Sequence[sympy.geometry.Point2D] | None = None, include_guides: bool = False, show_labels: bool = True, hide_aux_labels: bool = True, label_overrides: dict[str, tuple[str, str]] | None = None) pathlib.Path¶
Write a
.euclid-graphicSVG rendering ofmodeltooutput_path.
- geometor.petersen.render_euclid_svg¶
- geometor.petersen.render_svg_string(model: geometor.model.Model, *, graphic_id: str = 'petersen-fig', title: str = 'Petersen Constructive Geometry Figure', width: int = 680, height: int = 440, margin: float = 40.0, bbox: tuple[float, float, float, float] | None = None, focus_points: collections.abc.Sequence[sympy.geometry.Point2D] | None = None, include_guides: bool = False, show_labels: bool = True, hide_aux_labels: bool = True, label_overrides: dict[str, tuple[str, str]] | None = None) str¶
Render
modelas a theme-adaptive.euclid-graphicSVG string.