coordinate-system 6.0.3__tar.gz → 6.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- coordinate_system-6.0.5/PKG-INFO +244 -0
- coordinate_system-6.0.5/README.md +202 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/coordinate_system/__init__.py +21 -19
- coordinate_system-6.0.5/coordinate_system.egg-info/PKG-INFO +244 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/coordinate_system.egg-info/SOURCES.txt +1 -2
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/setup.py +2 -2
- coordinate_system-6.0.3/PKG-INFO +0 -1001
- coordinate_system-6.0.3/README.md +0 -959
- coordinate_system-6.0.3/coordinate_system/fourier_spectral.py +0 -149
- coordinate_system-6.0.3/coordinate_system.egg-info/PKG-INFO +0 -1001
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/LICENSE +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/MANIFEST.in +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/coordinate_system/curve_interpolation.py +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/coordinate_system/differential_geometry.py +0 -0
- /coordinate_system-6.0.3/coordinate_system/frames.py → /coordinate_system-6.0.5/coordinate_system/spectral_geometry.py +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/coordinate_system/u3_frame.py +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/coordinate_system/visualization.py +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/coordinate_system.egg-info/dependency_links.txt +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/coordinate_system.egg-info/not-zip-safe +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/coordinate_system.egg-info/requires.txt +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/coordinate_system.egg-info/top_level.txt +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/coordinate_system_binding.cpp +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/pmsys_minimal.hpp +0 -0
- {coordinate_system-6.0.3 → coordinate_system-6.0.5}/setup.cfg +0 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: coordinate_system
|
|
3
|
+
Version: 6.0.5
|
|
4
|
+
Summary: High-performance 3D coordinate system library with unified differential geometry, quantum frame algebra, spectral transforms, and professional curvature visualization
|
|
5
|
+
Home-page: https://github.com/panguojun/Coordinate-System
|
|
6
|
+
Author: PanGuoJun
|
|
7
|
+
Author-email: 18858146@qq.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Bug Reports, https://github.com/panguojun/Coordinate-System/issues
|
|
10
|
+
Project-URL: Source, https://github.com/panguojun/Coordinate-System
|
|
11
|
+
Project-URL: Documentation, https://github.com/panguojun/Coordinate-System/blob/main/README.md
|
|
12
|
+
Keywords: 3d math vector quaternion coordinate-system geometry graphics spatial-computing differential-geometry curvature curve-interpolation c2-continuity frenet-frames fourier-transform operator-overloading quantum-coordinates heisenberg-uncertainty visualization rgb-frames catmull-rom squad intrinsic-gradient spectral-analysis surface-visualization
|
|
13
|
+
Platform: Windows
|
|
14
|
+
Platform: Linux
|
|
15
|
+
Platform: macOS
|
|
16
|
+
Platform: Android
|
|
17
|
+
Platform: iOS
|
|
18
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
19
|
+
Classifier: Intended Audience :: Developers
|
|
20
|
+
Classifier: Intended Audience :: Science/Research
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
23
|
+
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
|
|
24
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
25
|
+
Classifier: Programming Language :: Python :: 3
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
29
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
30
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
31
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
32
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
33
|
+
Classifier: Programming Language :: C++
|
|
34
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
35
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
36
|
+
Classifier: Operating System :: MacOS
|
|
37
|
+
Requires-Python: >=3.7
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
License-File: LICENSE
|
|
40
|
+
Requires-Dist: numpy>=1.19.0
|
|
41
|
+
Requires-Dist: matplotlib>=3.3.0
|
|
42
|
+
|
|
43
|
+
# Coordinate System Library
|
|
44
|
+
|
|
45
|
+
**High-performance 3D coordinate system and differential geometry library for Python**
|
|
46
|
+
|
|
47
|
+
[](https://pypi.org/project/coordinate-system/)
|
|
48
|
+
[](https://pypi.org/project/coordinate-system/)
|
|
49
|
+
[](LICENSE)
|
|
50
|
+
|
|
51
|
+
**Author:** PanGuoJun
|
|
52
|
+
**Version:** 6.0.4
|
|
53
|
+
**License:** MIT
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## What's New in v6.0.4 (2025-12-08)
|
|
58
|
+
|
|
59
|
+
- **File Restructure**: `frames.py` → `spectral_geometry.py`, removed redundant `fourier_spectral.py`
|
|
60
|
+
- **Unified Documentation**: Complete "Complex Frame Field Algebra" theory document
|
|
61
|
+
- **Gaussian Curvature**: Unified to intrinsic gradient / Lie bracket method
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Module Structure
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
coordinate_system/
|
|
69
|
+
├── coordinate_system.pyd/.so # C++ core (vec3, quat, coord3)
|
|
70
|
+
├── spectral_geometry.py # FourierFrame [GL(1,C)], spectral analysis
|
|
71
|
+
├── u3_frame.py # U3Frame [U(3)], gauge field theory
|
|
72
|
+
├── differential_geometry.py # Surface curvature calculation
|
|
73
|
+
├── visualization.py # 3D visualization
|
|
74
|
+
└── curve_interpolation.py # C2-continuous interpolation
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Group Correspondence
|
|
78
|
+
|
|
79
|
+
| Class | Group | DOF | Use Case |
|
|
80
|
+
|-------|-------|-----|----------|
|
|
81
|
+
| `coord3` | Sim(3) = R³ ⋊ (SO(3) × R⁺) | 10 | 3D coordinate transform |
|
|
82
|
+
| `FourierFrame` | GL(1,C) = U(1) × R⁺ | 2 | Spectral geometry, heat kernel |
|
|
83
|
+
| `U3Frame` | U(3) = SU(3) × U(1) | 9 | Gauge field theory |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Installation
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pip install coordinate-system
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Quick Start
|
|
96
|
+
|
|
97
|
+
### Basic Coordinate System
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
from coordinate_system import vec3, quat, coord3
|
|
101
|
+
|
|
102
|
+
# Vector operations
|
|
103
|
+
v1 = vec3(1, 2, 3)
|
|
104
|
+
v2 = vec3(4, 5, 6)
|
|
105
|
+
dot = v1.dot(v2)
|
|
106
|
+
cross = v1.cross(v2)
|
|
107
|
+
|
|
108
|
+
# Quaternion rotation
|
|
109
|
+
q = quat(1.5708, vec3(0, 0, 1)) # 90° around Z
|
|
110
|
+
rotated = q * v1
|
|
111
|
+
|
|
112
|
+
# Coordinate transform
|
|
113
|
+
frame = coord3.from_angle(1.57, vec3(0, 0, 1))
|
|
114
|
+
world_pos = v1 * frame # Local -> World
|
|
115
|
+
local_pos = world_pos / frame # World -> Local
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Differential Geometry
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
from coordinate_system import Sphere, compute_gaussian_curvature
|
|
122
|
+
|
|
123
|
+
sphere = Sphere(radius=1.0)
|
|
124
|
+
K = compute_gaussian_curvature(sphere, u=0.5, v=0.5) # K = 1.0
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Gaussian Curvature via Lie Bracket:**
|
|
128
|
+
$$K = -\frac{\langle [G_u, G_v] e_v, e_u \rangle}{\sqrt{\det(g)}}$$
|
|
129
|
+
|
|
130
|
+
### Spectral Geometry (FourierFrame)
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
from coordinate_system import (
|
|
134
|
+
FourierFrame, IntrinsicGradient, BerryPhase, ChernNumber, HeatKernel
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
# Create frame field
|
|
138
|
+
frame_field = [[FourierFrame(q_factor=1.0 + 0.1j*(i+j))
|
|
139
|
+
for j in range(16)] for i in range(16)]
|
|
140
|
+
|
|
141
|
+
# Intrinsic gradient: G_μ = d/dx^μ log Q
|
|
142
|
+
grad_op = IntrinsicGradient(frame_field)
|
|
143
|
+
|
|
144
|
+
# Berry phase: γ = ∮ G_μ dx^μ
|
|
145
|
+
berry = BerryPhase(grad_op)
|
|
146
|
+
path = [(4, 4), (4, 12), (12, 12), (12, 4), (4, 4)]
|
|
147
|
+
gamma = berry.compute_along_path(path, closed=True)
|
|
148
|
+
|
|
149
|
+
# Heat kernel trace
|
|
150
|
+
heat = HeatKernel(frame_field)
|
|
151
|
+
trace = heat.trace(t=0.1)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Gauge Field Theory (U3Frame)
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
from coordinate_system import U3Frame, GaugeConnection, FieldStrength
|
|
158
|
+
import numpy as np
|
|
159
|
+
|
|
160
|
+
# Create U(3) frame
|
|
161
|
+
frame = U3Frame()
|
|
162
|
+
|
|
163
|
+
# Symmetry decomposition: U(3) = SU(3) × U(1)
|
|
164
|
+
su3_comp, u1_phase = frame.to_su3_u1()
|
|
165
|
+
|
|
166
|
+
# Gauge transforms
|
|
167
|
+
frame_u1 = frame.gauge_transform_u1(np.pi/4)
|
|
168
|
+
frame_su3 = frame.gauge_transform_su3(np.random.randn(8) * 0.1)
|
|
169
|
+
|
|
170
|
+
# Gauge connection and field strength
|
|
171
|
+
conn_x = GaugeConnection(su3_component=np.random.randn(8) * 0.1)
|
|
172
|
+
conn_y = GaugeConnection(su3_component=np.random.randn(8) * 0.1)
|
|
173
|
+
F_xy = conn_x.field_strength(conn_y)
|
|
174
|
+
|
|
175
|
+
# Yang-Mills action
|
|
176
|
+
S_YM = F_xy.yang_mills_action()
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Key Formulas
|
|
182
|
+
|
|
183
|
+
| Concept | Formula | Code |
|
|
184
|
+
|---------|---------|------|
|
|
185
|
+
| Intrinsic Gradient | $G_\mu = \frac{d}{dx^\mu} \log C(x)$ | `IntrinsicGradient` |
|
|
186
|
+
| Curvature Tensor | $R_{\mu\nu} = [G_\mu, G_\nu]$ | `CurvatureFromFrame` |
|
|
187
|
+
| Gaussian Curvature | $K = -\langle [G_u, G_v] e_v, e_u \rangle / \sqrt{\det g}$ | `compute_gaussian_curvature` |
|
|
188
|
+
| Berry Phase | $\gamma = \oint G_\mu dx^\mu$ | `BerryPhase` |
|
|
189
|
+
| Chern Number | $c_1 = \frac{1}{2\pi} \iint R_{\mu\nu} dS$ | `ChernNumber` |
|
|
190
|
+
| Heat Kernel | $\text{Tr}(e^{t\Delta}) \sim (4\pi t)^{-d/2} \sum_k a_k t^k$ | `HeatKernel` |
|
|
191
|
+
| Yang-Mills Action | $S = -\frac{1}{4g^2} \text{Tr}(F_{\mu\nu} F^{\mu\nu})$ | `FieldStrength.yang_mills_action()` |
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## FourierFrame vs U3Frame
|
|
196
|
+
|
|
197
|
+
| Property | FourierFrame | U3Frame |
|
|
198
|
+
|----------|--------------|---------|
|
|
199
|
+
| **Group** | GL(1,C) = C× | U(3) |
|
|
200
|
+
| **DOF** | 2 (phase + magnitude) | 9 (unitary matrix) |
|
|
201
|
+
| **Use Case** | Spectral analysis, heat kernel | Gauge field theory |
|
|
202
|
+
| **Fourier Transform** | `fourier_transform(θ)` | `gauge_transform_u1(θ)` |
|
|
203
|
+
| **Conformal Transform** | `conformal_transform(λ)` | Not supported |
|
|
204
|
+
| **SU(3) Transform** | Not supported | `gauge_transform_su3(...)` |
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Performance
|
|
209
|
+
|
|
210
|
+
| Operation | Ops/second |
|
|
211
|
+
|-----------|-----------|
|
|
212
|
+
| Vector addition | 5,200,000 |
|
|
213
|
+
| Quaternion rotation | 1,800,000 |
|
|
214
|
+
| Gaussian curvature | 85,000 |
|
|
215
|
+
| Spectral transform (GPU) | 12,000 |
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Changelog
|
|
220
|
+
|
|
221
|
+
### v6.0.4 (2025-12-08)
|
|
222
|
+
- `frames.py` → `spectral_geometry.py`
|
|
223
|
+
- Removed `fourier_spectral.py`
|
|
224
|
+
- Unified theory documentation
|
|
225
|
+
|
|
226
|
+
### v6.0.3 (2025-12-04)
|
|
227
|
+
- U3Frame: U(3) unitary frame
|
|
228
|
+
- GaugeConnection, FieldStrength
|
|
229
|
+
|
|
230
|
+
### v6.0.1 (2025-12-04)
|
|
231
|
+
- FourierFrame spectral geometry
|
|
232
|
+
- Berry phase, Chern number, heat kernel
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## License
|
|
237
|
+
|
|
238
|
+
MIT License - Copyright (c) 2024-2025 PanGuoJun
|
|
239
|
+
|
|
240
|
+
## Links
|
|
241
|
+
|
|
242
|
+
- **PyPI**: https://pypi.org/project/coordinate-system/
|
|
243
|
+
- **GitHub**: https://github.com/panguojun/Coordinate-System
|
|
244
|
+
- **Email**: 18858146@qq.com
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Coordinate System Library
|
|
2
|
+
|
|
3
|
+
**High-performance 3D coordinate system and differential geometry library for Python**
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/coordinate-system/)
|
|
6
|
+
[](https://pypi.org/project/coordinate-system/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
**Author:** PanGuoJun
|
|
10
|
+
**Version:** 6.0.4
|
|
11
|
+
**License:** MIT
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## What's New in v6.0.4 (2025-12-08)
|
|
16
|
+
|
|
17
|
+
- **File Restructure**: `frames.py` → `spectral_geometry.py`, removed redundant `fourier_spectral.py`
|
|
18
|
+
- **Unified Documentation**: Complete "Complex Frame Field Algebra" theory document
|
|
19
|
+
- **Gaussian Curvature**: Unified to intrinsic gradient / Lie bracket method
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Module Structure
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
coordinate_system/
|
|
27
|
+
├── coordinate_system.pyd/.so # C++ core (vec3, quat, coord3)
|
|
28
|
+
├── spectral_geometry.py # FourierFrame [GL(1,C)], spectral analysis
|
|
29
|
+
├── u3_frame.py # U3Frame [U(3)], gauge field theory
|
|
30
|
+
├── differential_geometry.py # Surface curvature calculation
|
|
31
|
+
├── visualization.py # 3D visualization
|
|
32
|
+
└── curve_interpolation.py # C2-continuous interpolation
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Group Correspondence
|
|
36
|
+
|
|
37
|
+
| Class | Group | DOF | Use Case |
|
|
38
|
+
|-------|-------|-----|----------|
|
|
39
|
+
| `coord3` | Sim(3) = R³ ⋊ (SO(3) × R⁺) | 10 | 3D coordinate transform |
|
|
40
|
+
| `FourierFrame` | GL(1,C) = U(1) × R⁺ | 2 | Spectral geometry, heat kernel |
|
|
41
|
+
| `U3Frame` | U(3) = SU(3) × U(1) | 9 | Gauge field theory |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install coordinate-system
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Quick Start
|
|
54
|
+
|
|
55
|
+
### Basic Coordinate System
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from coordinate_system import vec3, quat, coord3
|
|
59
|
+
|
|
60
|
+
# Vector operations
|
|
61
|
+
v1 = vec3(1, 2, 3)
|
|
62
|
+
v2 = vec3(4, 5, 6)
|
|
63
|
+
dot = v1.dot(v2)
|
|
64
|
+
cross = v1.cross(v2)
|
|
65
|
+
|
|
66
|
+
# Quaternion rotation
|
|
67
|
+
q = quat(1.5708, vec3(0, 0, 1)) # 90° around Z
|
|
68
|
+
rotated = q * v1
|
|
69
|
+
|
|
70
|
+
# Coordinate transform
|
|
71
|
+
frame = coord3.from_angle(1.57, vec3(0, 0, 1))
|
|
72
|
+
world_pos = v1 * frame # Local -> World
|
|
73
|
+
local_pos = world_pos / frame # World -> Local
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Differential Geometry
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from coordinate_system import Sphere, compute_gaussian_curvature
|
|
80
|
+
|
|
81
|
+
sphere = Sphere(radius=1.0)
|
|
82
|
+
K = compute_gaussian_curvature(sphere, u=0.5, v=0.5) # K = 1.0
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Gaussian Curvature via Lie Bracket:**
|
|
86
|
+
$$K = -\frac{\langle [G_u, G_v] e_v, e_u \rangle}{\sqrt{\det(g)}}$$
|
|
87
|
+
|
|
88
|
+
### Spectral Geometry (FourierFrame)
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
from coordinate_system import (
|
|
92
|
+
FourierFrame, IntrinsicGradient, BerryPhase, ChernNumber, HeatKernel
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
# Create frame field
|
|
96
|
+
frame_field = [[FourierFrame(q_factor=1.0 + 0.1j*(i+j))
|
|
97
|
+
for j in range(16)] for i in range(16)]
|
|
98
|
+
|
|
99
|
+
# Intrinsic gradient: G_μ = d/dx^μ log Q
|
|
100
|
+
grad_op = IntrinsicGradient(frame_field)
|
|
101
|
+
|
|
102
|
+
# Berry phase: γ = ∮ G_μ dx^μ
|
|
103
|
+
berry = BerryPhase(grad_op)
|
|
104
|
+
path = [(4, 4), (4, 12), (12, 12), (12, 4), (4, 4)]
|
|
105
|
+
gamma = berry.compute_along_path(path, closed=True)
|
|
106
|
+
|
|
107
|
+
# Heat kernel trace
|
|
108
|
+
heat = HeatKernel(frame_field)
|
|
109
|
+
trace = heat.trace(t=0.1)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Gauge Field Theory (U3Frame)
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
from coordinate_system import U3Frame, GaugeConnection, FieldStrength
|
|
116
|
+
import numpy as np
|
|
117
|
+
|
|
118
|
+
# Create U(3) frame
|
|
119
|
+
frame = U3Frame()
|
|
120
|
+
|
|
121
|
+
# Symmetry decomposition: U(3) = SU(3) × U(1)
|
|
122
|
+
su3_comp, u1_phase = frame.to_su3_u1()
|
|
123
|
+
|
|
124
|
+
# Gauge transforms
|
|
125
|
+
frame_u1 = frame.gauge_transform_u1(np.pi/4)
|
|
126
|
+
frame_su3 = frame.gauge_transform_su3(np.random.randn(8) * 0.1)
|
|
127
|
+
|
|
128
|
+
# Gauge connection and field strength
|
|
129
|
+
conn_x = GaugeConnection(su3_component=np.random.randn(8) * 0.1)
|
|
130
|
+
conn_y = GaugeConnection(su3_component=np.random.randn(8) * 0.1)
|
|
131
|
+
F_xy = conn_x.field_strength(conn_y)
|
|
132
|
+
|
|
133
|
+
# Yang-Mills action
|
|
134
|
+
S_YM = F_xy.yang_mills_action()
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Key Formulas
|
|
140
|
+
|
|
141
|
+
| Concept | Formula | Code |
|
|
142
|
+
|---------|---------|------|
|
|
143
|
+
| Intrinsic Gradient | $G_\mu = \frac{d}{dx^\mu} \log C(x)$ | `IntrinsicGradient` |
|
|
144
|
+
| Curvature Tensor | $R_{\mu\nu} = [G_\mu, G_\nu]$ | `CurvatureFromFrame` |
|
|
145
|
+
| Gaussian Curvature | $K = -\langle [G_u, G_v] e_v, e_u \rangle / \sqrt{\det g}$ | `compute_gaussian_curvature` |
|
|
146
|
+
| Berry Phase | $\gamma = \oint G_\mu dx^\mu$ | `BerryPhase` |
|
|
147
|
+
| Chern Number | $c_1 = \frac{1}{2\pi} \iint R_{\mu\nu} dS$ | `ChernNumber` |
|
|
148
|
+
| Heat Kernel | $\text{Tr}(e^{t\Delta}) \sim (4\pi t)^{-d/2} \sum_k a_k t^k$ | `HeatKernel` |
|
|
149
|
+
| Yang-Mills Action | $S = -\frac{1}{4g^2} \text{Tr}(F_{\mu\nu} F^{\mu\nu})$ | `FieldStrength.yang_mills_action()` |
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## FourierFrame vs U3Frame
|
|
154
|
+
|
|
155
|
+
| Property | FourierFrame | U3Frame |
|
|
156
|
+
|----------|--------------|---------|
|
|
157
|
+
| **Group** | GL(1,C) = C× | U(3) |
|
|
158
|
+
| **DOF** | 2 (phase + magnitude) | 9 (unitary matrix) |
|
|
159
|
+
| **Use Case** | Spectral analysis, heat kernel | Gauge field theory |
|
|
160
|
+
| **Fourier Transform** | `fourier_transform(θ)` | `gauge_transform_u1(θ)` |
|
|
161
|
+
| **Conformal Transform** | `conformal_transform(λ)` | Not supported |
|
|
162
|
+
| **SU(3) Transform** | Not supported | `gauge_transform_su3(...)` |
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Performance
|
|
167
|
+
|
|
168
|
+
| Operation | Ops/second |
|
|
169
|
+
|-----------|-----------|
|
|
170
|
+
| Vector addition | 5,200,000 |
|
|
171
|
+
| Quaternion rotation | 1,800,000 |
|
|
172
|
+
| Gaussian curvature | 85,000 |
|
|
173
|
+
| Spectral transform (GPU) | 12,000 |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Changelog
|
|
178
|
+
|
|
179
|
+
### v6.0.4 (2025-12-08)
|
|
180
|
+
- `frames.py` → `spectral_geometry.py`
|
|
181
|
+
- Removed `fourier_spectral.py`
|
|
182
|
+
- Unified theory documentation
|
|
183
|
+
|
|
184
|
+
### v6.0.3 (2025-12-04)
|
|
185
|
+
- U3Frame: U(3) unitary frame
|
|
186
|
+
- GaugeConnection, FieldStrength
|
|
187
|
+
|
|
188
|
+
### v6.0.1 (2025-12-04)
|
|
189
|
+
- FourierFrame spectral geometry
|
|
190
|
+
- Berry phase, Chern number, heat kernel
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## License
|
|
195
|
+
|
|
196
|
+
MIT License - Copyright (c) 2024-2025 PanGuoJun
|
|
197
|
+
|
|
198
|
+
## Links
|
|
199
|
+
|
|
200
|
+
- **PyPI**: https://pypi.org/project/coordinate-system/
|
|
201
|
+
- **GitHub**: https://github.com/panguojun/Coordinate-System
|
|
202
|
+
- **Email**: 18858146@qq.com
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
# coordinate_system/__init__.py
|
|
2
2
|
"""
|
|
3
|
-
Coordinate System
|
|
3
|
+
Coordinate System Library
|
|
4
4
|
=========================
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
High-performance 3D coordinate system and differential geometry library.
|
|
7
7
|
|
|
8
|
-
Core Components:
|
|
8
|
+
Core Components (C++ Layer):
|
|
9
9
|
- vec3, vec2: Vector types
|
|
10
|
-
- quat: Quaternion for rotations
|
|
11
|
-
- coord3: 3D coordinate frame
|
|
10
|
+
- quat: Quaternion for rotations (SU(2))
|
|
11
|
+
- coord3: 3D coordinate frame (Sim(3) group)
|
|
12
12
|
|
|
13
|
-
Modules:
|
|
14
|
-
- differential_geometry: Surface curvature
|
|
15
|
-
-
|
|
13
|
+
Python Modules:
|
|
14
|
+
- differential_geometry: Surface curvature via intrinsic gradient / Lie bracket
|
|
15
|
+
- spectral_geometry: FourierFrame (GL(1,C)), spectral analysis, heat kernel
|
|
16
|
+
- u3_frame: U3Frame (U(3)), gauge field theory, symmetry breaking
|
|
16
17
|
- visualization: Coordinate system visualization
|
|
17
|
-
- curve_interpolation:
|
|
18
|
+
- curve_interpolation: C2-continuous curve and frame interpolation
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
Group Correspondence:
|
|
21
|
+
- coord3 ∈ Sim(3) = R³ ⋊ (SO(3) × R⁺)
|
|
22
|
+
- FourierFrame ∈ GL(1,C) = U(1) × R⁺
|
|
23
|
+
- U3Frame ∈ U(3) = SU(3) × U(1)
|
|
24
|
+
|
|
25
|
+
Version: 6.0.4
|
|
20
26
|
"""
|
|
21
27
|
|
|
22
|
-
__version__ = '6.0.
|
|
28
|
+
__version__ = '6.0.4'
|
|
23
29
|
|
|
24
30
|
from .coordinate_system import vec3, vec2
|
|
25
31
|
from .coordinate_system import quat
|
|
@@ -67,8 +73,8 @@ from .differential_geometry import (
|
|
|
67
73
|
richardson_extrapolation,
|
|
68
74
|
)
|
|
69
75
|
|
|
70
|
-
#
|
|
71
|
-
from .
|
|
76
|
+
# Spectral geometry module (FourierFrame, GL(1,C) group)
|
|
77
|
+
from .spectral_geometry import (
|
|
72
78
|
# Core classes
|
|
73
79
|
FourierFrame,
|
|
74
80
|
FourierFrameSpectrum,
|
|
@@ -92,7 +98,7 @@ from .frames import (
|
|
|
92
98
|
GPU_AVAILABLE,
|
|
93
99
|
)
|
|
94
100
|
|
|
95
|
-
# U(3) Frame module (
|
|
101
|
+
# U(3) Frame module (U(3) group, gauge field theory)
|
|
96
102
|
from .u3_frame import (
|
|
97
103
|
# Core U(3) classes
|
|
98
104
|
U3Frame,
|
|
@@ -104,9 +110,6 @@ from .u3_frame import (
|
|
|
104
110
|
|
|
105
111
|
# Symmetry breaking
|
|
106
112
|
SymmetryBreakingPotential,
|
|
107
|
-
|
|
108
|
-
# Constants
|
|
109
|
-
C_SPEED,
|
|
110
113
|
)
|
|
111
114
|
|
|
112
115
|
# Visualization module
|
|
@@ -162,7 +165,7 @@ __all__ = [
|
|
|
162
165
|
'compare_methods',
|
|
163
166
|
'derivative_5pt', 'derivative_2nd_5pt', 'richardson_extrapolation',
|
|
164
167
|
|
|
165
|
-
#
|
|
168
|
+
# Spectral geometry module (FourierFrame, GL(1,C))
|
|
166
169
|
'FourierFrame', 'FourierFrameSpectrum',
|
|
167
170
|
'IntrinsicGradient', 'CurvatureFromFrame', 'BerryPhase', 'ChernNumber',
|
|
168
171
|
'SpectralDecomposition', 'HeatKernel', 'FrequencyProjection', 'FrequencyBandState',
|
|
@@ -173,7 +176,6 @@ __all__ = [
|
|
|
173
176
|
'U3Frame', 'SU3Component',
|
|
174
177
|
'GaugeConnection', 'FieldStrength',
|
|
175
178
|
'SymmetryBreakingPotential',
|
|
176
|
-
'C_SPEED',
|
|
177
179
|
|
|
178
180
|
# Visualization
|
|
179
181
|
'CoordinateSystemVisualizer', 'CurveVisualizer', 'ParametricCurve',
|