modules¶
geometor.casey¶
Exact symbolic geometry constructions and Digital Scriptorium apparatus for John Casey’s Sequel.
Models the landmark theorems and straightedge-and-compass constructions of John Casey’s A Sequel to the First Six Books of the Elements of Euclid, Containing an Easy Introduction to Modern Geometry (5th ed. 1888 / 6th ed. 1892):
Euler Line & Nine-Points Circle (
construct_euler_nine_point())Radical Axis, Coaxal Circles & Poncelet Limiting Points (
construct_radical_axis_and_coaxial_pencil(),verify_coaxial_fundamental_theorem())Complete Quadrilateral Harmonic Division (
construct_complete_quadrilateral_harmonic())Casey’s Generalized Ptolemy Theorem & Feuerbach’s Theorem (
prove_casey_theorem_symbolic(),prove_casey_feuerbach_heronian(),construct_casey_feuerbach())Poles, Polars, Harmonic Secants & La Hire’s Reciprocity (
construct_pole_and_polar(),verify_lahire_reciprocity_symbolic())Symmedians, Lemoine Circles, Brocard Points, Brocard Circle, Steiner & Tarry Points (
construct_symmedian_and_lemoine_circles(),construct_brocard_and_lemoine_circles())
Submodules¶
Attributes¶
Canonical Heronian |
|
Classes¶
Exact rational invariant summary for Symmedian, Lemoine & Brocard geometry on |
|
Constructed elements for Brocard Points, Brocard Circle, Lemoine Circle, Steiner & Tarry. |
|
Constructed elements for Symmedians, First Lemoine Circle & Cosine Circle (Unit 5). |
|
Constructed elements for the Disjoint Coaxal Pencil & Poncelet Limiting Points (Unit 2). |
|
Symbolic verification certificate for Casey's Fundamental Theorem (Book III, Prop. 24). |
|
Single proposition/topic concordance mapping across the GEOMETOR canon. |
|
Audit record comparing |
|
Exact rational invariant report for Casey's Theorem & Feuerbach tangency on |
|
Constructed elements for Casey's & Feuerbach's Theorem on |
|
Symbolic verification certificate for Casey's Generalized Ptolemy Theorem. |
|
Constructed elements for the Euler Line and Nine-Points Circle (Unit 1). |
|
Constructed elements for Casey's Complete Quadrilateral Harmonic Section (Unit 3). |
|
Universal symbolic proof certificate for La Hire's Reciprocity & Harmonic Secants. |
|
Constructed elements for Pole, Polar, Harmonic Secants & La Hire Reciprocity (Unit 4). |
Functions¶
|
Construct the Brocard Points, Brocard Circle, First Lemoine Circle, Steiner & Tarry Points. |
|
Construct Lemoine's Point |
|
Verify Casey's universal algebraic identities for |
|
Construct the radical axis, coaxal system, orthogonal pencil, and limiting points. |
|
Verify Casey Book III Props. 22–24 symbolically and on the constructed coaxal system. |
|
Inspect |
|
Return the path to |
|
Load a JSON apparatus file ( |
|
Load all cross-repository concordance entries from |
|
Construct the internal bisector of |
|
Construct Casey's Inversion Proof & Feuerbach's Tangency Theorem on |
|
Construct the Euler Line and Nine-Points Circle by straightedge and compass (Unit 1). |
|
Verify Casey's bitangent equation and all 4 Feuerbach tangencies on Heronian |
|
Prove Casey's Generalized Ptolemy Theorem & Feuerbach's Corollary symbolically. |
|
Return |
|
Compute the exact homogeneous barycentric point |
|
Compute the exact common-tangent length |
|
Compute the exact squared common-tangent length |
|
Compute the exact power |
|
Construct the exact midpoint of |
|
Construct the line through |
|
Construct the perpendicular bisector of |
|
Construct the perpendicular to line |
|
Compute the exact circular inverse of |
|
Compute the exact polar line of |
|
Compute the exact pole of |
|
Compute the exact radical axis of two non-concentric circles (Casey Book III, Prop. 23). |
|
Compute the exact signed area of oriented triangle |
|
Construct Casey's Complete Quadrilateral and verify harmonic diagonal division (Unit 3). |
|
Construct the Polar of |
|
Prove La Hire's Reciprocity (Book III, Prop. 25) and Harmonic Secant Section (VI.III.4). |
|
Write an interactive |
|
Render a |
Package Contents¶
- class geometor.casey.BrocardLemoineReport¶
Exact rational invariant summary for Symmedian, Lemoine & Brocard geometry on
(15,13,14).- cot_omega: sympy.Rational¶
- sin_sq_omega: sympy.Rational¶
- symmedian_point: sympy.geometry.Point¶
- brocard_center: sympy.geometry.Point¶
- brocard_1: sympy.geometry.Point¶
- brocard_2: sympy.geometry.Point¶
- brocard_first_triangle: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- steiner_point: sympy.geometry.Point¶
- tarry_point: sympy.geometry.Point¶
- longchamps_point: sympy.geometry.Point¶
- lemoine_intercept_ratios: tuple[sympy.Rational, sympy.Rational]¶
- min_perp_squares_sum: sympy.Rational¶
- verified: bool¶
- class geometor.casey.BrocardLemoineResult¶
Constructed elements for Brocard Points, Brocard Circle, Lemoine Circle, Steiner & Tarry.
- model: geometor.model.Model¶
- vertices: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- circumcenter: sympy.geometry.Point¶
- circumcircle: sympy.geometry.Circle¶
- symmedian_point: sympy.geometry.Point¶
- brocard_center: sympy.geometry.Point¶
- brocard_1: sympy.geometry.Point¶
- brocard_2: sympy.geometry.Point¶
- brocard_first_triangle: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- brocard_circle: sympy.geometry.Circle¶
- lemoine_hexagon: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- first_lemoine_circle: sympy.geometry.Circle¶
- steiner_point: sympy.geometry.Point¶
- tarry_point: sympy.geometry.Point¶
- longchamps_point: sympy.geometry.Point¶
- report: BrocardLemoineReport¶
- class geometor.casey.LemoineCirclesResult¶
Constructed elements for Symmedians, First Lemoine Circle & Cosine Circle (Unit 5).
- model: geometor.model.Model¶
- vertices: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- circumcenter: sympy.geometry.Point¶
- circumcircle: sympy.geometry.Circle¶
- tangential_vertices: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- symmedian_point: sympy.geometry.Point¶
- lemoine_center: sympy.geometry.Point¶
- lemoine_hexagon: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- first_lemoine_circle: sympy.geometry.Circle¶
- cosine_hexagon: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- cosine_circle: sympy.geometry.Circle¶
- geometor.casey.construct_brocard_and_lemoine_circles(model: geometor.model.Model | None = None) BrocardLemoineResult¶
Construct the Brocard Points, Brocard Circle, First Lemoine Circle, Steiner & Tarry Points.
On the Heronian
(15, 13, 14)triangleA=(0,0), B=(14,0), C=(5,12):Constructs
O = (7, 33/8),K = X(6) = (1673/295, 1176/295), and the First Lemoine Circle centered atMl = midpoint(O, K) = (4053/590, 9567/2360).Constructs the First Brocard Point ``Om1`` via tangent circles
(Ob1, B)(tangent toBCatBthroughA) and(Oc1, C)(tangent toCAatCthroughB), verifying concurrency with(Oa1, A)(tangent toABatAthroughC).Constructs the Second Brocard Point ``Om2`` via reversed tangent circles.
Constructs Brocard’s First Triangle ``A1 B1 C1`` (
A1 = [B Om1] ∩ [C Om2], etc.) and proves that all seven points ``O, K, Om1, Om2, A1, B1, C1`` lie on the Brocard Circle with diameterOK(Casey, Supp. Sec. V, pp. 194–195).Constructs Steiner’s Point ``St = X(99)`` (parallels through
A, B, Cto sides ofA1 B1 C1), Tarry’s Point ``Tr = X(98)`` (antipode ofSton circumcircle), and de Longchamps’ Point ``Lo = X(20)`` (reflection ofHacrossO).
- Parameters:
model – Optional existing
Model.- Returns:
Populated
BrocardLemoineResultwith full exact symbolic report.
- geometor.casey.construct_symmedian_and_lemoine_circles(model: geometor.model.Model | None = None) LemoineCirclesResult¶
Construct Lemoine’s Point
K, First Lemoine Circle & Cosine Circle (Unit 5).Follows Casey, Supplementary Chapter, Sec. I, Props. 5–6 (pp. 170–171) and Sec. III, Prop. 1 & Cor. 4 (pp. 179–183) on
A=(0,0), B=(14,0), C=(5,12).- Parameters:
model – Optional existing
Model.- Returns:
Populated
LemoineCirclesResult.
- geometor.casey.verify_brocard_identities_symbolic() dict[str, sympy.Expr]¶
Verify Casey’s universal algebraic identities for
cot(omega)andK’s minimum property.By the Law of Cosines,
cot A + cot B + cot C = (b^2+c^2-a^2)/(4*Delta) + (c^2+a^2-b^2)/(4*Delta) + (a^2+b^2-c^2)/(4*Delta) = (a^2+b^2+c^2)/(4*Delta).By Lagrange’s identity (Sec. I, Prop. 7, p. 171):
(a^2+b^2+c^2)*(x^2+y^2+z^2) - (a*x+b*y+c*z)^2 = (b*z - c*y)^2 + (c*x - a*z)^2 + (a*y - b*x)^2, proving that undera*x+b*y+c*z = 2*Delta,x^2 + y^2 + z^2attains its unique minimum whenx/a = y/b = z/c(atK = X(6)).
- Returns:
Dictionary of zero-verified symbolic residuals.
- class geometor.casey.CoaxialPencilResult¶
Constructed elements for the Disjoint Coaxal Pencil & Poncelet Limiting Points (Unit 2).
- model: geometor.model.Model¶
- c1: sympy.geometry.Circle¶
- c2: sympy.geometry.Circle¶
- c3_coaxial: sympy.geometry.Circle¶
- aux_secant_circle: sympy.geometry.Circle¶
- radical_center: sympy.geometry.Point¶
- radical_foot: sympy.geometry.Point¶
- radical_axis: sympy.geometry.Line¶
- line_of_centers: sympy.geometry.Line¶
- tangent_contact_c1: sympy.geometry.Point¶
- limiting_points: tuple[sympy.geometry.Point, sympy.geometry.Point]¶
- orthogonal_circle_1: sympy.geometry.Circle¶
- orthogonal_circle_2: sympy.geometry.Circle¶
- report: CoaxialTheoremReport¶
- class geometor.casey.CoaxialTheoremReport¶
Symbolic verification certificate for Casey’s Fundamental Theorem (Book III, Prop. 24).
- symbolic_prop24_residual: sympy.Expr¶
- radical_axis_power_diff: sympy.Expr¶
- limiting_point_power_c1: sympy.Expr¶
- limiting_point_power_c2: sympy.Expr¶
- orthogonal_to_c1: bool¶
- orthogonal_to_c2: bool¶
- orthogonal_to_c3: bool¶
- verified: bool¶
- geometor.casey.construct_radical_axis_and_coaxial_pencil(model: geometor.model.Model | None = None) CoaxialPencilResult¶
Construct the radical axis, coaxal system, orthogonal pencil, and limiting points.
Uses exact integer-rational circles
C1 = ((-10, 0), 6)andC2 = ((17, 0), 15):Draws an auxiliary secant circle
C_aux = ((2, 8), 10)cuttingC1inU1, V1andC2inU2, V2(Casey Book III, Prop. 28).Intersects common chords
[U1 V1]and[U2 V2]to obtain the Radical CentreRc = (0, -6)(Book III, Prop. 23, Cor. 2).Drops the perpendicular from
Rcto the line of centres[O1 O2]to construct the Radical Axisx = 0and footD = (0, 0).Constructs the tangent
D T1toC1by Euclid III.17 (Thales circle onO1 D) and transfers|D T1| = 8onto[O1 O2]via circle(D, T1)to construct Poncelet’s Limiting PointsL1 = (-8, 0)andL2 = (8, 0).Constructs two members
(Rc, L1)and(D, T1)of the conjugate orthogonal pencil passing throughL1, L2and cuttingC1, C2, C3orthogonally.
- Parameters:
model – Optional existing
Model.- Returns:
Populated
CoaxialPencilResultwith exact coordinates and verification report.
- geometor.casey.verify_coaxial_fundamental_theorem(c1: sympy.geometry.Circle, c2: sympy.geometry.Circle, c3_coaxial: sympy.geometry.Circle, orth_circle: sympy.geometry.Circle, limiting_points: tuple[sympy.geometry.Point, sympy.geometry.Point]) CoaxialTheoremReport¶
Verify Casey Book III Props. 22–24 symbolically and on the constructed coaxal system.
- Parameters:
c1 – First primary circle of the coaxal pencil.
c2 – Second primary circle of the coaxal pencil.
c3_coaxial – Third circle belonging to the same coaxal pencil.
orth_circle – Conjugate circle cutting the pencil orthogonally.
limiting_points – Pair
(L1, L2)of Poncelet limiting points.
- Returns:
Frozen
CoaxialTheoremReportcertificate.
- class geometor.casey.ConcordanceEntry¶
Single proposition/topic concordance mapping across the GEOMETOR canon.
- id: str¶
- unit: str¶
- casey_locus: str¶
- folio: str¶
- page: str¶
- title: str¶
- euclid_refs: tuple[str, ...]¶
- altshiller_court_refs: tuple[str, ...]¶
- etc_centers: tuple[str, ...]¶
- pappus_refs: tuple[str, ...]¶
- casey_symbol: str¶
- class geometor.casey.SympyCircleGap¶
Audit record comparing
sympy.geometry.Circleagainstgeometor.casey.- capability: str¶
- sympy_method_present: bool¶
- casey_locus: str¶
- geometor_casey_api: str¶
- geometor.casey.audit_sympy_circle_gaps() list[SympyCircleGap]¶
Inspect
sympy.geometry.Circlefor modern-circle-geometry primitives in Casey.- Returns:
List of
SympyCircleGapentries documenting native presence vs.geometor.caseyexact symbolic implementations.
- geometor.casey.get_resources_dir() pathlib.Path¶
Return the path to
resources/sequel_to_euclid/inside the repository.
- geometor.casey.load_apparatus_registry(name: str) dict[str, Any]¶
Load a JSON apparatus file (
persons,citations,glossary,sources_manifest).- Parameters:
name – Filename stem without
.jsonextension.- Returns:
Parsed JSON dictionary.
- geometor.casey.load_concordance() list[ConcordanceEntry]¶
Load all cross-repository concordance entries from
concordance.json.- Returns:
List of
ConcordanceEntryrecords in codex order.
- class geometor.casey.CaseyFeuerbachHeronianReport¶
Exact rational invariant report for Casey’s Theorem & Feuerbach tangency on
(15, 13, 14).- sides: tuple[sympy.Integer, sympy.Integer, sympy.Integer]¶
- area: sympy.Rational¶
- inradius: sympy.Rational¶
- circumradius: sympy.Rational¶
- nine_point_radius: sympy.Rational¶
- exradii: tuple[sympy.Rational, sympy.Rational, sympy.Rational]¶
- midpoint_chords: tuple[sympy.Rational, sympy.Rational, sympy.Rational]¶
- incircle_midpoint_tangents: tuple[sympy.Rational, sympy.Rational, sympy.Rational]¶
- casey_signed_sum: sympy.Expr¶
- feuerbach_point: sympy.geometry.Point¶
- excircle_feuerbach_points: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- ni_distance: sympy.Rational¶
- inversion_circle_orthogonal_to_incircle: bool¶
- inversion_circle_orthogonal_to_excircle_a: bool¶
- verified: bool¶
- class geometor.casey.CaseyFeuerbachResult¶
Constructed elements for Casey’s & Feuerbach’s Theorem on
(15, 13, 14)(Unit 4).- model: geometor.model.Model¶
- euler_nine_point: EulerNinePointResult¶
- incenter: sympy.geometry.Point¶
- incircle_contacts: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- incircle: sympy.geometry.Circle¶
- feuerbach_point: sympy.geometry.Point¶
- casey_inversion_circle: sympy.geometry.Circle¶
- fourth_common_tangent: sympy.geometry.Line¶
- class geometor.casey.CaseySymbolicProof¶
Symbolic verification certificate for Casey’s Generalized Ptolemy Theorem.
- inversion_invariance_residual: sympy.Expr¶
- tangent_line_euler_residual: sympy.Expr¶
- incircle_casey_residual: sympy.Expr¶
- incircle_cor2_squares_residual: sympy.Expr¶
- excircle_a_casey_residual: sympy.Expr¶
- verified: bool¶
- class geometor.casey.EulerNinePointResult¶
Constructed elements for the Euler Line and Nine-Points Circle (Unit 1).
- model: geometor.model.Model¶
- vertices: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- midpoints: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- altitude_feet: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- euler_midpoints: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- centroid: sympy.geometry.Point¶
- circumcenter: sympy.geometry.Point¶
- orthocenter: sympy.geometry.Point¶
- nine_point_center: sympy.geometry.Point¶
- euler_line: sympy.geometry.Line¶
- circumcircle: sympy.geometry.Circle¶
- nine_point_circle: sympy.geometry.Circle¶
- geometor.casey.compass_internal_angle_bisector(model: geometor.model.Model, vertex: sympy.geometry.Point, arm_p1: sympy.geometry.Point, arm_p2: sympy.geometry.Point, *, ID: str = '', classes: list[str] | None = None, guide: bool = False) sympy.geometry.Line¶
Construct the internal bisector of
< arm_p1 vertex arm_p2 )by Euclid I.9.Transfers
|vertex arm_p1|onto rayvertex arm_p2via circle(vertex, arm_p1)and bisects the resulting isosceles base chord.- Parameters:
model – Target
Model.vertex – Angle vertex.
arm_p1 – Point on the first ray.
arm_p2 – Point on the second ray.
ID – Optional explicit line identifier.
classes – Optional semantic CSS classes.
guide – Whether the angle bisector should remain a guide.
- Returns:
Exact internal angle bisector
sympy.geometry.Line.
- geometor.casey.construct_casey_feuerbach(model: geometor.model.Model | None = None) CaseyFeuerbachResult¶
Construct Casey’s Inversion Proof & Feuerbach’s Tangency Theorem on
(15, 13, 14).Builds the Nine-Points Circle, constructs the Incentre
Iand Incircle(I, Ta)by pure compass-and-straightedge (Euclid IV.4), erects Casey’s 1861 orthogonal inversion circle(Ma, Ta)(Book VI, Sec. IV, p. 106), constructs the fourth common internal tangent of(I, r)and(Ia, r_a)via reflection across line of centresAI, and discovers the exact Feuerbach pointFe = X(11) = (6, 8)as(N, Ma) ∩ (I, Ta).- Parameters:
model – Optional existing
Model.- Returns:
Populated
CaseyFeuerbachResult.
- geometor.casey.construct_euler_nine_point(model: geometor.model.Model | None = None) EulerNinePointResult¶
Construct the Euler Line and Nine-Points Circle by straightedge and compass (Unit 1).
Follows Casey, Book I, Misc. Ex. 42–46 (p. 20) and Book IV, Prop. 5 (pp. 57–58) on
A=(0,0), B=(14,0), C=(5,12), verifying exact incidence of all nine classical points and Euler trisection|HG|^2 = 4*|GO|^2.- Parameters:
model – Optional existing
Model. Created withauto_intersect=FalsewhenNone.- Returns:
Populated
EulerNinePointResult.
- geometor.casey.prove_casey_feuerbach_heronian() CaseyFeuerbachHeronianReport¶
Verify Casey’s bitangent equation and all 4 Feuerbach tangencies on Heronian
(15, 13, 14).Evaluates exact coordinates on
A=(0,0), B=(14,0), C=(5,12)(a=15, b=13, c=14), confirming:Midpoint chords
t_23 = 15/2,t_31 = 13/2,t_12 = 7.Midpoint-to-incircle bitangents
|Ma Ta| = 1/2,|Mb Tb| = 1/2,|Mc Tc| = 1.Casey’s equation
(15/2)*(1/2) + (13/2)*(1/2) - 7*1 = 15/4 + 13/4 - 7 = 0.Internal tangency of Nine-Points Circle
N=(6, 63/16), R_9=65/16with IncircleI=(6, 4), r=4atFe = X(11) = (6, 8)with|NI| = 1/16 = R_9 - r.External tangency of Nine-Points Circle with all three Excircles
(Ia, r_a), (Ib, r_b), (Ic, r_c)with|N I_k| = R_9 + r_k.Casey’s 1861 inversion circle
(Ma, 1/2)cuts both(I, 4)and(Ia, 14)orthogonally and inverts their fourth common internal tangent into the Nine-Points Circle.
- Returns:
Frozen
CaseyFeuerbachHeronianReportwith exact rational values.
- geometor.casey.prove_casey_theorem_symbolic() CaseySymbolicProof¶
Prove Casey’s Generalized Ptolemy Theorem & Feuerbach’s Corollary symbolically.
Verifies four algebraic pillars from Casey, Book VI, Sec. IV, Props. 9–10 (pp. 102–106):
Inversion Invariance (Prop. 9, pp. 102–103): Under inversion in
(O, k)at the origin, for two circles(x1, y1, r1)and(x2, y2, r2)not passing throughO, the normalized bitangent ratiot_12^2 / (r1 * r2)is strictly invariant:t'_12^2 / (r'_1 * r'_2) - t_12^2 / (r1 * r2) == 0.Collinear Contact Reduction (Prop. 10, pp. 103–104): Inverting from a point on the fifth tangent circle maps it to
y = 0and the four tangent circles to(u_i, r_i)witht_ij = |u_i - u_j|, reducingt_12*t_34 + t_14*t_23 = t_13*t_24for ordered contactsu_1 < u_2 < u_3 < u_4to Euler’s identity (Book II, Prop. 7, p. 24).Universal Incircle Bitangent Identity (Prop. 10, Cor. 2, pp. 104–105): For general positive side lengths
b <= c <= a,t_23 = a/2, t_31 = b/2, t_12 = c/2andt_14 = (c - b)/2, t_24 = (a - c)/2, t_34 = (a - b)/2satisfyt_23*t_14 + t_31*t_24 - t_12*t_34 == 0, alongside Casey’s squared identity(b^2 - c^2) + (c^2 - a^2) + (a^2 - b^2) == 0.Universal Excircle Bitangent Identity: For the
A-excircle,t_14 = (c - b)/2, t_24 = (a + c)/2, t_34 = (a + b)/2satisfyt_23*t_14 + t_31*t_24 - t_12*t_34 == 0(witht_31*t_24 = t_12*t_34 + t_23*t_14).
- Returns:
Frozen
CaseySymbolicProofcertificate with zero residuals.
- geometor.casey.HERONIAN_VERTICES: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
Canonical Heronian
(15, 13, 14)scalene triangleA=(0,0), B=(14,0), C=(5,12).
- geometor.casey.are_orthogonal_circles(c1: sympy.geometry.Circle, c2: sympy.geometry.Circle) bool¶
Return
Trueiff circlesc1andc2cut orthogonally (Casey Book III, Prop. 22).Two circles cut orthogonally iff the square of the distance between their centres equals the sum of the squares of their radii:
|O1 O2|^2 = r1^2 + r2^2.- Parameters:
c1 – First circle
(O1, r1).c2 – Second circle
(O2, r2).
- Returns:
Trueif|O1 O2|^2 - r1^2 - r2^2 == 0symbolically.
- geometor.casey.barycentric_point(a_pt: sympy.geometry.Point, b_pt: sympy.geometry.Point, c_pt: sympy.geometry.Point, w_a: sympy.Expr, w_b: sympy.Expr, w_c: sympy.Expr) sympy.geometry.Point¶
Compute the exact homogeneous barycentric point
(w_a : w_b : w_c)onABC.Implements Casey’s Centre of Mean Position (Book I, Props. 17–18, pp. 12–13) and symmedian/Brocard weights (Supplementary Chapter, Secs. I–II).
- Parameters:
a_pt – First vertex
A.b_pt – Second vertex
B.c_pt – Third vertex
C.w_a – Weight attached to
A.w_b – Weight attached to
B.w_c – Weight attached to
C.
- Returns:
Exact
sympy.geometry.Point(w_a*A + w_b*B + w_c*C) / (w_a + w_b + w_c).- Raises:
ValueError – If
w_a + w_b + w_c == 0.
- geometor.casey.bitangent_length(c1: sympy.geometry.Circle | sympy.geometry.Point, c2: sympy.geometry.Circle | sympy.geometry.Point, *, internal: bool = False) sympy.Expr¶
Compute the exact common-tangent length
t_12between two circles or points.- Parameters:
c1 – First circle or null-circle point.
c2 – Second circle or null-circle point.
internal – If
True, return the internal common-tangent length; else external.
- Returns:
Exact symbolic principal square root
sqrt(bitangent_quadrance(c1, c2)).
- geometor.casey.bitangent_quadrance(c1: sympy.geometry.Circle | sympy.geometry.Point, c2: sympy.geometry.Circle | sympy.geometry.Point, *, internal: bool = False) sympy.Expr¶
Compute the exact squared common-tangent length
t_12^2between circles or null-circles.In Casey’s Generalized Ptolemy Theorem (Book VI, Sec. IV, Prop. 10, pp. 103–104), a point is treated as a circle of radius
0. For two circles soaked in the same sense (external common tangent),t_12^2 = |O1 O2|^2 - (r1 - r2)^2; for transverse (internal) contact,t_12^2 = |O1 O2|^2 - (r1 + r2)^2.- Parameters:
c1 – First
sympy.geometry.Circleor null-circlesympy.geometry.Point.c2 – Second
sympy.geometry.Circleor null-circlesympy.geometry.Point.internal – If
True, use(r1 + r2)^2(internal bitangent); otherwise(r1 - r2)^2.
- Returns:
Exact symbolic squared bitangent length.
- geometor.casey.circle_power(pt: sympy.geometry.Point, circ: sympy.geometry.Circle) sympy.Expr¶
Compute the exact power
|PO|^2 - r^2of pointptwith respect tocirc.Corresponds to Casey, Book III, Props. 20–24 (pp. 41–44): for exterior points, equals the square of the tangent from
pttocirc.- Parameters:
pt – Query point
P.circ – Reference circle
(O, r).
- Returns:
Exact symbolic expression
(P.x - O.x)^2 + (P.y - O.y)^2 - r^2.
- geometor.casey.compass_midpoint(model: geometor.model.Model, p1: sympy.geometry.Point, p2: sympy.geometry.Point, *, ID: str = '', classes: list[str] | None = None) sympy.geometry.Point¶
Construct the exact midpoint of
p1 p2by straightedge and compass (Euclid I.10).- Parameters:
model – Target
Model.p1 – First endpoint.
p2 – Second endpoint.
ID – Optional explicit point identifier.
classes – Optional semantic CSS classes.
- Returns:
Exact midpoint
sympy.geometry.Point.
- geometor.casey.compass_parallel_line(model: geometor.model.Model, line_p1: sympy.geometry.Point, line_p2: sympy.geometry.Point, through: sympy.geometry.Point, *, ID: str = '', classes: list[str] | None = None, guide: bool = False) sympy.geometry.Line¶
Construct the line through
throughparallel toline_p1 line_p2(Euclid I.31).Constructs the fourth vertex
Q = line_p2 + through - line_p1of parallelogramline_p1 line_p2 Q throughby bisecting diagonalline_p2 throughatMand doublingline_p1 Mvia circle(M, line_p1).- Parameters:
model – Target
Model.line_p1 – First point on the reference line.
line_p2 – Second point on the reference line.
through – Exterior point through which the parallel is drawn.
ID – Optional explicit line identifier.
classes – Optional semantic CSS classes.
guide – Whether the parallel line should remain a guide.
- Returns:
Exact parallel
sympy.geometry.Linepassing throughthrough.
- geometor.casey.compass_perp_bisector(model: geometor.model.Model, p1: sympy.geometry.Point, p2: sympy.geometry.Point, *, ID: str = '', classes: list[str] | None = None, guide: bool = False) sympy.geometry.Line¶
Construct the perpendicular bisector of
p1 p2by Euclid I.10 symmetric circles.- Parameters:
model – Target
Model.p1 – First endpoint.
p2 – Second endpoint.
ID – Optional explicit line identifier.
classes – Optional semantic CSS classes.
guide – Whether the resulting bisector should remain a guide.
- Returns:
Exact perpendicular bisector
sympy.geometry.Line.
- geometor.casey.compass_perpendicular_line(model: geometor.model.Model, line_p1: sympy.geometry.Point, line_p2: sympy.geometry.Point, through: sympy.geometry.Point, *, off_line_ref: sympy.geometry.Point | None = None, ID: str = '', classes: list[str] | None = None, guide: bool = False) sympy.geometry.Line¶
Construct the perpendicular to line
line_p1 line_p2throughthrough.Uses rational circle reflection (Euclid I.12) when
throughlies off the line, and Thales’s semicircle construction (Euclid III.31) viaoff_line_ref(or equilateral fallback) whenthroughlies on the line—preserving rational fields without extraneous nested radicals wheneveroff_line_refis provided.- Parameters:
model – Target
Model.line_p1 – First point defining the base line.
line_p2 – Second point defining the base line.
through – Point through which the perpendicular is drawn.
off_line_ref – Optional known point not lying on
line_p1 line_p2for Thales III.31.ID – Optional explicit line identifier.
classes – Optional semantic CSS classes.
guide – Whether the perpendicular line should remain a guide.
- Returns:
Exact perpendicular
sympy.geometry.Linepassing throughthrough.
- geometor.casey.invert_point(pt: sympy.geometry.Point, center: sympy.geometry.Point, radius_sq: sympy.Expr) sympy.geometry.Point¶
Compute the exact circular inverse of
ptwith respect to(center, sqrt(radius_sq)).Implements Casey, Book III, Def. (p. 41) & Book VI, Sec. IV, Def. (p. 95): collinear with
centerandpton the same ray such that|O P| * |O P'| = k^2.- Parameters:
pt – Point
Pdistinct fromcenter.center – Centre of inversion
O.radius_sq – Square
k^2of the radius of inversion.
- Returns:
Exact inverted
sympy.geometry.PointP'.- Raises:
ValueError – If
ptcoincides withcenter.
- geometor.casey.polar_line(pt: sympy.geometry.Point, circ: sympy.geometry.Circle) sympy.geometry.Line¶
Compute the exact polar line of
ptwith respect tocirc(Casey Book III, Def. p. 44).By Casey’s definition, the polar of
Pwith respect to(O, r)is the perpendicular to rayOPerected at the inverse pointP'ofP. Note thatsympy.geometry.Circlenatively lackspolar_lineandpole_of_linemethods.- Parameters:
pt – Pole
Pdistinct fromcirc.center.circ – Reference circle
(O, r).
- Returns:
Exact
sympy.geometry.Linerepresentingpolar(P).- Raises:
ValueError – If
ptcoincides withcirc.center.
- geometor.casey.pole_of_line(line: sympy.geometry.Line, circ: sympy.geometry.Circle) sympy.geometry.Point¶
Compute the exact pole of
linewith respect tocirc(Casey Book III, Def. p. 44).Constructed algebraically as the circular inverse of the orthogonal foot of
circ.centeruponline.- Parameters:
line – Non-diametral
sympy.geometry.Line.circ – Reference circle
(O, r).
- Returns:
Exact
sympy.geometry.Pointwhose polar with respect tocircisline.- Raises:
ValueError – If
linepasses throughcirc.center(pole is at infinity).
- geometor.casey.radical_axis_line(c1: sympy.geometry.Circle, c2: sympy.geometry.Circle) sympy.geometry.Line¶
Compute the exact radical axis of two non-concentric circles (Casey Book III, Prop. 23).
- Parameters:
c1 – First circle
(O1, r1).c2 – Second circle
(O2, r2).
- Returns:
Exact
sympy.geometry.Linelocus of equal circle powers.- Raises:
ValueError – If
c1andc2are concentric.
- geometor.casey.signed_triangle_area(a_pt: sympy.geometry.Point, b_pt: sympy.geometry.Point, c_pt: sympy.geometry.Point) sympy.Expr¶
Compute the exact signed area of oriented triangle
ABC.- Parameters:
a_pt – First vertex
A.b_pt – Second vertex
B.c_pt – Third vertex
C.
- Returns:
Exact symbolic signed area
((B.x - A.x)*(C.y - A.y) - (B.y - A.y)*(C.x - A.x)) / 2.
- class geometor.casey.CompleteQuadrilateralResult¶
Constructed elements for Casey’s Complete Quadrilateral Harmonic Section (Unit 3).
- model: geometor.model.Model¶
- quad_vertices: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- opposite_meets: tuple[sympy.geometry.Point, sympy.geometry.Point]¶
- diagonal_center: sympy.geometry.Point¶
- third_diagonal_meets: tuple[sympy.geometry.Point, sympy.geometry.Point]¶
- cross_ratio_ac: sympy.Expr¶
- cross_ratio_bd: sympy.Expr¶
- class geometor.casey.LaHireSymbolicProof¶
Universal symbolic proof certificate for La Hire’s Reciprocity & Harmonic Secants.
- reciprocity_bilinear_diff: sympy.Expr¶
- secant_cross_ratio: sympy.Expr¶
- verified: bool¶
- class geometor.casey.PolePolarResult¶
Constructed elements for Pole, Polar, Harmonic Secants & La Hire Reciprocity (Unit 4).
- model: geometor.model.Model¶
- circle: sympy.geometry.Circle¶
- center: sympy.geometry.Point¶
- pole_d: sympy.geometry.Point¶
- secant_1_pts: tuple[sympy.geometry.Point, sympy.geometry.Point]¶
- secant_2_pts: tuple[sympy.geometry.Point, sympy.geometry.Point]¶
- self_conjugate_triangle: tuple[sympy.geometry.Point, sympy.geometry.Point, sympy.geometry.Point]¶
- polar_d: sympy.geometry.Line¶
- harmonic_meets: tuple[sympy.geometry.Point, sympy.geometry.Point]¶
- reciprocal_pole_q: sympy.geometry.Point¶
- polar_q: sympy.geometry.Line¶
- cross_ratio_secant_1: sympy.Expr¶
- cross_ratio_secant_2: sympy.Expr¶
- lahire_verified: bool¶
- geometor.casey.construct_complete_quadrilateral_harmonic(model: geometor.model.Model | None = None) CompleteQuadrilateralResult¶
Construct Casey’s Complete Quadrilateral and verify harmonic diagonal division (Unit 3).
Follows Casey, Book VI, Sec. III, Prop. 7 (p. 91) using pure straightedge incidences on exact integer vertices
A=(0, 0), B=(6, 0), C=(4, 2), D=(2, 3):Opposite side meets:
E = [AB] ∩ [CD] = (8, 0)andF = [AD] ∩ [BC] = (12/5, 18/5).Internal diagonal meet:
P = [AC] ∩ [BD] = (18/5, 9/5).Third diagonal
[EF]cuts[AC]atQa = (9/2, 9/4)and[BD]atQb = (-6, 9)such that(A, C; P, Qa) = -1and(B, D; P, Qb) = -1.
- Parameters:
model – Optional existing
Model.- Returns:
Populated
CompleteQuadrilateralResult.
- geometor.casey.construct_pole_and_polar(model: geometor.model.Model | None = None) PolePolarResult¶
Construct the Polar of
Dby straightedge and verify La Hire’s Reciprocity (Unit 4).On circle
(O, R0)withO = (0, 0)andR0 = (5, 0)(x^2 + y^2 = 25):Draws two rational secants cutting the circle in
G1=(0, 5), H1=(4, 3)andG2=(-3, -4), H2=(5, 0), meeting at exterior poleD = (15/2, 5/4).Constructs the remaining diagonal vertices
U = [G1 H2] ∩ [G2 H1] = (3, 2)andV = [G1 G2] ∩ [H1 H2] = (5/3, 10)of the inscribed quadrangle; their join[U V]ispolar(D): 6x + y - 20 = 0, andD U Vis a Self-Conjugate Triangle (Casey, Book VI, Sec. VII, Prop. 2, p. 142).Intersects
polar(D)with both secants atJ1, J2and verifies Casey’s Harmonic Secant Theorem(G1, H1; J1, D) = (G2, H2; J2, D) = -1(Sec. III, Prop. 4, p. 89).Selects exterior point
Q = (4, -4)onpolar(D), constructs its two tangents to(O, 5)by Thales semicircle onOQ, draws chord of contactpolar(Q)(Book III, Prop. 27, p. 47), and asserts La Hire’s ReciprocityD in polar(Q)(Book III, Prop. 25, p. 45).
- Parameters:
model – Optional existing
Model.- Returns:
Populated
PolePolarResult.
- geometor.casey.verify_lahire_reciprocity_symbolic() LaHireSymbolicProof¶
Prove La Hire’s Reciprocity (Book III, Prop. 25) and Harmonic Secant Section (VI.III.4).
For circle
(x - h)^2 + (y - k)^2 = r^2,polar(P)has equation(x1 - h)(x - h) + (y1 - k)(y - k) - r^2 = 0, which is symmetric in(x1, y1)and(x2, y2).For exterior pole
D = (d, 0)on diameter secanty = 0cuttingx^2 + y^2 = r^2atG = (-r, 0), H = (r, 0)with polar footJ = (r^2/d, 0), the anharmonic ratio(G, H; J, D)simplifies identically to-1.
- Returns:
Frozen
LaHireSymbolicProofcertificate.
- geometor.casey.EMBEDDED_SVG_STYLE: str = ''¶
- geometor.casey.export_svg(model: geometor.model.Model, output_path: str | pathlib.Path, *, graphic_id: str = 'g1', title: str = 'Casey Euclidean Circle Construction', width: int = 680, height: int = 480, margin: float = 42.0, bbox: tuple[float, float, float, float] | None = None, focus_points: collections.abc.Sequence[sympy.geometry.Point] | None = None, include_guides: bool = False, show_labels: bool = True, label_overrides: dict[str, tuple[str, str]] | None = None, highlight_point_ids: collections.abc.Sequence[str] | None = None) pathlib.Path¶
Write an interactive
.euclid-graphicSVG rendering ofmodeltooutput_path.- Parameters:
model – Populated
Model.output_path – Destination
.svgfile path.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 viewport.
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 markedguide=True.show_labels – Master toggle for point text labels.
label_overrides – Optional mapping
pt_id -> (base, subscript).highlight_point_ids – Optional point IDs to emphasize with an outer halo ring.
- Returns:
Resolved
pathlib.Pathof the written SVG file.
- geometor.casey.render_svg_string(model: geometor.model.Model, *, graphic_id: str = 'g1', title: str = 'Casey Euclidean Circle Construction', width: int = 680, height: int = 480, margin: float = 42.0, bbox: tuple[float, float, float, float] | None = None, focus_points: collections.abc.Sequence[sympy.geometry.Point] | None = None, include_guides: bool = False, show_labels: bool = True, label_overrides: dict[str, tuple[str, str]] | None = None, highlight_point_ids: collections.abc.Sequence[str] | None = None) str¶
Render a
Modelinto a complete.euclid-graphicSVG 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 viewport.
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 markedguide=True.show_labels – Master toggle for point text labels.
label_overrides – Optional mapping
pt_id -> (base, subscript).highlight_point_ids – Optional point IDs to emphasize with an outer halo ring.
- Returns:
UTF-8 XML/SVG string.
- geometor.casey.__version__ = '0.1.0'¶