Expand description
§monge-rs
A Rust implementation of Monge’s theorem for fleet mathematics, designed to integrate with Forgemaster’s constraint theory (jc1-ct-bridge).
§Overview
Monge’s theorem states that for three circles in the plane, the three external homothetic centers are collinear. This crate implements the theorem and its generalizations, providing:
- Homothetic centers — external and internal for pairs of circles
- Radical axes — as 1-cocycles in Čech cohomology
- Zero Holonomy Consensus — a Lyapunov-based distributed consensus protocol
- Pythagorean48 — zero-drift verification using 48 lattice directions
- nD Lassak generalization — Monge’s theorem in higher dimensions
§Quick Start
use nalgebra::Vector2;
use monge_rs::geometry::Circle;
use monge_rs::homothetic::{external_homothetic_center, monge_collinear_area};
let c1 = Circle::new(Vector2::new(0.0, 0.0), 1.0);
let c2 = Circle::new(Vector2::new(4.0, 0.0), 2.0);
let c3 = Circle::new(Vector2::new(2.0, 3.0), 1.5);
// External homothetic centers
let s12 = external_homothetic_center(&c1, &c2).unwrap();
let s23 = external_homothetic_center(&c2, &c3).unwrap();
let s31 = external_homothetic_center(&c3, &c1).unwrap();
// Verify Monge collinearity (area should be ≈ 0)
let area = monge_collinear_area(&c1, &c2, &c3).unwrap();
assert!(area < 1e-10);§Modules
geometry— foundational types (Circle, Sphere, 3D lifting, nD generalization)homothetic— external and internal homothetic centersradical_axis— radical axis as 1-cocycle, radical centerconsensus— zero holonomy consensus protocolp48— Pythagorean48 verification framework
Modules§
- consensus
- Zero-holonomy consensus — a Lyapunov-based distributed consensus protocol using Monge’s theorem geometry.
- geometry
- Foundational types for Monge geometry — circles in ℝ², spheres in ℝⁿ, 3D lifting (paraboloid map), and n-dimensional Lassak generalization.
- homothetic
- External and internal homothetic centers of circles.
- p48
- Pythagorean48 — a verification framework for zero-drift Monge consistency in 48 lattice directions derived from 6 primitive Pythagorean triples.
- radical_
axis - Radical axis as a 1-cocycle in the Čech cohomology of circle covers.