| Crates.io | gemphy |
| lib.rs | gemphy |
| version | 0.2.2 |
| created_at | 2025-12-28 21:49:11.055945+00 |
| updated_at | 2026-01-01 08:12:41.007711+00 |
| description | GEM Physics: Derives physical constants from geometric impedance in a horn torus vacuum. |
| homepage | |
| repository | https://github.com/troydeville/gemphy |
| max_upload_size | |
| id | 2009451 |
| size | 113,738 |
The GEM Framework is a Rust library that models reality as a single Geometric Encoded Medium. It posits that space-time is a medium with intrinsic impedance ($Z_p$) and a Horn Torus topology. All physical phenomena—Gravity, Electromagnetism, Mass, and Charge—are derived as specific "encodings" on this geometric hardware.
Unlike traditional physics engines that rely on curve-fitting or arbitrary constants, GEM derives fundamental values like Newton's Gravitational Constant ($G$), the Fine Structure Constant ($\alpha$), and the Proton Radius from first-principles geometric axioms.
In GEM, the universe operates as a geometric circuit:
| Milestone | Tasks |
|---|---|
| v0.3 | Add horn torus simulation; enhanced orbit sims (hydrogen, muonic, neutron star) |
| v0.4 | Interactive CLI; Python bindings; initial multi-body support |
| v0.5 | gemphy-web deployment with live visualizations; basic n-body examples (e.g., Sun-Earth-Moon) |
| v1.0 | Full predictions (e.g., dark matter as impedance, novel deviations in fine structure); arXiv preprint with derivations |
| Milestone | Tasks |
|---|---|
| v0.3 | Add horn torus simulation |
| v0.4 | Interactive CLI |
| v1.0 | Full predictions (e.g., dark matter as impedance) |
[dependencies]
gemphy = "0.2.2"
Note: Re-exports Complex64 from num-complex.
cargo run --bin orbit_sim
cargo run --bin electron_proton_action
cargo run --bin muon_proton_action
cargo run --bin neutron_star_action
GEMPHY handles the "Dynamic Stability" of orbits by calculating the interaction between geometric knots.
use gemphy::{knot::GeometricKnot, medium::{GAMMA_P, GeometricEncodedMedium}};
use physical_constants::{ELECTRON_MASS, PROTON_MASS, ELEMENTARY_CHARGE};
fn main() {
let m1 = ELECTRON_MASS;
let m2 = PROTON_MASS;
let medium = GeometricEncodedMedium::new();
// Setup Particles as Geometric Knots
let electron = GeometricKnot::new(medium.clone(), m1, &[-1.0], 0.0, "Electron");
let proton = GeometricKnot::new(medium.clone(), m2, &[1.0], 0.0, "Proton");
let rg1 = (GAMMA_P / (electron.mass * medium.alpha)).powi(2);
let rg2 = (GAMMA_P / (proton.mass * medium.alpha)).powi(2);
let d = (rg1+rg2).sqrt();
let interaction = medium.calculate_interaction(&electron, &proton, d.into());
println!("Result: {:#?}", interaction);
println!("Er (eV): {:#?}", interaction.er1.norm()/ ELEMENTARY_CHARGE);
println!("Ei (eV): {:#?}", interaction.ei1.norm()/ ELEMENTARY_CHARGE);
println!("E (eV): {:#?}", interaction.binding_energy.norm()/ ELEMENTARY_CHARGE);
}
The framework uses a fundamental geometric normalization constant to bridge the subatomic and cosmic scales:
Normalization Constant ($S$): $$({4 \pi})^{1/4} \approx 1.8827925275534296$$
Mass-Charge Metric ($\phi$): $$\phi = 10^4 \text{ kg}^2 \text{ m}^{-2} \text{ s}^2 \text{ C}^{-2}$$
Magnetic Scaling ($\Phi$): $$\Phi = \frac{1}{10^7} \text{ H/m}$$
Primary Impedance ($Z_p$): $$Z_p = \frac{2h}{e^2} \Omega$$
Primary Fine Structure ($\alpha_p $): $$\alpha_p = \frac{4\pi c}{Z_p}$$
Fine Structure ($\alpha $): $$\alpha = \frac{4\pi c}{Z_p} \Phi$$
Impedance ($Z_p$, $Z_o$): $$\alpha Z_p \implies Z_0$$
GEM derives $G$ as a result of geometric impedance scaling rather than an empirical measurement: Where $Z_0$ is the vacuum impedance and $S$ is the geometric shape factor: $$ G = \frac{Z_0}{c S \phi} [\frac{m^3}{kg s^2}] $$
A complex rotation relating field geometry to mass-charge equivalence. ($\Xi$) $$\Xi = \sqrt{4\pi \sqrt{2} G \epsilon_0} \left( \cos\frac{\pi}{8} - i \sin\frac{\pi}{8} \right)[C/kg]$$
Force is calculated as a complex vector.
Energy interaction in GEM is calculated as the sum of two body-specific complex potentials. Each potential represents the geometric "tension" localized to that body within the medium:
The relationship between $E_r$ and $E_i$ is intrinsically linked by the medium's impedance. As distance or energy density changes, these values rotate in the complex plane, representing the transition from linear work to orbital/spin action.
The provided HornTorusManifold component (for Three.js/React) is a Raw Scientific Viewer designed to mirror the Rust engine's output:
Complex64 results of the physical interaction. If the engine calculates zero energy, the manifold remains stagnant.Licensed under the MIT License.
Scientific Attribution: If you use GEMPHY in a research paper or commercial simulation, please cite the framework to preserve the geometric integrity of the medium.