Modules¶
geometor.pappus¶
Pappus of Alexandria’s Synagoge (Mathematical Collection) and symbolic projective geometry.
Unifies two complementary layers in a single package:
Exact Classical & Projective Constructions (
geometor.pappus.synagoge_demos,geometor.pappus.constructions,geometor.pappus.pascal,geometor.pappus.projective): SymPy andgeometor.modelconstructions spanning Book III’s three classical means in one semicircle, Book IV’s Area Theorem and infinite Arbelos tangent circle chain (\(y_n = n d_n\)), Book V’s hexagonal honeycomb isoperimetry, Book VII’s Hexagon Theorem (Synagoge VII.138 & 139), Steiner’s six-line configuration \((S_+, S_-)\), and Blaise Pascal’s 60-line Hexagrammum Mysticum (1640).Multi-Track *Synagoge* Book Codex Infrastructure (
geometor.pappus.sphinx_ext): Sphinx companion-track registration (-en,-el,-summary,-notes) and offline cross-codex intersphinx wiring forphoton_platform.publish.
Submodules¶
Attributes¶
Classes¶
Structured output from |
|
Structured output from |
|
Structured output from |
|
Canonical exact coordinate preset for projective explorations. |
|
Complete projective catalog of the 60-line Hexagrammum Mysticum configuration. |
|
Structured output from |
|
Exact coordinate preset for Pascal Hexagrammum Mysticum constructions. |
|
Structured output from |
|
Represents three ordered collinear points dividing a segment in the Golden Ratio $phi$. |
|
Represents four ordered collinear points forming a harmonic range $(P_1, P_3; P_2, P_4) = -1$. |
|
Exact symbolic result for Pappus's Ancient Proposition on the Arbelos (Synagoge IV.14–18). |
|
Exact symbolic record for the $n$-th tangent circle in Pappus's Arbelos chain. |
|
Exact symbolic result for Book V's Honeycomb Isoperimetry & Book VIII's 7-Hexagon Cluster. |
|
Exact symbolic result for Pappus's Area Theorem (Synagoge Book IV, Prop. 1). |
|
Exact symbolic result for Pappus's semicircle construction of the three means. |
Functions¶
|
Construct the fourth harmonic conjugate $D$ of $C$ with respect to $(A, B)$ by straightedge alone. |
|
Construct the complete $S_3$ six-permutation Pappus–Steiner configuration. |
|
Construct Pappus's Hexagon Theorem for a single permutation $sigma in S_3$. |
|
Look up a named exact coordinate preset from |
|
Return |
|
Prove Pappus's Hexagon Theorem universally over a symbolic function field. |
|
Normalize a 6-vertex permutation up to dihedral rotation and reversal ($D_6$). |
|
Construct Blaise Pascal's Hexagrammum Mysticum for six points on a conic. |
|
Construct the 6-hexagon \(S_3\) bi-triangle Pascal family and its two Steiner points. |
|
Enumerate and verify the complete 60-line Hexagrammum Mysticum web in $mathbb{P}^2$. |
|
Look up a named Pascal preset in |
|
Prove Pascal's Hexagrammum Mysticum universally over $mathbb{Z}[t_0, t_1, t_2, t_3, t_4, t_5]$. |
|
Return the six cross-ratio values generated by permuting four collinear points. |
|
Return True iff all given points lie on a single conic (smooth or degenerate line-pair). |
|
Compute an exact point on $(x - x_0)^2 + (y - y_0)^2 = R^2$ via rational stereographic slope $t$. |
|
Compute Michel Chasles's projective cross-ratio $(P_1, P_2; P_3, P_4)_{mathcal{C}}$ on a conic. |
|
Construct the exact quadratic conic polynomial $C(x, y)$ through five points. |
|
Compute the exact projective cross-ratio $(A, B; C, D)$ of four collinear points. |
|
Attach |
|
Compute the exact intersection of two lines via Cramer's rule. |
|
Scan all lines in a |
|
Scan lines in a |
|
Compute the exact algebraic fourth harmonic point $D$ such that $(A, B; C, D) = -1$. |
|
Determine whether $(A, B; C, D) = -1$ in exact symbolic arithmetic. |
|
Compute the exact rational-trigonometric spread $s(ell_1, ell_2) = sin^2theta$. |
|
Project a point from a perspective center onto a target line. |
|
Compute the exact rational-trigonometric quadrance $Q(P_1, P_2)$. |
|
Write an interactive SVG rendering of |
|
Render a |
|
Generate publication-grade interactive .euclid-graphic SVGs for the Synagoge Codex. |
|
Construct an exact |
|
Construct Pappus's Arbelos tangent circle chain (Synagoge IV.14–18, Hultsch I, pp. 208–227). |
|
Construct Pappus's Area Theorem (Synagoge Book IV, Prop. 1, Hultsch I, pp. 176–179). |
|
Construct Pappus's semicircle diagram exhibiting the three classical means (Synagoge III.5–16). |
|
Return twice the signed Euclidean area $det(p_2 - p_1, p_3 - p_1)$ of $triangle p_1 p_2 p_3$. |
|
Prove Pappus's Arbelos Theorem symbolically over $mathbb{Q}(r_1, r_2, n)$. |
|
Verify Pappus's Book V Honeycomb Isoperimetry & Regular Planar Tiling Theorem. |
|
Verify Pappus's Area Theorem universally over $mathbb{Q}(x_A, y_A, x_B, y_B, x_C, y_C, u_x, u_y, v_x, v_y)$. |
Package Contents¶
- geometor.pappus.PERMUTATIONS_S3: tuple[Perm3, ...]¶
- geometor.pappus.PRESETS: dict[str, PresetConfig]¶
- geometor.pappus.TYPE_NAMES: tuple[str, str, str] = ('square', 'circle', 'diamond')¶
- class geometor.pappus.HarmonicFourthResult¶
Structured output from
construct_harmonic_fourth().- Variables:
model – Populated
Model.pt_a – First base point $A$.
pt_b – Second base point $B$.
pt_c – Interior/exterior third collinear point $C$.
pt_d – Constructed fourth harmonic conjugate $D$ satisfying $(A, B; C, D) = -1$.
apex – Complete quadrilateral apex $P$ off $[A B]$.
relay – Auxiliary point $Q$ chosen on $[P C]$.
diag_r – Opposite side intersection $R = [A Q] cap [P B]$.
diag_s – Opposite side intersection $S = [B Q] cap [P A]$.
base_line – Carrier line $[A B]$.
conjugate_line – Diagonal line $[R S]$ cutting $[A B]$ at $D$.
- model: geometor.model.Model¶
- pt_a: sympy.geometry.Point¶
- pt_b: sympy.geometry.Point¶
- pt_c: sympy.geometry.Point¶
- pt_d: sympy.geometry.Point¶
- apex: sympy.geometry.Point¶
- relay: sympy.geometry.Point¶
- diag_r: sympy.geometry.Point¶
- diag_s: sympy.geometry.Point¶
- base_line: sympy.geometry.Line¶
- conjugate_line: sympy.geometry.Line¶
- class geometor.pappus.PappusConfigurationResult¶
Structured output from
construct_pappus_configuration().- Variables:
model – Populated
Modelcontaining all 6 permutations.a_points – Tuple $(A_0, A_1, A_2)$ on carrier line $a$.
b_points – Tuple $(B_0, B_1, B_2)$ on carrier line $b$.
line_a – Carrier line $a$.
line_b – Carrier line $b$.
apex – Carrier intersection $O = a cap b$, or
Noneif parallel.cross_lines – All 9 cross-join lines
(i, j) -> [A_i B_j].meets_by_perm – Mapping
perm -> (M_01, M_12, M_20)for each $sigma in S_3$.all_meets – Mapping of clean point ID (e.g.
"M0110") to each finite cross-join meet.pappus_lines – Mapping
perm -> Linefor all 6 Pappus lines.even_pappus_lines – Tuple of the 3 even Pappus lines ($sigma in A_3$).
odd_pappus_lines – Tuple of the 3 odd Pappus lines ($sigma in S_3 setminus A_3$).
steiner_even – Even Steiner (“Star”) concurrency point \(S_+\) (ID
"S1"), if finite.steiner_odd – Odd Steiner (“Star”) concurrency point \(S_-\) (ID
"S2"), if finite.steiner_line – Steiner line \([S_+ S_-]\) joining the two star points, if both finite and distinct.
harmonic_ranges – Discovered
HarmonicRangerecords.golden_sections – Discovered
GoldenRangerecords.
- model: geometor.model.Model¶
- a_points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- b_points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- line_a: sympy.geometry.Line¶
- line_b: sympy.geometry.Line¶
- apex: sympy.geometry.Point | None¶
- cross_lines: dict[tuple[int, int], sympy.geometry.Line]¶
- meets_by_perm: dict[Perm3, tuple[sympy.geometry.Point | None, sympy.geometry.Point | None, sympy.geometry.Point | None]]¶
- all_meets: dict[str, sympy.geometry.Point]¶
- pappus_lines: dict[Perm3, sympy.geometry.Line]¶
- even_pappus_lines: tuple[sympy.geometry.Line, sympy.geometry.Line, sympy.geometry.Line]¶
- odd_pappus_lines: tuple[sympy.geometry.Line, sympy.geometry.Line, sympy.geometry.Line]¶
- steiner_even: sympy.geometry.Point | None¶
- steiner_odd: sympy.geometry.Point | None¶
- steiner_line: sympy.geometry.Line | None¶
- harmonic_ranges: list[geometor.pappus.projective.HarmonicRange]¶
- golden_sections: list[geometor.pappus.projective.GoldenRange]¶
- class geometor.pappus.PappusHexagonResult¶
Structured output from
construct_pappus_hexagon().- Variables:
model – Populated
Model.perm – Permutation $sigma = (sigma_0, sigma_1, sigma_2)$ applied to $B$.
parity –
"even"or"odd"parity ofperm.a_points – Tuple $(A_0, A_1, A_2)$ in
model.b_points – Original tuple $(B_0, B_1, B_2)$ in
model.b_permuted – Permuted tuple $(B_{sigma_0}, B_{sigma_1}, B_{sigma_2})$.
line_a – Carrier line $a = [A_0 A_2]$.
line_b – Carrier line $b = [B_0 B_2]$.
apex – Intersection $O = a cap b$, or
Noneif $a parallel b$.cross_lines – Mapping
(i, j) -> Line(A_i, B_j)for the 6 hexagon sides.meets – Mapping
"M01" | "M12" | "M20" -> Point | Nonefor the 3 opposite meets.pappus_line – Collinear Pappus line carrying the finite cross-join meets.
hexagon – Six-vertex
Polygonif constructed.type_triangles – Mapping
"square" | "circle" | "diamond" -> Polygonif constructed.is_collinear – Exact boolean verifying collinearity of the three cross-join meets.
- model: geometor.model.Model¶
- perm: Perm3¶
- parity: str¶
- a_points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- b_points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- b_permuted: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- line_a: sympy.geometry.Line¶
- line_b: sympy.geometry.Line¶
- apex: sympy.geometry.Point | None¶
- cross_lines: dict[tuple[int, int], sympy.geometry.Line]¶
- meets: dict[str, sympy.geometry.Point | None]¶
- pappus_line: sympy.geometry.Line¶
- hexagon: sympy.geometry.Polygon | None¶
- type_triangles: dict[str, sympy.geometry.Polygon]¶
- is_collinear: bool¶
- class geometor.pappus.PresetConfig¶
Canonical exact coordinate preset for projective explorations.
- Variables:
name – Identifier key in
PRESETS.title – Human-readable title of the configuration.
description – Mathematical and historical significance of the preset.
a_points – Exact coordinates of $(A_0, A_1, A_2)$ on carrier line $a$.
b_points – Exact coordinates of $(B_0, B_1, B_2)$ on carrier line $b$.
- name: str¶
- title: str¶
- description: str¶
- a_points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- b_points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- geometor.pappus.construct_harmonic_fourth(model: geometor.model.Model | None = None, pt_a: PointInput = (0, 0), pt_b: PointInput = (4, 0), pt_c: PointInput = (sp.Rational(4, 3), 0), *, apex: PointInput | None = None, relay: PointInput | None = None) HarmonicFourthResult¶
Construct the fourth harmonic conjugate $D$ of $C$ with respect to $(A, B)$ by straightedge alone.
Executes the classical complete quadrilateral construction (already implicit in Pappus’s Synagoge Book VII harmonic lemmas):
Choose an auxiliary apex $P$ not on $[A B]$ and join $[P A]$, $[P B]$, $[P C]$.
Choose an auxiliary relay point $Q$ on $[P C]$ distinct from $P$ and $C$.
Draw $[A Q]$ to meet $[P B]$ at $R$, and draw $[B Q]$ to meet $[P A]$ at $S$.
Draw the diagonal $[R S]$; its intersection $D = [R S] cap [A B]$ satisfies $(A, B; C, D) = -1$ independently of the choices of $P$ and $Q$.
- Parameters:
model – Optional existing
Model; created ifNone.pt_a – First base point $A$.
pt_b – Second base point $B$.
pt_c – Third collinear point $C$ (distinct from $A$, $B$, and the midpoint of $AB$).
apex – Optional off-line apex $P$; chosen automatically with clean exact coordinates if
None.relay – Optional point $Q$ on $[P C]$; defaults to the exact midpoint of $P$ and $C$.
- Returns:
Populated
HarmonicFourthResult.- Raises:
ValueError – If $A, B, C$ are invalid or if $C$ is the Euclidean midpoint of $AB$.
- geometor.pappus.construct_pappus_configuration(model: geometor.model.Model | None = None, a_points: Sequence[PointInput] | None = None, b_points: Sequence[PointInput] | None = None, *, preset: str = 'steiner', include_apex: bool = True, discover_all_intersections: bool = False, scan_harmonics: bool = True, enable_divine: bool = False) PappusConfigurationResult¶
Construct the complete $S_3$ six-permutation Pappus–Steiner configuration.
Generates all 9 cross-join lines $[A_i B_j]$, all 18 cross-join meets
M{i1}{j1}{i2}{j2}, all 6 Pappus lines ($3$ even in $A_3$ and $3$ odd in $S_3 setminus A_3$), and constructs the two Steiner (Star) points:\(S_+\) (ID
"S1"): common concurrency point of the 3 even Pappus lines.\(S_-\) (ID
"S2"): common concurrency point of the 3 odd Pappus lines.
Also constructs the Steiner line \([S_+ S_-]\) when both star points are finite and distinct, and scans the resulting configuration for collinear harmonic ranges and golden sections.
- Parameters:
model – Optional existing
Model; created ifNone.a_points – Optional sequence of 3 points on line $a$; defaults to
preset.b_points – Optional sequence of 3 points on line $b$; defaults to
preset.preset – Preset key used when
a_pointsorb_pointsisNone.include_apex – If True and $a nparallel b$, add $O = a cap b$ to
model.discover_all_intersections – If True, register all pairwise intersections of carrier lines, cross-lines, and Pappus lines in
model.scan_harmonics – If True, populate
harmonic_rangesviafind_harmonic_ranges().enable_divine – If True, attach
geometor.divinehook and scan golden sections.
- Returns:
Populated
PappusConfigurationResult.
- geometor.pappus.construct_pappus_hexagon(model: geometor.model.Model | None = None, a_points: Sequence[PointInput] | None = None, b_points: Sequence[PointInput] | None = None, perm: Sequence[int] = (0, 1, 2), *, preset: str = 'hexagon', include_apex: bool = True, include_hexagon: bool = True, include_type_triangles: bool = False, discover_all_intersections: bool = False) PappusHexagonResult¶
Construct Pappus’s Hexagon Theorem for a single permutation $sigma in S_3$.
Given collinear triples $(A_0, A_1, A_2)$ on line $a$ and $(B_0, B_1, B_2)$ on line $b$, pairs vertices according to $sigma = (sigma_0, sigma_1, sigma_2)$ to form the hexagon $(A_0, B_{sigma_1}, A_2, B_{sigma_0}, A_1, B_{sigma_2})$ and constructs the three opposite-side cross-join meets:
$M_{01} = [A_0 B_{sigma_1}] cap [A_1 B_{sigma_0}]$
$M_{12} = [A_1 B_{sigma_2}] cap [A_2 B_{sigma_1}]$
$M_{20} = [A_2 B_{sigma_0}] cap [A_0 B_{sigma_2}]$
Handles both intersecting carrier lines (Synagoge VII.139) and parallel carrier lines (Synagoge VII.138), as well as configurations where one pair of opposite cross-joins is parallel (meeting on the projective line at infinity).
- Parameters:
model – Optional existing
Model; created ifNone.a_points – Optional sequence of 3 points on line $a$; defaults to
preset.b_points – Optional sequence of 3 points on line $b$; defaults to
preset.perm – Permutation of
(0, 1, 2)ordering the $B$-points.preset – Preset key used when
a_pointsorb_pointsisNone.include_apex – If True and $a nparallel b$, add $O = a cap b$ to
model.include_hexagon – If True, register the 6-cycle hexagon polygon in
model.include_type_triangles – If True, construct the
square,circle, anddiamondtriangles reviving GEOMETOR’spappus-3.pyexploration.discover_all_intersections – If True, add all remaining line-line intersections.
- Returns:
Populated
PappusHexagonResult.
- geometor.pappus.get_preset(name: str = 'hexagon') PresetConfig¶
Look up a named exact coordinate preset from
PRESETS.- Parameters:
name – Preset key (
"hexagon","parallel","steiner","harmonic","golden").- Returns:
Corresponding
PresetConfig.- Raises:
KeyError – If
nameis not a known preset.
- geometor.pappus.permutation_parity(perm: Sequence[int]) str¶
Return
"even"or"odd"for a permutation of(0, 1, 2).- Parameters:
perm – Three-element sequence permuting
(0, 1, 2).- Returns:
"even"if the inversion count is even ($sigma in A_3$), else"odd".- Raises:
ValueError – If
permis not a permutation of(0, 1, 2).
- geometor.pappus.verify_pappus_symbolic() sympy.Expr¶
Prove Pappus’s Hexagon Theorem universally over a symbolic function field.
Parameterizes carrier line $a$ as $y = 0$ with $A_i = (a_i, 0)$ and carrier line $b$ as $y = m x + c$ with $B_j = (b_j, m b_j + c)$ over eight independent symbolic indeterminates $(a_0, a_1, a_2, b_0, b_1, b_2, m, c)$ (covering both intersecting lines $m ne 0$ and parallel lines $m = 0, c ne 0$). Computes the homogeneous coordinates of $M_{01}, M_{12}, M_{20}$ and simplifies their $3 times 3$ collinearity determinant, confirming it vanishes identically ($0$).
- Returns:
Simplified determinant expression (identically
sp.Integer(0)).
- geometor.pappus.PASCAL_PRESETS: dict[str, PascalPresetConfig]¶
- geometor.pappus.Cycle6¶
- class geometor.pappus.HexagrammumMysticumCatalog¶
Complete projective catalog of the 60-line Hexagrammum Mysticum configuration.
- Variables:
points – Six exact conic vertices $(P_0, dots, P_5)$.
chords – Mapping
(i, j) -> (a, b, c)homogeneous line coordinates for all 15 chords.diagonal_points – Mapping
((i, j), (k, l)) -> (X, Y, Z)for all 45 Pascal diagonal points.pascal_lines – Mapping
canonical_cycle -> (a, b, c)for all 60 Pascal lines.steiner_points – Mapping
(triangle_a, parity) -> (X, Y, Z)for all 20 Steiner points.kirkman_points – Mapping
(cyc_1, cyc_2, cyc_3) -> (X, Y, Z)for all 60 Kirkman points.plucker_lines – Tuple of 15 homogeneous line triples each incident with 4 Steiner points.
- points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- chords: dict[tuple[int, int], HomVec3]¶
- diagonal_points: dict[tuple[tuple[int, int], tuple[int, int]], HomVec3]¶
- steiner_points: dict[tuple[tuple[int, int, int], str], HomVec3]¶
- plucker_lines: tuple[HomVec3, ...]¶
- class geometor.pappus.PascalHexagonResult¶
Structured output from
construct_pascal_hexagon().- Variables:
model – Populated
Model.points – Six conic vertices $(P_0, P_1, P_2, P_3, P_4, P_5)$.
cycle – Active 6-cycle $(c_0, c_1, c_2, c_3, c_4, c_5)$.
conic – Constructed
CircleorEllipse, if registered.side_lines – Six side lines in cyclic order.
meets – Opposite-side meets
{"M03": ..., "M14": ..., "M25": ...}.finite_meets – List of finite opposite-side meets.
pascal_line – Exact Pascal line joining the opposite-side meets.
hexagon – Optional inscribed 6-gon
Polygon.is_collinear – Exact algebraic check that all three opposite-side meets are collinear.
is_coconic – Exact Veronese determinant check that all six vertices lie on a conic.
- model: geometor.model.Model¶
- points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- conic: sympy.geometry.Ellipse | None¶
- side_lines: tuple[sympy.geometry.Line, sympy.geometry.Line, sympy.geometry.Line, sympy.geometry.Line, sympy.geometry.Line, sympy.geometry.Line]¶
- meets: dict[str, sympy.geometry.Point | None]¶
- finite_meets: list[sympy.geometry.Point]¶
- pascal_line: sympy.geometry.Line¶
- hexagon: sympy.geometry.Polygon | None¶
- is_collinear: bool¶
- is_coconic: bool¶
- class geometor.pappus.PascalPresetConfig¶
Exact coordinate preset for Pascal Hexagrammum Mysticum constructions.
- Variables:
name – Identifier key in
PASCAL_PRESETS.title – Human-readable preset title.
description – Mathematical and historical significance of the preset.
points – Six exact points $(P_0, P_1, P_2, P_3, P_4, P_5)$ on the conic.
default_cycle – Default cyclic ordering of vertex indices
0..5.center – Conic center $(x_0, y_0)$ for circle/ellipse rendering.
rx – Horizontal semi-axis $a$ of the carrier circle/ellipse.
ry – Vertical semi-axis $b$ of the carrier circle/ellipse.
- name: str¶
- title: str¶
- description: str¶
- points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- center: sympy.geometry.Point¶
- rx: sympy.Expr¶
- ry: sympy.Expr¶
- class geometor.pappus.PascalSteinerFamilyResult¶
Structured output from
construct_pascal_steiner_family().- Variables:
model – Populated
Model.points – Six conic vertices $(P_0, dots, P_5)$.
triangle_a – Vertex indices $(a_0, a_1, a_2)$ of the first inscribed triangle.
triangle_b – Vertex indices $(b_0, b_1, b_2)$ of the complementary inscribed triangle.
conic – Constructed circle or ellipse carrier curve.
chords – Mapping
(a_i, b_j) -> Linefor the 9 cross-chords.pascal_lines – Mapping
perm -> Linefor all 6 \(S_3\) alternating hexagons.even_pascal_lines – Tuple of the 3 even (\(A_3\)) Pascal lines.
odd_pascal_lines – Tuple of the 3 odd (\(S_3 \setminus A_3\)) Pascal lines.
steiner_even – Even Steiner concurrency point \(G_+\) (ID
"S1"), if finite.steiner_odd – Odd Steiner concurrency point \(G_-\) (ID
"S2"), if finite.steiner_line – Line \([G_+ G_-]\) joining the two Steiner points, if finite.
harmonic_ranges – Discovered collinear harmonic tetrads.
golden_sections – Discovered golden sections.
- model: geometor.model.Model¶
- points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- triangle_a: tuple[int, int, int]¶
- triangle_b: tuple[int, int, int]¶
- conic: sympy.geometry.Ellipse | None¶
- chords: dict[tuple[int, int], sympy.geometry.Line]¶
- pascal_lines: dict[geometor.pappus.constructions.Perm3, sympy.geometry.Line]¶
- even_pascal_lines: tuple[sympy.geometry.Line, sympy.geometry.Line, sympy.geometry.Line]¶
- odd_pascal_lines: tuple[sympy.geometry.Line, sympy.geometry.Line, sympy.geometry.Line]¶
- steiner_even: sympy.geometry.Point | None¶
- steiner_odd: sympy.geometry.Point | None¶
- steiner_line: sympy.geometry.Line | None¶
- harmonic_ranges: list[geometor.pappus.projective.HarmonicRange]¶
- golden_sections: list[geometor.pappus.projective.GoldenRange]¶
- geometor.pappus.canonical_hexagon_cycle(cycle: Sequence[int]) Cycle6¶
Normalize a 6-vertex permutation up to dihedral rotation and reversal ($D_6$).
Rotates
cycleso0appears first and picks the lexicographically smaller orientation between(0, c1, c2, c3, c4, c5)and(0, c5, c4, c3, c2, c1).- Parameters:
cycle – Permutation of
(0, 1, 2, 3, 4, 5).- Returns:
Canonical 6-tuple representative among the $6! / 12 = 60$ distinct hexagons.
- Raises:
ValueError – If
cycleis not a permutation of0..5.
- geometor.pappus.construct_pascal_hexagon(model: geometor.model.Model | None = None, points: Sequence[PointInput] | None = None, cycle: Sequence[int] | None = None, *, preset: str = 'hexagrammum', include_conic: bool = True, include_hexagon: bool = True, enable_divine: bool = False) PascalHexagonResult¶
Construct Blaise Pascal’s Hexagrammum Mysticum for six points on a conic.
- Parameters:
model – Optional existing
Model; created ifNone.points – Optional sequence of 6 coconic points; defaults to
preset.cycle – Optional cyclic ordering of
0..5; defaults to the preset’sdefault_cycle.preset – Key in
PASCAL_PRESETSused whenpointsisNone.include_conic – If True and carrier circle/ellipse parameters are known, register the conic.
include_hexagon – If True, register the 6-gon polygon
< P_c0 ... P_c5 >.enable_divine – If True, attach
geometor.divinegolden section hook.
- Returns:
Populated
PascalHexagonResult.- Raises:
ValueError – If fewer/more than 6 distinct coconic points are provided or if two or more opposite-side pairs are parallel.
- geometor.pappus.construct_pascal_steiner_family(model: geometor.model.Model | None = None, points: Sequence[PointInput] | None = None, *, preset: str = 'hexagrammum', triangle_a: tuple[int, int, int] = (0, 2, 4), triangle_b: tuple[int, int, int] = (1, 3, 5), include_conic: bool = True, scan_harmonics: bool = True, enable_divine: bool = False) PascalSteinerFamilyResult¶
Construct the 6-hexagon \(S_3\) bi-triangle Pascal family and its two Steiner points.
Partitions the 6 conic vertices into $triangle_A = (P_{a_0}, P_{a_1}, P_{a_2})$ and $triangle_B = (P_{b_0}, P_{b_1}, P_{b_2})$. Permuting $triangle_B$ by $sigma in S_3$ forms 6 alternating hexagons $langle A_0, B_{sigma_0}, A_1, B_{sigma_1}, A_2, B_{sigma_2} rangle$ whose 3 even (\(A_3\)) Pascal lines concur at \(G_+\) (ID
"S1") and whose 3 odd (\(S_3 \setminus A_3\)) Pascal lines concur at \(G_-\) (ID"S2").- Parameters:
model – Optional existing
Model.points – Optional sequence of 6 coconic points; defaults to
preset.preset – Key in
PASCAL_PRESETSused whenpointsisNone.triangle_a – Indices $(a_0, a_1, a_2)$ of the first inscribed triangle.
triangle_b – Complementary indices $(b_0, b_1, b_2)$ of the second triangle.
include_conic – If True, register the carrier circle or ellipse.
scan_harmonics – If True, scan the configuration for collinear harmonic tetrads.
enable_divine – If True, attach
geometor.divineand scan golden sections.
- Returns:
Populated
PascalSteinerFamilyResult.- Raises:
ValueError – If
triangle_aandtriangle_bdo not partition0..5or points are not coconic.
- geometor.pappus.enumerate_hexagrammum_mysticum(points: Sequence[PointInput] | None = None, *, preset: str = 'hexagrammum') HexagrammumMysticumCatalog¶
Enumerate and verify the complete 60-line Hexagrammum Mysticum web in $mathbb{P}^2$.
Computes in exact homogeneous coordinates:
15 Chords $[P_i P_j]$ ($0 le i < j le 5$).
45 Diagonal Pascal Points $[P_i P_j] cap [P_k P_l]$ on disjoint vertex pairs.
60 Pascal Lines across all $6! / 12 = 60$ cyclic hexagons, verifying 3-point collinearity.
20 Jakob Steiner Points ($10$ triangle partitions $times 2$ \(S_3\) parities), verifying 3-line concurrency at each point.
60 Thomas Kirkman Points, verifying 3-line concurrency on each syntheme Kirkman triple.
15 Julius Plücker Lines, each carrying 4 of the 20 Steiner points.
- Parameters:
points – Optional sequence of 6 coconic points; defaults to
preset.preset – Key in
PASCAL_PRESETSused whenpointsisNone.
- Returns:
Populated
HexagrammumMysticumCatalog.- Raises:
ValueError – If fewer/more than 6 distinct coconic points are given.
- geometor.pappus.get_pascal_preset(name: str) PascalPresetConfig¶
Look up a named Pascal preset in
PASCAL_PRESETS.- Parameters:
name – Preset key (
"hexagrammum","convex","ellipse", or"golden_conic").- Returns:
Matching
PascalPresetConfig.- Raises:
KeyError – If
nameis unknown.
- geometor.pappus.verify_pascal_symbolic() sympy.Expr¶
Prove Pascal’s Hexagrammum Mysticum universally over $mathbb{Z}[t_0, t_1, t_2, t_3, t_4, t_5]$.
Parameterizes six generic points on the projective conic $X^2 + Y^2 = Z^2$ via $P_k = [1 - t_k^2 : 2 t_k : 1 + t_k^2]$, computes the three opposite-side meets $M_{03}, M_{14}, M_{25}$ via 3D vector cross products, and expands the $3 times 3$ collinearity determinant $det[M_{03}, M_{14}, M_{25}]$, returning
0identically.- Returns:
Simplified SymPy polynomial expression (identically
sp.Integer(0)).
- geometor.pappus.PHI: sympy.Expr¶
- class geometor.pappus.GoldenRange¶
Represents three ordered collinear points dividing a segment in the Golden Ratio $phi$.
- Variables:
section – Underlying
Sectionobject.point_ids – Ordered model IDs $(P_1, P_2, P_3)$ of the three points.
line – Carrier line in the model, if associated with one.
line_id – Model ID of the carrier line.
ratio – Exact symbolic ratio of longer to shorter segment ($phi$).
- section: geometor.model.sections.Section¶
- point_ids: tuple[str, str, str]¶
- line: sympy.geometry.Line | None¶
- line_id: str¶
- ratio: sympy.Expr¶
- class geometor.pappus.HarmonicRange¶
Represents four ordered collinear points forming a harmonic range $(P_1, P_3; P_2, P_4) = -1$.
- Variables:
points – Ordered tuple $(P_1, P_2, P_3, P_4)$ along the carrier line such that $(P_1, P_3)$ and $(P_2, P_4)$ harmonically separate each other.
point_ids – Corresponding model IDs of the four points.
line – Carrier line in the model, if associated with one.
line_id – Model ID of the carrier line.
value – Exact symbolic cross-ratio $(P_1, P_3; P_2, P_4) = -1$.
- points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- point_ids: tuple[str, str, str, str]¶
- line: sympy.geometry.Line | None¶
- line_id: str¶
- value: sympy.Expr¶
- geometor.pappus.anharmonic_orbit(lam: sympy.Expr) list[sympy.Expr]¶
Return the six cross-ratio values generated by permuting four collinear points.
- Parameters:
lam – Fundamental cross-ratio $lambda = (A, B; C, D) notin {0, 1}$.
- Returns:
List of the 6 simplified expressions $[lambda, 1/lambda, 1 - lambda, 1/(1 - lambda), (lambda - 1)/lambda, lambda/(lambda - 1)]$.
- geometor.pappus.are_coconic(points: Sequence[sympy.geometry.Point | tuple[sympy.Expr | int, sympy.Expr | int]]) bool¶
Return True iff all given points lie on a single conic (smooth or degenerate line-pair).
Unifies Pappus’s degenerate two-line configuration ($L_a cdot L_b = 0$) and Pascal’s smooth conic configuration ($A x^2 + B x y + C y^2 + D x + E y + F = 0$) via the rank of the $N times 6$ Veronese matrix $[x_k^2, x_k y_k, y_k^2, x_k, y_k, 1]$.
- Parameters:
points – Sequence of planar points (any $le 5$ points trivially lie on at least one conic).
- Returns:
Trueif the Veronese matrix has rank $le 5$, elseFalse.
- geometor.pappus.circle_stereographic_point(t: sympy.Expr | int, *, center: sympy.geometry.Point | tuple[sympy.Expr | int, sympy.Expr | int] = (0, 0), radius: sympy.Expr | int = 1) sympy.geometry.Point¶
Compute an exact point on $(x - x_0)^2 + (y - y_0)^2 = R^2$ via rational stereographic slope $t$.
Uses the classical Weierstrass / stereographic parameterization from $(-R + x_0, y_0)$:
\[P(t) = \left(x_0 + R \frac{1 - t^2}{1 + t^2},\; y_0 + R \frac{2 t}{1 + t^2}\right).\]Every $t in mathbb{Q}$ yields an exact rational point in $mathbb{Q}^2$, and every $t in mathbb{Q}(phi)$ yields an exact point in $mathbb{Q}(sqrt{5})^2$.
- Parameters:
t – Exact symbolic or integer stereographic parameter.
center – Circle center $(x_0, y_0)$.
radius – Exact positive circle radius $R$.
- Returns:
Exact
Pointon the circle.
- geometor.pappus.conic_cross_ratio(p1: sympy.geometry.Point, p2: sympy.geometry.Point, p3: sympy.geometry.Point, p4: sympy.geometry.Point, observer: sympy.geometry.Point) sympy.Expr¶
Compute Michel Chasles’s projective cross-ratio $(P_1, P_2; P_3, P_4)_{mathcal{C}}$ on a conic.
By Chasles’s Theorem, for four distinct points $P_1, P_2, P_3, P_4$ on an irreducible conic $mathcal{C}$, the cross-ratio of the pencil of four rays $[V P_1], [V P_2], [V P_3], [V P_4]$ cut by any transversal line is independent of the fifth point $V = text{observer} in mathcal{C}$.
- Parameters:
p1 – First conic point.
p2 – Second conic point.
p3 – Third conic point.
p4 – Fourth conic point.
observer – Distinct fifth point $V$ on the same conic.
- Returns:
Exact simplified SymPy cross-ratio expression (or
sp.oo).- Raises:
ValueError – If the 5 points are not distinct or not coconic.
- geometor.pappus.conic_equation_through_points(points: Sequence[sympy.geometry.Point | tuple[sympy.Expr | int, sympy.Expr | int]]) sympy.Expr¶
Construct the exact quadratic conic polynomial $C(x, y)$ through five points.
Evaluates the $6 times 6$ Veronese determinant
\[\begin{split}\det \begin{bmatrix} x^2 & x y & y^2 & x & y & 1 \\ x_0^2 & x_0 y_0 & y_0^2 & x_0 & y_0 & 1 \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ x_4^2 & x_4 y_4 & y_4^2 & x_4 & y_4 & 1 \end{bmatrix}\end{split}\]in the symbols
x, y.- Parameters:
points – Sequence of 5 points in the plane.
- Returns:
Expanded SymPy polynomial in
xandy(zero iff the 5 points are degenerate with 4+ collinear in a way that fails to determine a unique conic).- Raises:
ValueError – If
len(points) != 5.
- geometor.pappus.cross_ratio(pt_a: sympy.geometry.Point, pt_b: sympy.geometry.Point, pt_c: sympy.geometry.Point, pt_d: sympy.geometry.Point, *, check_collinear: bool = True) sympy.Expr¶
Compute the exact projective cross-ratio $(A, B; C, D)$ of four collinear points.
Uses the standard projective convention
\[(A, B; C, D) = \frac{(u_A - u_C)(u_B - u_D)}{(u_A - u_D)(u_B - u_C)},\]where $u$ is any affine coordinate along the line carrying $A, B, C, D$. Under this convention, $(A, B; C, D) = -1$ iff $(C, D)$ harmonically separates $(A, B)$, and $(0, 1; phi, phi + 1) = phi$.
- Parameters:
pt_a – First point $A$.
pt_b – Second point $B$.
pt_c – Third point $C$.
pt_d – Fourth point $D$.
check_collinear – If True, verify that $A, B, C, D$ are collinear.
- Returns:
Exact simplified SymPy expression for $(A, B; C, D)$.
- Raises:
ValueError – If the points are not collinear or if the denominator vanishes.
- geometor.pappus.enable_divine_analysis(model: geometor.model.Model) geometor.model.Model¶
Attach
geometor.divine.register_divine_hook()tomodeland return it.- Parameters:
model – Target
Modelinstance.- Returns:
The same model with real-time golden section analysis enabled.
- geometor.pappus.exact_line_meet(line_1: sympy.geometry.Line, line_2: sympy.geometry.Line) sympy.geometry.Point | None¶
Compute the exact intersection of two lines via Cramer’s rule.
Returns
Nonewhen the two lines are parallel or coincident (meeting at the projective line at infinity).- Parameters:
line_1 – First SymPy line.
line_2 – Second SymPy line.
- Returns:
Exact intersection
sympy.geometry.point.Point, orNoneif parallel.
- geometor.pappus.find_golden_sections(model: geometor.model.Model, *, register_sections: bool = False, include_guides: bool = False) list[GoldenRange]¶
Scan all lines in a
Modelfor exact Golden Ratio sections.Complements
geometor.divine.register_divine_hook()(which checks parent lines incrementally as intersection points are added) with a comprehensive post-construction scan across all points lying on each line inmodel.- Parameters:
model – Geometric model to scan.
register_sections – If True, also add each discovered golden
Sectiontomodelwithclasses=["golden"].include_guides – If True, include guide points and lines.
- Returns:
List of discovered
GoldenRangerecords.
- geometor.pappus.find_harmonic_ranges(model: geometor.model.Model, line: sympy.geometry.Line | None = None, *, include_guides: bool = False) list[HarmonicRange]¶
Scan lines in a
Modelfor exact collinear harmonic tetrads.Revives and modernizes the
analyze_harmonicsroutine from GEOMETOR’s original 2023pappus.pyexploration. For every candidate line carrying at least four points, points are sorted along the line ($P_1 < P_2 < P_3 < P_4$) so that each unordered harmonic tetrad is reported canonically once via the unique alternating separation $(P_1, P_3; P_2, P_4) = -1$.- Parameters:
model – Geometric model to scan.
line – Optional single line to inspect; if
None, scans all lines inmodel.include_guides – If True, also include points and lines marked
guide=True.
- Returns:
List of discovered
HarmonicRangerecords.
- geometor.pappus.harmonic_conjugate_point(pt_a: sympy.geometry.Point, pt_b: sympy.geometry.Point, pt_c: sympy.geometry.Point) sympy.geometry.Point¶
Compute the exact algebraic fourth harmonic point $D$ such that $(A, B; C, D) = -1$.
Solves $(A, B; C, D) = -1$ along line $[A B]$ in closed symbolic form. For the pure straightedge geometric construction via a complete quadrilateral, see
geometor.pappus.constructions.construct_harmonic_fourth().- Parameters:
pt_a – First base point $A$.
pt_b – Second base point $B$.
pt_c – Given third collinear point $C$ (not the midpoint of $A$ and $B$).
- Returns:
Exact
sympy.geometry.point.Point$D$ satisfying $(A, B; C, D) = -1$.- Raises:
ValueError – If $A, B, C$ are not distinct collinear points or $C$ is the midpoint of $AB$ (in which case $D$ lies on the line at infinity).
- geometor.pappus.is_harmonic_range(pt_a: sympy.geometry.Point, pt_b: sympy.geometry.Point, pt_c: sympy.geometry.Point, pt_d: sympy.geometry.Point) bool¶
Determine whether $(A, B; C, D) = -1$ in exact symbolic arithmetic.
- Parameters:
pt_a – First base point $A$.
pt_b – Second base point $B$.
pt_c – First conjugate point $C$.
pt_d – Second conjugate point $D$.
- Returns:
True iff $A, B, C, D$ are distinct collinear points satisfying $(A, B; C, D) = -1$.
- geometor.pappus.line_spread(line_1: sympy.geometry.Line, line_2: sympy.geometry.Line) sympy.Expr¶
Compute the exact rational-trigonometric spread $s(ell_1, ell_2) = sin^2theta$.
- Parameters:
line_1 – First line $a_1 x + b_1 y + c_1 = 0$.
line_2 – Second line $a_2 x + b_2 y + c_2 = 0$.
- Returns:
Exact symbolic spread in $[0, 1]$ (equals $0$ iff parallel, $1$ iff perpendicular).
- geometor.pappus.project_point(center: sympy.geometry.Point, target_line: sympy.geometry.Line, pt: sympy.geometry.Point) sympy.geometry.Point¶
Project a point from a perspective center onto a target line.
Implements central perspectivity as studied by Pappus in Synagoge Book VII, Proposition 129.
- Parameters:
center – Center of perspectivity $O$ not lying on
target_line.target_line – Destination line onto which
ptis projected.pt – Source point $P ne O$.
- Returns:
Exact intersection $[O P] cap text{target_line}$.
- Raises:
ValueError – If
ptcoincides withcenteror $[O P]$ is parallel totarget_line.
- geometor.pappus.quadrance(pt_1: sympy.geometry.Point, pt_2: sympy.geometry.Point) sympy.Expr¶
Compute the exact rational-trigonometric quadrance $Q(P_1, P_2)$.
- Parameters:
pt_1 – First point.
pt_2 – Second point.
- Returns:
Simplified symbolic expression $(x_2 - x_1)^2 + (y_2 - y_1)^2$.
- geometor.pappus.EMBEDDED_SVG_STYLE: str = ''¶
- geometor.pappus.export_svg(model: geometor.model.Model, output_path: str | pathlib.Path, *, graphic_id: str = 'g1', title: str = 'Pappus Projective Construction', width: int = 680, height: int = 440, margin: float = 44.0, bbox: tuple[float, float, float, float] | None = None, focus_points: Sequence[sympy.geometry.Point] | None = None, include_guides: bool = False, show_labels: bool = True, show_meet_labels: bool = True, show_aux_labels: bool = False, label_overrides: dict[str, tuple[str, str]] | None = None, highlight_point_ids: Sequence[str] | None = None) pathlib.Path¶
Write an interactive SVG rendering of
modeltooutput_path.- Parameters:
model – Populated
Model.output_path – Destination
.svgfile path (parent directories created automatically).graphic_id –
data-graphic-ididentifier forgeometor_interactive.js.title – Accessible SVG title string.
width – Pixel width of the SVG
viewBox.height – Pixel height of the SVG
viewBox.margin – Outer pixel margin around the framed point cloud.
bbox – Optional explicit math viewport
(xmin, xmax, ymin, ymax).focus_points – Optional subset of points used to compute auto-framing bounds.
include_guides – If True, also render elements marked
guide=True.show_labels – Master toggle for point text labels.
show_meet_labels – If False, suppress text labels on
M...cross-join meets.show_aux_labels – If True, also label auto-discovered
X1..Xnintersections.label_overrides – Optional mapping
pt_id -> (base, subscript).highlight_point_ids – Optional point IDs to emphasize with an extra halo ring.
- Returns:
Resolved
Pathof the written SVG file.
- geometor.pappus.render_svg_string(model: geometor.model.Model, *, graphic_id: str = 'g1', title: str = 'Pappus Projective Construction', width: int = 680, height: int = 440, margin: float = 44.0, bbox: tuple[float, float, float, float] | None = None, focus_points: Sequence[sympy.geometry.Point] | None = None, include_guides: bool = False, show_labels: bool = True, show_meet_labels: bool = True, show_aux_labels: bool = False, label_overrides: dict[str, tuple[str, str]] | None = None, highlight_point_ids: Sequence[str] | None = None) str¶
Render a
Modelinto a complete interactive SVG string.- Parameters:
model – Populated
Model.graphic_id –
data-graphic-ididentifier forgeometor_interactive.js.title – Accessible SVG title string.
width – Pixel width of the SVG
viewBox.height – Pixel height of the SVG
viewBox.margin – Outer pixel margin around the framed point cloud.
bbox – Optional explicit math viewport
(xmin, xmax, ymin, ymax).focus_points – Optional subset of points used to compute auto-framing bounds.
include_guides – If True, also render elements marked
guide=True.show_labels – Master toggle for point text labels.
show_meet_labels – If False, suppress text labels on
M...cross-join meets (useful on dense 18-meet composite diagrams while retaining hover refs).show_aux_labels – If True, also label auto-discovered
X1..Xnintersections.label_overrides – Optional mapping
pt_id -> (base, subscript).highlight_point_ids – Optional point IDs to emphasize with an extra halo ring.
- Returns:
UTF-8 XML/SVG string.
- class geometor.pappus.ArbelosChainResult¶
Exact symbolic result for Pappus’s Ancient Proposition on the Arbelos (Synagoge IV.14–18).
- Variables:
model – Populated
Model.r1 – Radius of left inner semicircle $C_{mathrm{left}}$ on $AD$.
r2 – Radius of right inner semicircle $C_{mathrm{right}}$ on $DC$.
outer_radius – Outer semicircle radius $R = r_1 + r_2$ on $AC$.
outer_circle – Carrier circle on diameter $AC$.
left_circle – Left inner circle on diameter $AD$.
right_circle – Right inner circle on diameter $DC$ ($n = 0$ base of chain).
chain – Tuple of
ArbelosCircleentries for $n = 1, dots, text{count}$.locus_ellipse – Exact ellipse with foci $(O_1, O_0)$ carrying all centers $K_n$.
- model: geometor.model.Model¶
- r1: sympy.Expr¶
- r2: sympy.Expr¶
- outer_radius: sympy.Expr¶
- outer_circle: sympy.geometry.Circle¶
- left_circle: sympy.geometry.Circle¶
- right_circle: sympy.geometry.Circle¶
- chain: tuple[ArbelosCircle, ...]¶
- locus_ellipse: sympy.geometry.Ellipse¶
- class geometor.pappus.ArbelosCircle¶
Exact symbolic record for the $n$-th tangent circle in Pappus’s Arbelos chain.
- Variables:
index – Chain index $n ge 1$ ($n = 1$ rests on the baseline semicircle $C_{mathrm{right}}$).
center – Exact rational center $K_n = (x_n, y_n)$.
radius – Exact rational radius $r_n$.
diameter – Exact rational diameter $d_n = 2 r_n$.
height – Exact center altitude $y_n$ above baseline $AC$.
height_over_diameter – Exact simplified ratio $y_n / d_n = n$.
circle – Registered
sympy.geometry.Circlein the model.foot – Projection foot $P_n = (x_n, 0)$ on baseline $AC$.
- index: int¶
- center: sympy.geometry.Point¶
- radius: sympy.Expr¶
- diameter: sympy.Expr¶
- height: sympy.Expr¶
- height_over_diameter: sympy.Expr¶
- circle: sympy.geometry.Circle¶
- foot: sympy.geometry.Point¶
- class geometor.pappus.HoneycombIsoperimetryResult¶
Exact symbolic result for Book V’s Honeycomb Isoperimetry & Book VIII’s 7-Hexagon Cluster.
- Variables:
perimeter – Common perimeter $P > 0$ shared by the equilateral triangle, square, and hexagon.
tiling_polygons – Tuple
(3, 4, 6)of the unique regular $n$-gons tiling the plane.interior_angles_deg – Exact interior angles
{3: 60, 4: 90, 6: 120}in degrees.polygons_per_vertex – Exact valence
{3: 6, 4: 4, 6: 3}meeting around each vertex.side_lengths – Exact side lengths
{3: P/3, 4: P/4, 6: P/6}.areas – Exact symbolic areas
{3: Area_3, 4: Area_4, 6: Area_6}.area_hex_over_tri – Exact rational ratio $operatorname{Area}_6 / operatorname{Area}_3 = 3/2$.
area_hex_over_sq – Exact radical ratio $operatorname{Area}_6 / operatorname{Area}_4 = 2sqrt{3}/3$.
area_sq_over_tri – Exact radical ratio $operatorname{Area}_4 / operatorname{Area}_3 = 9sqrt{3}/16$.
circumradius_seven_hexagons – Exact circumradius $R_7 = s_6 sqrt{7}$ of the 7-hexagon cluster (Synagoge VIII.23).
model – Optional populated
Modelwhen constructed geometrically.
- perimeter: sympy.Expr¶
- tiling_polygons: tuple[int, int, int]¶
- interior_angles_deg: dict[int, sympy.Expr]¶
- polygons_per_vertex: dict[int, int]¶
- side_lengths: dict[int, sympy.Expr]¶
- areas: dict[int, sympy.Expr]¶
- area_hex_over_tri: sympy.Expr¶
- area_hex_over_sq: sympy.Expr¶
- area_sq_over_tri: sympy.Expr¶
- circumradius_seven_hexagons: sympy.Expr¶
- model: geometor.model.Model | None = None¶
- class geometor.pappus.PappusAreaResult¶
Exact symbolic result for Pappus’s Area Theorem (Synagoge Book IV, Prop. 1).
- Variables:
model – Populated
Model.preset – Preset identifier (
"scalene","pythagoras", or"custom").triangle – Tuple $(A, B, C)$ of counter-clockwise triangle vertices.
parallelogram_ab – Tuple $(A, B, D, E)$ of outward parallelogram on $AB$.
parallelogram_ac – Tuple $(A, C, F, G)$ of outward parallelogram on $AC$.
parallelogram_bc – Tuple $(B, C, M, L)$ of translated parallelogram on $BC$.
apex_h – Meet $H = [DE] cap [FG]$ of the two outer parallelogram sides.
ridge_j – Meet $J = [HA] cap [BC]$ dividing $BCML$ into two sub-parallelograms.
area_ab – Exact positive area of parallelogram $ABDE$.
area_ac – Exact positive area of parallelogram $ACFG$.
area_bc – Exact positive area of parallelogram $BCML$.
area_residual – Exact simplified difference $operatorname{Area}(BCML) - (operatorname{Area}(ABDE) + operatorname{Area}(ACFG)) = 0$.
- model: geometor.model.Model¶
- preset: str¶
- triangle: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- parallelogram_ab: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- parallelogram_ac: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- parallelogram_bc: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- apex_h: sympy.geometry.Point¶
- ridge_j: sympy.geometry.Point¶
- area_ab: sympy.Expr¶
- area_ac: sympy.Expr¶
- area_bc: sympy.Expr¶
- area_residual: sympy.Expr¶
- class geometor.pappus.ThreeMeansResult¶
Exact symbolic result for Pappus’s semicircle construction of the three means.
- Variables:
model – Populated
Model.a – First positive segment length $AD = a$.
b – Second positive segment length $DC = b$.
arithmetic_mean – Exact arithmetic mean \(A = \frac{a + b}{2} = |OB|\).
geometric_mean – Exact geometric mean \(G = \sqrt{ab} = |DB|\).
harmonic_mean – Exact harmonic mean \(H = \frac{2ab}{a + b} = |BF|\).
point_a – Left diameter endpoint $A = (0, 0)$.
point_d – Interior division point $D = (a, 0)$.
point_c – Right diameter endpoint $C = (a + b, 0)$.
center_o – Semicircle center $O = left(frac{a + b}{2}, 0right)$.
point_b – Semicircle ordinate apex $B = (a, sqrt{ab})$.
point_f – Perpendicular foot $F$ from $D$ onto radius $OB$.
tangent_t – Optional harmonic conjugate $T$ where tangent at $B$ meets $AC$ (when $a ne b$), satisfying $(A, C; D, T) = -1$.
semicircle – Carrier circle $(O, A)$ of radius $R = frac{a + b}{2}$.
harmonic_cross_ratio – Exact cross-ratio $(A, C; D, T) = -1$ when $T$ is finite.
- model: geometor.model.Model¶
- a: sympy.Expr¶
- b: sympy.Expr¶
- arithmetic_mean: sympy.Expr¶
- geometric_mean: sympy.Expr¶
- harmonic_mean: sympy.Expr¶
- point_a: sympy.geometry.Point¶
- point_d: sympy.geometry.Point¶
- point_c: sympy.geometry.Point¶
- center_o: sympy.geometry.Point¶
- point_b: sympy.geometry.Point¶
- point_f: sympy.geometry.Point¶
- tangent_t: sympy.geometry.Point | None¶
- semicircle: sympy.geometry.Circle¶
- harmonic_cross_ratio: sympy.Expr | None¶
- geometor.pappus.build_synagoge_gallery(output_dir: str | pathlib.Path = 'docsrc/_static/constructions') list[pathlib.Path]¶
Generate publication-grade interactive .euclid-graphic SVGs for the Synagoge Codex.
Exports six standalone theme-adaptive SVGs covering Books III, IV, V, and VIII:
synagoge_three_means.svg— Rational $(9, 16)$ semicircle means ($A = 25/2, G = 12, H = 288/25$) plus harmonic conjugate $T$.synagoge_three_means_golden.svg— Golden $(1, phi^2)$ semicircle means ($G = phi$) in $mathbb{Q}(phi)$.pappus_area_theorem.svg— General scalene Pappus Area Theorem (Synagoge IV.1).pappus_area_pythagoras.svg— Right-triangle + squares specialization (Elements I.47).pappus_arbelos_chain.svg— Rational Arbelos tangent circle chain (Synagoge IV.14–18).honeycomb_isoperimetry.svg— Equal-perimeter $n in {3, 4, 6}$ comparison & 7-cell honeycomb rosette inscribed in $(H_0, N)$ (Synagoge V.1 & VIII.23).
- Parameters:
output_dir – Destination directory for .svg files.
- Returns:
List of resolved
Pathobjects written.
- geometor.pappus.construct_honeycomb_isoperimetry(perimeter: ScalarInput = 12, *, model: geometor.model.Model | None = None) geometor.model.Model¶
Construct an exact
Modelfor Book V’s Honeycomb & Book VIII.23’s 7-Hexagon Circle.Builds:
Left Comparison Row: Equilateral triangle ($s_3 = P/3$), square ($s_4 = P/4$), and regular hexagon ($s_6 = P/6$) sharing exact perimeter $P$.
Right 7-Cell Honeycomb Rosette: Central regular hexagon $H_0$ of side $s_6$ surrounded by six congruent regular hexagons sharing every wall without interstices, inscribed inside the exact outer circle of radius $R = s_6 sqrt{7}$ proved in Synagoge Book VIII, Prop. 23 (Hultsch III, pp. 1096–1102).
- Parameters:
perimeter – Common perimeter $P$ (default
12, giving $s_3 = 4, s_4 = 3, s_6 = 2$).model – Optional existing
Model.
- Returns:
Populated
Model.
- geometor.pappus.construct_pappus_arbelos_chain(model_or_r1: geometor.model.Model | ScalarInput = 2, r1_or_r2: ScalarInput = 1, r2_or_count: ScalarInput | int = 4, count: int | None = None, *, model: geometor.model.Model | None = None) ArbelosChainResult¶
Construct Pappus’s Arbelos tangent circle chain (Synagoge IV.14–18, Hultsch I, pp. 208–227).
Supports both
construct_pappus_arbelos_chain(r1=2, r2=1, count=4, *, model=None)andconstruct_pappus_arbelos_chain(model, r1, r2, count=4).For inner semicircle radii $r_1, r_2 > 0$ and outer radius $R = r_1 + r_2$ along baseline $AC$ ($A = (0, 0)$, $D = (2r_1, 0)$, $C = (2R, 0)$), circle inversion centered at $A$ with squared radius $k^2 = 4 R r_1$ maps $C_{mathrm{outer}}$ and $C_{mathrm{left}}$ to the parallel vertical lines $u = 2r_1$ and $u = 2R$, yielding 100% rational coordinates for every circle $C_n$ ($n ge 1$) with zero square roots:
\[\Delta_n = r_1(r_1 + r_2) + n^2 r_2^2, \qquad r_n = \frac{r_1 r_2 (r_1 + r_2)}{\Delta_n},\]\[x_n = \frac{r_1 (r_1 + r_2)(2r_1 + r_2)}{\Delta_n}, \qquad y_n = \frac{2 n \, r_1 r_2 (r_1 + r_2)}{\Delta_n} = 2 n r_n = n d_n.\]- Parameters:
model_or_r1 – Either a
Modelor left inner radius $r_1$.r1_or_r2 – Left radius $r_1$ (when
model_or_r1is aModel) or right radius $r_2$.r2_or_count – Right radius $r_2$ (when
model_or_r1is aModel) or chain lengthcount.count – Number of chain circles $n = 1, dots, text{count}$ when
model_or_r1is aModel.model – Optional explicit
Modelkeyword argument.
- Returns:
Populated
ArbelosChainResult.
- geometor.pappus.construct_pappus_area_theorem(model: geometor.model.Model | None = None, *, preset: str = 'scalene', triangle: tuple[PointInput, PointInput, PointInput] | None = None, vec_ab: PointInput | None = None, vec_ac: PointInput | None = None) PappusAreaResult¶
Construct Pappus’s Area Theorem (Synagoge Book IV, Prop. 1, Hultsch I, pp. 176–179).
Given an arbitrary counter-clockwise triangle $triangle ABC$ and two arbitrary outward parallelograms $ABDE$ (with $D = B + vec{u}$, $E = A + vec{u}$) and $ACFG$ (with $F = C + vec{v}$, $G = A + vec{v}$):
Extend outer sides $[DE]$ and $[FG]$ to meet at $H$.
Join $[HA]$ and extend it across base $[BC]$ to meet $[BC]$ at $J$.
Translate segment $HA$ to $BL$ and $CM$ ($L = B + (A - H)$, $M = C + (A - H)$) forming outward parallelogram $BCML$ on base $BC$.
By shear-invariance through parallels $[DE] parallel [AB]$, $[FG] parallel [AC]$, and $[HA] parallel [BL] parallel [CM]$:
\[\operatorname{Area}(ABDE) = \operatorname{Area}(ABLH\text{-shear}) = \operatorname{Area}(BLNJ), \quad \operatorname{Area}(ACFG) = \operatorname{Area}(JCMN),\]whence $operatorname{Area}(BCML) = operatorname{Area}(ABDE) + operatorname{Area}(ACFG)$.
- Presets:
"scalene": Oblique scalene $triangle ABC$ with $A = (3, 4)$, $B = (0, 0)$, $C = (7, 0)$ and skewed non-rectangular parallelograms of areas $13$ and $15$, yielding $operatorname{Area}(BCML) = 28$."pythagoras": Exact $3$-$4$-$5$ right triangle at apex $A = left(frac{9}{5}, frac{12}{5}right)$ on hypotenuse $B = (0, 0)$, $C = (5, 0)$ with squares of areas $9$ and $16$, yielding the exact $5 times 5$ hypotenuse square of area $25$ (Elements I.47).
- Parameters:
model – Optional
Model; created ifNone.preset –
"scalene"or"pythagoras"whentriangleisNone.triangle – Optional custom
(A, B, C)counter-clockwise vertices.vec_ab – Optional outward side vector $vec{u}$ for parallelogram $ABDE$.
vec_ac – Optional outward side vector $vec{v}$ for parallelogram $ACFG$.
- Returns:
Populated
PappusAreaResult.
- geometor.pappus.construct_three_means(model_or_a: geometor.model.Model | ScalarInput = 9, a_or_b: ScalarInput = 16, b: ScalarInput | None = None, *, model: geometor.model.Model | None = None, include_harmonic_tangent: bool = True) ThreeMeansResult¶
Construct Pappus’s semicircle diagram exhibiting the three classical means (Synagoge III.5–16).
Supports both
construct_three_means(a, b, *, model=None)andconstruct_three_means(model, a, b).On diameter $AC = a + b$ with center $O = left(frac{a+b}{2}, 0right)$ and interior point $D = (a, 0)$:
Erect $DB perp AC$ to the semicircle at $B = (a, sqrt{ab})$ so \(|DB| = \sqrt{ab} = G\).
Join radius $OB$ so \(|OB| = \frac{a+b}{2} = A\).
Drop $DF perp OB$ to foot $F$ so right-triangle similarity $triangle BFD sim triangle BDO$ gives \(|BF| = \frac{|DB|^2}{|OB|} = \frac{2ab}{a+b} = H\).
When $a ne b$ and
include_harmonic_tangent=True, construct the circle tangent at $B$ meeting $AC$ at $T = left(frac{a(a+b)}{a-b}, 0right)$, exhibiting the exact harmonic conjugate $(A, C; D, T) = -1$ that bridges Book III’s mean theory to Book VII’s Porisms.
- Parameters:
model_or_a – Either a
Modelor the first positive scalar $a$.a_or_b – First scalar $a$ (when
model_or_ais aModel) or second scalar $b$.b – Second scalar $b$ when
model_or_ais aModel.model – Optional explicit
Modelkeyword argument.include_harmonic_tangent – If True and $a ne b$, construct tangent meet $T$ on $AC$.
- Returns:
Populated
ThreeMeansResult.
- geometor.pappus.signed_area2(p1: sympy.geometry.Point, p2: sympy.geometry.Point, p3: sympy.geometry.Point) sympy.Expr¶
Return twice the signed Euclidean area $det(p_2 - p_1, p_3 - p_1)$ of $triangle p_1 p_2 p_3$.
For a parallelogram with consecutive vertices $(p_1, p_2, p_2 + vec{w}, p_1 + vec{w})$, the signed area of the full parallelogram equals
signed_area2(p1, p2, p1 + w).- Parameters:
p1 – First vertex.
p2 – Second vertex.
p3 – Third vertex.
- Returns:
Simplified exact SymPy expression $(x_2 - x_1)(y_3 - y_1) - (y_2 - y_1)(x_3 - x_1)$.
- geometor.pappus.verify_arbelos_chain_symbolic(n_max: int = 5) dict[str, sympy.Expr]¶
Prove Pappus’s Arbelos Theorem symbolically over $mathbb{Q}(r_1, r_2, n)$.
Verifies four universal polynomial identities in $mathbb{Q}(r_1, r_2, n)$:
Pappus’s Altitude Law: $y_n - n (2 r_n) = 0$ for symbolic $n$.
Internal Tangency to Outer Semicircle: $Q(K_n, O_0) - (R - r_n)^2 = 0$.
External Tangency to Left Semicircle: $Q(K_n, O_1) - (r_1 + r_n)^2 = 0$.
Chain-to-Chain External Tangency: $Q(K_{n+1}, K_n) - (r_{n+1} + r_n)^2 = 0$ for symbolic $n$ (including $n = 0$, tangency of $C_1$ to $C_{mathrm{right}}$).
- Parameters:
n_max – Optional positive check bound for explicit integer spot-checks alongside symbolic $n$.
- Returns:
Dictionary mapping each invariant name to its simplified residual (all
sp.Integer(0)).
- geometor.pappus.verify_honeycomb_isoperimetry(perimeter: ScalarInput = 12, *, build_model: bool = False) HoneycombIsoperimetryResult¶
Verify Pappus’s Book V Honeycomb Isoperimetry & Regular Planar Tiling Theorem.
Proves two pillars of Synagoge Book V (Preface & Prop. 1, Hultsch I, pp. 304–310):
Uniqueness of Regular Planar Tilings: For $k ge 3$ congruent regular $n$-gons ($n ge 3$) to surround a point without gaps or overlaps, their interior angle $frac{n - 2}{n} cdot 180^circ$ must satisfy $k cdot frac{n - 2}{n} = 2$, i.e. $k = frac{2n}{n - 2} = 2 + frac{4}{n - 2} in mathbb{Z}_{ge 3}$, whose unique integer solutions are $(n - 2) in {1, 2, 4} iff n in {3, 4, 6}$ with $k in {6, 4, 3}$.
Isoperimetric Superiority of the Hexagon: For common perimeter $P > 0$:
\[\operatorname{Area}_3 = \frac{\sqrt{3}}{36} P^2, \qquad \operatorname{Area}_4 = \frac{1}{16} P^2, \qquad \operatorname{Area}_6 = \frac{\sqrt{3}}{24} P^2,\]giving $frac{operatorname{Area}_6}{operatorname{Area}_3} = frac{3}{2}$ and $frac{operatorname{Area}_6}{operatorname{Area}_4} = frac{2sqrt{3}}{3} > 1$ (since $left(frac{2sqrt{3}}{3}right)^2 = frac{4}{3} > 1$).
- Parameters:
perimeter – Common positive perimeter $P$ (default
12, giving integer sides $4, 3, 2$).build_model – If True, also construct the geometric
Model.
- Returns:
Populated
HoneycombIsoperimetryResult.
- geometor.pappus.verify_pappus_area_symbolic() sympy.Expr¶
Verify Pappus’s Area Theorem universally over $mathbb{Q}(x_A, y_A, x_B, y_B, x_C, y_C, u_x, u_y, v_x, v_y)$.
Constructs generic symbolic points $A, B, C$ and generic parallelogram vectors $vec{u} = (u_x, u_y)$ and $vec{v} = (v_x, v_y)$, intersects the outer parallel lines $[DE]$ and $[FG]$ symbolically at $H$, translates $A - H$ onto base $BC$, and simplifies the oriented parallelogram area identity
\[\det(B - C, A - H) - \bigl(\det(A - B, \vec{u}) + \det(\vec{v}, A - C)\bigr).\]- Returns:
Exact simplified SymPy expression (identically
sp.Integer(0)).
- geometor.pappus.__version__ = '0.2.4'¶