High-performance 3D coordinate system library with unified differential geometry, quantum frame algebra, and Christmas Equation (CFUT)
Project description
Coordinate System Library
High-performance 3D coordinate system and differential geometry library for Python
Authors: Pan Guojun Version: 7.1.1 License: MIT DOI: https://doi.org/10.5281/zenodo.14435613
What's New in v7.1.1 (2026-02-05)
- Curvature Fast Path: Analytical curvature for Sphere/Torus and any surface providing
derivsoranalytic_KH(toggle viaUSE_ANALYTIC_DERIVS) - Caching: Reuse curvature calculators and last-call results to reduce per-sample overhead
- Math Core: Branchless handedness selection for cross product; optional SIMD alignment via
PMSYS_SIMD_ALIGN - Build Flags: AVX2 / fast-math enabled by default in build config for faster native builds
What's New in v7.1.0 (2026-01-16)
- Physical Constants: Added SI unit constants for precision calculations (ALPHA_FS, LAMBDA_C, ALPHA_PROJECTION)
- Projection Factor: Implemented α = α_fs × λ_c ≈ 1.77×10⁻¹⁴ m for geometry-gauge coupling
- Numerical Verification: New
verify_cfut_theory.pyscript with complete experimental validation - Equation Decomposition: Real/imaginary parts analysis with classical limit verification
- Experimental Comparison: All calculations validated against CODATA 2018 data (error < 10⁻⁹)
- Documentation: Added
VERIFICATION_REPORT.mdwith detailed numerical results
What's New in v7.0.0-alpha (2026-01-14)
- Complex Geometric Physics Module: New
complex_geometric_physicsmodule for field theory calculations - U(3) Frame Implementation: U(3) complex field with real-imaginary decomposition
- Einstein Tensor: Compute Ĝ_μν from complex frame field U(x)
- Chern-Simons Current: Topological current K̄_μ for gauge field analysis
- Energy-Momentum Tensor: Real-imaginary decomposition for matter and topology
- Complete English Translation: All code documentation now in English for worldwide use
Module Structure
coordinate_system/
├── coordinate_system.pyd/.so # C++ core (vec3, quat, coord3)
├── complex_geometric_physics.py # Complex geometric physics module
├── spectral_geometry.py # FourierFrame [GL(1,C)], spectral analysis
├── u3_frame.py # U3Frame [U(3)], gauge field theory
├── differential_geometry.py # Surface curvature calculation
├── visualization.py # 3D visualization
└── curve_interpolation.py # C2-continuous interpolation
Group Correspondence
| Class | Group | DOF | Use Case |
|---|---|---|---|
coord3 |
Sim(3) = R³ ⋊ (SO(3) × R⁺) | 10 | 3D coordinate transform |
FourierFrame |
GL(1,C) = U(1) × R⁺ | 2 | Spectral geometry, heat kernel |
U3Frame |
U(3) = SU(3) × U(1) | 9 | Gauge field theory, gauge transforms |
Installation
pip install coordinate-system
Quick Start
Basic Coordinate System
from coordinate_system import vec3, quat, coord3
# Vector operations
v1 = vec3(1, 2, 3)
v2 = vec3(4, 5, 6)
dot = v1.dot(v2)
cross = v1.cross(v2)
# Quaternion rotation
q = quat(1.5708, vec3(0, 0, 1)) # 90° around Z
rotated = q * v1
# Coordinate transform
frame = coord3.from_angle(1.57, vec3(0, 0, 1))
world_pos = v1 * frame # Local -> World
local_pos = world_pos / frame # World -> Local
Differential Geometry
from coordinate_system import Sphere, compute_gaussian_curvature
sphere = Sphere(radius=1.0)
K = compute_gaussian_curvature(sphere, u=0.5, v=0.5) # K = 1.0
Gaussian Curvature via Lie Bracket: $$K = -\frac{\langle [G_u, G_v] e_v, e_u \rangle}{\sqrt{\det(g)}}$$
Spectral Geometry (FourierFrame)
from coordinate_system import (
FourierFrame, IntrinsicGradient, BerryPhase, ChernNumber, HeatKernel
)
# Create frame field
frame_field = [[FourierFrame(q_factor=1.0 + 0.1j*(i+j))
for j in range(16)] for i in range(16)]
# Intrinsic gradient: G_μ = d/dx^μ log Q
grad_op = IntrinsicGradient(frame_field)
# Berry phase: γ = ∮ G_μ dx^μ
berry = BerryPhase(grad_op)
path = [(4, 4), (4, 12), (12, 12), (12, 4), (4, 4)]
gamma = berry.compute_along_path(path, closed=True)
# Heat kernel trace
heat = HeatKernel(frame_field)
trace = heat.trace(t=0.1)
Gauge Field Theory (U3Frame)
from coordinate_system import U3Frame, GaugeConnection, FieldStrength
import numpy as np
# Create U(3) frame
frame = U3Frame()
# Symmetry decomposition: U(3) = SU(3) × U(1)
su3_comp, u1_phase = frame.to_su3_u1()
# Gauge transforms
frame_u1 = frame.gauge_transform_u1(np.pi/4)
frame_su3 = frame.gauge_transform_su3(np.random.randn(8) * 0.1)
# Gauge connection and field strength
conn_x = GaugeConnection(su3_component=np.random.randn(8) * 0.1)
conn_y = GaugeConnection(su3_component=np.random.randn(8) * 0.1)
F_xy = conn_x.field_strength(conn_y)
# Yang-Mills action
S_YM = F_xy.yang_mills_action()
Key Formulas
| Concept | Formula | Code |
|---|---|---|
| Projection Factor (v7.1.0) | $\alpha = \alpha_{\text{fs}} \times \lambda_c \approx 1.77 \times 10^{-14}$ m | ALPHA_PROJECTION |
| Intrinsic Gradient | $G_\mu = \frac{d}{dx^\mu} \log C(x)$ | IntrinsicGradient |
| Curvature Tensor | $R_{\mu\nu} = [G_\mu, G_\nu]$ | CurvatureFromFrame |
| Gaussian Curvature | $K = -\langle [G_u, G_v] e_v, e_u \rangle / \sqrt{\det g}$ | compute_gaussian_curvature |
| Berry Phase | $\gamma = \oint G_\mu dx^\mu$ | BerryPhase |
| Chern Number | $c_1 = \frac{1}{2\pi} \iint R_{\mu\nu} dS$ | ChernNumber |
| Heat Kernel | $\text{Tr}(e^{t\Delta}) \sim (4\pi t)^{-d/2} \sum_k a_k t^k$ | HeatKernel |
| Yang-Mills Action | $S = -\frac{1}{4g^2} \text{Tr}(F_{\mu\nu} F^{\mu\nu})$ | FieldStrength.yang_mills_action() |
FourierFrame vs U3Frame
| Property | FourierFrame | U3Frame |
|---|---|---|
| Group | GL(1,C) = C× | U(3) |
| DOF | 2 (phase + magnitude) | 9 (unitary matrix) |
| Use Case | Spectral analysis, heat kernel | Gauge field theory |
| Fourier Transform | fourier_transform(θ) |
gauge_transform_u1(θ) |
| Conformal Transform | conformal_transform(λ) |
Not supported |
| SU(3) Transform | Not supported | gauge_transform_su3(...) |
Performance
| Operation | Ops/second |
|---|---|
| Vector addition | 5,200,000 |
| Quaternion rotation | 1,800,000 |
| Gaussian curvature | 85,000 |
| Spectral transform (GPU) | 12,000 |
Changelog
v7.1.1 (2026-02-05)
- Curvature Fast Path: Analytical curvature for analytic surfaces with optional toggle
- Caching: Curvature calculator reuse and last-call caching for repeated samples
- Math Core: Branchless cross product handedness selection
- Build: AVX2 / fast-math flags enabled by default for native builds
v7.1.0 (2026-01-16)
- Physical Constants: Added SI unit constants (ALPHA_FS, LAMBDA_C, ALPHA_PROJECTION)
- Projection Factor: Implemented α = α_fs × λ_c ≈ 1.77×10⁻¹⁴ m for geometry-gauge coupling
- Complex Geometric Physics: Added
projection_factorparameter to unified field solver - Numerical Verification: New
verify_cfut_theory.pyscript with complete validation - Equation Decomposition: Real/imaginary parts analysis with classical limit verification
- Experimental Validation: All calculations compared with CODATA 2018 data (error < 10⁻⁹)
- Documentation: Added
VERIFICATION_REPORT.mdwith detailed numerical results - Bug Fix: Corrected Compton wavelength calculation (h instead of ℏ)
v7.0.0-alpha (2026-01-14)
- Complex Geometric Physics Module: New
complex_geometric_physics.pymodule - U(3) Frame Implementation: U(3) complex field with real-imaginary decomposition
- U3Frame: U(x) = U^(R)(x) + iU^(I)(x) decomposition
- EnergyMomentumTensor: Real-imaginary tensor decomposition
- Unified Field Solver: Einstein tensor, Chern-Simons current, topological energy-momentum
- Complete English Translation: All documentation and code comments in English
- DOI: https://doi.org/10.5281/zenodo.14435613
v6.0.4 (2025-12-08)
frames.py→spectral_geometry.py- Removed
fourier_spectral.py - Unified theory documentation
v6.0.3 (2025-12-04)
- U3Frame: U(3) unitary frame
- GaugeConnection, FieldStrength
v6.0.1 (2025-12-04)
- FourierFrame spectral geometry
- Berry phase, Chern number, heat kernel
License
MIT License - Copyright (c) 2024-2025 PanGuoJun
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coordinate_system-7.1.1.tar.gz.
File metadata
- Download URL: coordinate_system-7.1.1.tar.gz
- Upload date:
- Size: 84.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4c3603a20fcdf61786b7d39f186581dd5280d53978954abbb80d17837a5dde4
|
|
| MD5 |
55ebf722e484b2c2e0414faacf1a40e0
|
|
| BLAKE2b-256 |
cdea903c81cb019b590c1a200e6573911a3da78dbd0dac67c9e6bd64067c4608
|
File details
Details for the file coordinate_system-7.1.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: coordinate_system-7.1.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 217.2 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2467031cdae937ac69a792644eb2aaf65b3fb12bb958cba273720aca0bac4226
|
|
| MD5 |
1ac9aea82d4f3617ff5fc56db2389e4e
|
|
| BLAKE2b-256 |
773a9b152a963fe875c06b771d69c047b2097d8f630bd4a552fec878afc08cc0
|