coordinate-system 2.4.0__cp313-cp313-win_amd64.whl → 2.4.2__cp313-cp313-win_amd64.whl
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/coordinate_system.cp313-win_amd64.pyd +0 -0
- {coordinate_system-2.4.0.dist-info → coordinate_system-2.4.2.dist-info}/METADATA +2 -150
- {coordinate_system-2.4.0.dist-info → coordinate_system-2.4.2.dist-info}/RECORD +6 -6
- {coordinate_system-2.4.0.dist-info → coordinate_system-2.4.2.dist-info}/LICENSE +0 -0
- {coordinate_system-2.4.0.dist-info → coordinate_system-2.4.2.dist-info}/WHEEL +0 -0
- {coordinate_system-2.4.0.dist-info → coordinate_system-2.4.2.dist-info}/top_level.txt +0 -0
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: coordinate_system
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.2
|
|
4
4
|
Summary: High-performance 3D coordinate system library with machine-precision Gaussian curvature computation (0.000% error) using corrected antisymmetric extraction formula
|
|
5
5
|
Home-page: https://github.com/panguojun/Coordinate-System
|
|
6
6
|
Author: PanGuoJun
|
|
@@ -48,7 +48,7 @@ License-File: LICENSE
|
|
|
48
48
|
[](LICENSE)
|
|
49
49
|
|
|
50
50
|
**Author:** PanGuoJun
|
|
51
|
-
**Version:** 2.4.
|
|
51
|
+
**Version:** 2.4.1
|
|
52
52
|
**License:** MIT
|
|
53
53
|
|
|
54
54
|
## 🆕 What's New in v2.4.0
|
|
@@ -99,154 +99,6 @@ Perfect for computational geometry, geometric analysis, and discrete differentia
|
|
|
99
99
|
|
|
100
100
|
---
|
|
101
101
|
|
|
102
|
-
## 🆕 Differential Geometry (NEW in v2.2.0)
|
|
103
|
-
|
|
104
|
-
### Surface Representation
|
|
105
|
-
|
|
106
|
-
```python
|
|
107
|
-
from coordinate_system import Sphere, Torus, Surface
|
|
108
|
-
|
|
109
|
-
# Create a sphere
|
|
110
|
-
sphere = Sphere(radius=2.0)
|
|
111
|
-
|
|
112
|
-
# Create a torus
|
|
113
|
-
torus = Torus(major_radius=3.0, minor_radius=1.0)
|
|
114
|
-
|
|
115
|
-
# Or define your own surface by subclassing Surface
|
|
116
|
-
class MySurface(Surface):
|
|
117
|
-
def position(self, u, v):
|
|
118
|
-
# Return vec3(x, y, z) for parameters (u, v)
|
|
119
|
-
pass
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Metric Tensor (First Fundamental Form)
|
|
123
|
-
|
|
124
|
-
```python
|
|
125
|
-
from coordinate_system import compute_metric
|
|
126
|
-
import math
|
|
127
|
-
|
|
128
|
-
# Compute metric tensor at a point
|
|
129
|
-
g = compute_metric(sphere, u=math.pi/4, v=math.pi/3)
|
|
130
|
-
|
|
131
|
-
print(f"E = {g.E:.6f}") # u-direction metric
|
|
132
|
-
print(f"F = {g.F:.6f}") # cross term (0 if orthogonal)
|
|
133
|
-
print(f"G = {g.G:.6f}") # v-direction metric
|
|
134
|
-
print(f"det(g) = {g.det:.6f}")
|
|
135
|
-
print(f"Metric correction = {g.correction_factor():.6f}")
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Connection Operator (Intrinsic Gradient)
|
|
139
|
-
|
|
140
|
-
```python
|
|
141
|
-
from coordinate_system import compute_connection
|
|
142
|
-
|
|
143
|
-
# Compute connection operator (frame derivative)
|
|
144
|
-
G_u = compute_connection(sphere, u=math.pi/4, v=math.pi/3, direction='u')
|
|
145
|
-
G_v = compute_connection(sphere, u=math.pi/4, v=math.pi/3, direction='v')
|
|
146
|
-
|
|
147
|
-
print(f"G_u norm: {G_u.norm():.8f}")
|
|
148
|
-
print(f"G_v norm: {G_v.norm():.8f}")
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
**Aliases available:**
|
|
152
|
-
- `compute_frame_derivative` (standard mathematical term)
|
|
153
|
-
- `compute_intrinsic_gradient` (intuitive name)
|
|
154
|
-
- `compute_geometric_gradient` (alternative)
|
|
155
|
-
|
|
156
|
-
### Curvature Tensor
|
|
157
|
-
|
|
158
|
-
```python
|
|
159
|
-
from coordinate_system import compute_curvature_tensor
|
|
160
|
-
|
|
161
|
-
# Compute complete curvature tensor R_uv
|
|
162
|
-
R_uv = compute_curvature_tensor(
|
|
163
|
-
sphere,
|
|
164
|
-
u=math.pi/4,
|
|
165
|
-
v=math.pi/3,
|
|
166
|
-
use_lie_derivative=True # CRITICAL for accuracy!
|
|
167
|
-
)
|
|
168
|
-
|
|
169
|
-
print(f"Curvature tensor norm: {R_uv.norm():.8f}")
|
|
170
|
-
|
|
171
|
-
# R_uv is a 3×3 coord3 object with structure:
|
|
172
|
-
# [[R_11, R_12, R_13], ← Tangent-tangent (intrinsic)
|
|
173
|
-
# [R_21, R_22, R_23], ← Tangent-normal (second fundamental form)
|
|
174
|
-
# [R_31, R_32, R_33]] ← Normal-normal (extrinsic)
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### Gaussian Curvature (Quickest Method)
|
|
178
|
-
|
|
179
|
-
```python
|
|
180
|
-
from coordinate_system import Sphere, compute_gaussian_curvature
|
|
181
|
-
import math
|
|
182
|
-
|
|
183
|
-
# One-line curvature computation!
|
|
184
|
-
sphere = Sphere(radius=2.0)
|
|
185
|
-
K = compute_gaussian_curvature(sphere, u=math.pi/4, v=math.pi/3)
|
|
186
|
-
|
|
187
|
-
print(f"Gaussian curvature K = {K:.6f}")
|
|
188
|
-
# Expected: K = 1/R² = 0.25 for a sphere
|
|
189
|
-
|
|
190
|
-
# Theoretical value
|
|
191
|
-
K_theory = 1.0 / (2.0 ** 2)
|
|
192
|
-
error = abs(K - K_theory) / K_theory * 100
|
|
193
|
-
print(f"Relative error: {error:.2f}%") # Typically < 3% !
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
### Accuracy Comparison
|
|
197
|
-
|
|
198
|
-
**On a sphere with radius R=2 (24 test points across different angles):**
|
|
199
|
-
|
|
200
|
-
| Method | Antisymmetric Extraction | Accuracy | Notes |
|
|
201
|
-
|--------|-------------------------|----------|-------|
|
|
202
|
-
| Old (R_10 only) | ❌ | ~2.5% error | Previous versions |
|
|
203
|
-
| **v2.4.0 (Corrected)** | ✓ | **0.000% error** | **Machine precision!** 🎉 |
|
|
204
|
-
|
|
205
|
-
**Key Formula:** `K = (R_01 - R_10) / (2 · det(g))`
|
|
206
|
-
|
|
207
|
-
The antisymmetric part `(R_01 - R_10)/2` correctly eliminates metric influence and extracts pure curvature. This formula is verified against traditional Christoffel symbol methods and achieves identical results at machine precision (< 10⁻¹⁵ error).
|
|
208
|
-
|
|
209
|
-
### Key Parameters
|
|
210
|
-
|
|
211
|
-
```python
|
|
212
|
-
# For constant curvature surfaces (spheres):
|
|
213
|
-
K = compute_gaussian_curvature(
|
|
214
|
-
surface,
|
|
215
|
-
u, v,
|
|
216
|
-
scale_factor=2.0, # Optimal for spheres
|
|
217
|
-
use_metric_correction=True, # Essential!
|
|
218
|
-
use_lie_derivative=True # Critical for accuracy!
|
|
219
|
-
)
|
|
220
|
-
|
|
221
|
-
# These are the default values, optimized for best accuracy
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### Complete Example
|
|
225
|
-
|
|
226
|
-
See `examples/curvature_computation.py` for comprehensive demonstrations, or `examples/quickstart.py` for the simplest possible usage.
|
|
227
|
-
|
|
228
|
-
```python
|
|
229
|
-
# examples/quickstart.py
|
|
230
|
-
import math
|
|
231
|
-
from coordinate_system import Sphere, compute_gaussian_curvature
|
|
232
|
-
|
|
233
|
-
# Step 1: Create a sphere
|
|
234
|
-
sphere = Sphere(radius=2.0)
|
|
235
|
-
|
|
236
|
-
# Step 2: Choose a point
|
|
237
|
-
u, v = math.pi/4, math.pi/3
|
|
238
|
-
|
|
239
|
-
# Step 3: Compute curvature (one line!)
|
|
240
|
-
K = compute_gaussian_curvature(sphere, u, v)
|
|
241
|
-
|
|
242
|
-
# Step 4: Compare with theory
|
|
243
|
-
K_theory = 1.0 / (2.0 ** 2) # K = 1/R²
|
|
244
|
-
print(f"Computed: K = {K:.6f}")
|
|
245
|
-
print(f"Theory: K = {K_theory:.6f}")
|
|
246
|
-
print(f"Error: {abs(K-K_theory)/K_theory*100:.2f}%")
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
---
|
|
250
102
|
|
|
251
103
|
## 📚 Documentation
|
|
252
104
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
coordinate_system/__init__.py,sha256=S-h_uoibcICCh5Tk_-Q6_aMwiCQ2vvKUgE4BzqCHpJ0,7086
|
|
2
|
-
coordinate_system/coordinate_system.cp313-win_amd64.pyd,sha256=
|
|
2
|
+
coordinate_system/coordinate_system.cp313-win_amd64.pyd,sha256=U-Qh2-MFB7aBMbPcipJSsQutvXqqowjTt7_46FdmZD4,494080
|
|
3
3
|
coordinate_system/curvature.py,sha256=o2XQ7BryvzEyo9cCYhKleeRg6UzacfShSeYyGQkGnwo,26040
|
|
4
4
|
coordinate_system/differential_geometry.py,sha256=yKn1pItaE-tepy-HAetkVfb-jRbDY7RKv68NKk4jsSQ,26345
|
|
5
5
|
coordinate_system/two_stage_curvature.py,sha256=e4fYAhiUc8NwtBi5hz5se4if4i8zZzG8smNlWNwuJpw,7219
|
|
6
|
-
coordinate_system-2.4.
|
|
7
|
-
coordinate_system-2.4.
|
|
8
|
-
coordinate_system-2.4.
|
|
9
|
-
coordinate_system-2.4.
|
|
10
|
-
coordinate_system-2.4.
|
|
6
|
+
coordinate_system-2.4.2.dist-info/LICENSE,sha256=tDnRkJxBYPzWdfh2gArRqrUPJxQZRZHJVs68qqBHIq4,1083
|
|
7
|
+
coordinate_system-2.4.2.dist-info/METADATA,sha256=wSFHcdSVfkoMobvyqHL4GaKpOrALzGYCDS5eJXOZjB0,19414
|
|
8
|
+
coordinate_system-2.4.2.dist-info/WHEEL,sha256=4-iQBlRoDdX1wfPofc7KLWa5Cys4eZSgXs6GVU8fKlQ,101
|
|
9
|
+
coordinate_system-2.4.2.dist-info/top_level.txt,sha256=R6LguuPPZ5esrIsDTqPGi9UxCvZPIXwn7KRKX87c79M,18
|
|
10
|
+
coordinate_system-2.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|