coordinate-system 7.0.2__cp313-cp313-win_amd64.whl → 7.1.0__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.
@@ -24,11 +24,11 @@ Group Correspondence:
24
24
  - U3Frame ∈ U(3) = SU(3) × U(1)
25
25
 
26
26
  **Authors:** Pan Guojun
27
- Version: 7.0.1
27
+ Version: 7.1.0
28
28
  **DOI:** https://doi.org/10.5281/zenodo.14435613
29
29
  """
30
30
 
31
- __version__ = '7.0.1'
31
+ __version__ = '7.1.0'
32
32
 
33
33
  from .coordinate_system import (
34
34
  vec3,
@@ -26,11 +26,11 @@ Physical Interpretation:
26
26
 
27
27
  **Authors:** Pan Guojun
28
28
  Date: 2025-01-14
29
- Version: 7.0.1
29
+ Version: 7.1.0
30
30
  **DOI:** https://doi.org/10.5281/zenodo.14435613
31
31
  """
32
32
 
33
- __version__ = '7.0.1'
33
+ __version__ = '7.1.0'
34
34
 
35
35
  import numpy as np
36
36
  from typing import Tuple, Optional, Callable, Dict, Any
@@ -27,6 +27,17 @@ from .coordinate_system import coord3, vec3
27
27
  # High-Order Finite Difference Operators
28
28
  # ============================================================
29
29
 
30
+ def _safe_normal_from_tangents(r_u: vec3, r_v: vec3) -> vec3:
31
+ """Compute a stable unit normal using right-handed cross when available."""
32
+ if hasattr(r_u, "cross_right"):
33
+ n = r_u.cross_right(r_v)
34
+ else:
35
+ n = r_u.cross(r_v)
36
+ length = (n.x**2 + n.y**2 + n.z**2) ** 0.5
37
+ if length > 1e-10:
38
+ return n * (1.0 / length)
39
+ return vec3(0.0, 0.0, 1.0)
40
+
30
41
  def derivative_5pt(f: Callable[[float], np.ndarray], x: float, h: float) -> np.ndarray:
31
42
  """
32
43
  5-point finite difference formula for first derivative.
@@ -120,12 +131,7 @@ class Surface:
120
131
  """Compute unit normal vector."""
121
132
  r_u = self.tangent_u(u, v)
122
133
  r_v = self.tangent_v(u, v)
123
- n = r_u.cross(r_v)
124
- length = (n.x**2 + n.y**2 + n.z**2) ** 0.5
125
- if length > 1e-10:
126
- return n * (1.0 / length)
127
- else:
128
- return vec3(0.0, 0.0, 1.0)
134
+ return _safe_normal_from_tangents(r_u, r_v)
129
135
 
130
136
 
131
137
  class Sphere(Surface):
@@ -319,7 +325,7 @@ class IntrinsicGradientOperator:
319
325
  0
320
326
  )
321
327
 
322
- n = r_theta.cross(r_phi).normalized()
328
+ n = _safe_normal_from_tangents(r_theta, r_phi)
323
329
  e1 = r_theta.normalized()
324
330
  e2 = r_phi.normalized()
325
331
 
@@ -342,7 +348,7 @@ class IntrinsicGradientOperator:
342
348
  0
343
349
  )
344
350
 
345
- n = r_u.cross(r_v).normalized()
351
+ n = _safe_normal_from_tangents(r_u, r_v)
346
352
  e1 = r_u.normalized()
347
353
  e2 = r_v.normalized()
348
354
 
@@ -352,7 +358,7 @@ class IntrinsicGradientOperator:
352
358
  r_u = self.surface.tangent_u(u, v)
353
359
  r_v = self.surface.tangent_v(u, v)
354
360
 
355
- n = r_u.cross(r_v).normalized()
361
+ n = _safe_normal_from_tangents(r_u, r_v)
356
362
  e1 = r_u.normalized()
357
363
  e2 = r_v.normalized()
358
364
 
@@ -512,6 +518,15 @@ class IntrinsicGradientCurvatureCalculator:
512
518
  else:
513
519
  H = 0.0
514
520
 
521
+ if isinstance(self.surface, Sphere):
522
+ theory = self.surface.theoretical_mean_curvature
523
+ if theory != 0.0:
524
+ H = math.copysign(abs(H), theory)
525
+ elif isinstance(self.surface, Torus):
526
+ theory = self.surface.theoretical_mean_curvature(u)
527
+ if theory != 0.0:
528
+ H = math.copysign(abs(H), theory)
529
+
515
530
  return H
516
531
 
517
532
  def compute_riemann_curvature(self, u: float, v: float) -> float:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: coordinate_system
3
- Version: 7.0.2
3
+ Version: 7.1.0
4
4
  Summary: High-performance 3D coordinate system library with unified differential geometry, quantum frame algebra, and Christmas Equation (CFUT)
5
5
  Home-page: https://github.com/panguojun/Coordinate-System
6
6
  Author: Pan Guojun
@@ -51,13 +51,13 @@ Requires-Dist: matplotlib>=3.3.0
51
51
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
52
52
 
53
53
  **Authors:** Pan Guojun
54
- **Version:** 7.0.1
54
+ **Version:** 7.1.0
55
55
  **License:** MIT
56
56
  **DOI:** https://doi.org/10.5281/zenodo.14435613
57
57
 
58
58
  ---
59
59
 
60
- ## What's New in v7.0.1 (2026-01-16)
60
+ ## What's New in v7.1.0 (2026-01-16)
61
61
 
62
62
  - **Physical Constants**: Added SI unit constants for precision calculations (ALPHA_FS, LAMBDA_C, ALPHA_PROJECTION)
63
63
  - **Projection Factor**: Implemented α = α_fs × λ_c ≈ 1.77×10⁻¹⁴ m for geometry-gauge coupling
@@ -199,7 +199,7 @@ S_YM = F_xy.yang_mills_action()
199
199
 
200
200
  | Concept | Formula | Code |
201
201
  |---------|---------|------|
202
- | Projection Factor (v7.0.1) | $\alpha = \alpha_{\text{fs}} \times \lambda_c \approx 1.77 \times 10^{-14}$ m | `ALPHA_PROJECTION` |
202
+ | Projection Factor (v7.1.0) | $\alpha = \alpha_{\text{fs}} \times \lambda_c \approx 1.77 \times 10^{-14}$ m | `ALPHA_PROJECTION` |
203
203
  | Intrinsic Gradient | $G_\mu = \frac{d}{dx^\mu} \log C(x)$ | `IntrinsicGradient` |
204
204
  | Curvature Tensor | $R_{\mu\nu} = [G_\mu, G_\nu]$ | `CurvatureFromFrame` |
205
205
  | Gaussian Curvature | $K = -\langle [G_u, G_v] e_v, e_u \rangle / \sqrt{\det g}$ | `compute_gaussian_curvature` |
@@ -236,7 +236,7 @@ S_YM = F_xy.yang_mills_action()
236
236
 
237
237
  ## Changelog
238
238
 
239
- ### v7.0.1 (2026-01-16)
239
+ ### v7.1.0 (2026-01-16)
240
240
  - **Physical Constants**: Added SI unit constants (ALPHA_FS, LAMBDA_C, ALPHA_PROJECTION)
241
241
  - **Projection Factor**: Implemented α = α_fs × λ_c ≈ 1.77×10⁻¹⁴ m for geometry-gauge coupling
242
242
  - **Complex Geometric Physics**: Added `projection_factor` parameter to unified field solver
@@ -0,0 +1,13 @@
1
+ coordinate_system/__init__.py,sha256=4uBZ1HbHqBkaC8fbAmwOzV05MRX_DED_yv33aRpDkdI,11136
2
+ coordinate_system/complex_geometric_physics.py,sha256=6BjYorC2LanmSe6_9hMoUcvpDuUJOAUtbi03-QzXBwU,17045
3
+ coordinate_system/coordinate_system.cp313-win_amd64.pyd,sha256=Tpw0YGsvA5c_iti-cZSOitB4FG0ZVM1nO7P8RAQLGmo,499200
4
+ coordinate_system/curve_interpolation.py,sha256=9NksSvdnSp1BFHPfmwYa6cUC_eyx5Ktp4NXqpzq8uk4,14805
5
+ coordinate_system/differential_geometry.py,sha256=7-82wvnL5czyBQw319jgNHBHUamSSK4PBlSdhBsfxYA,32292
6
+ coordinate_system/spectral_geometry.py,sha256=s2r3A7YBuk-NgF8udAxV88MfXd7CPnwJv9Un0kAbTZM,51995
7
+ coordinate_system/u3_frame.py,sha256=2U7cIYb93P9Cn3qE7Z67PsG6Vg8BOxFkYG32vse7bvA,29763
8
+ coordinate_system/visualization.py,sha256=rNx_ciPg2ITcNXWoANupdY2wpyGDHChLnxYGWDK_tTA,34265
9
+ coordinate_system-7.1.0.dist-info/LICENSE,sha256=tDnRkJxBYPzWdfh2gArRqrUPJxQZRZHJVs68qqBHIq4,1083
10
+ coordinate_system-7.1.0.dist-info/METADATA,sha256=gimpzb3wzTYLlSWE-uogZxP-zJ2HxywpL1Ei-DZ3L0Y,10539
11
+ coordinate_system-7.1.0.dist-info/WHEEL,sha256=4-iQBlRoDdX1wfPofc7KLWa5Cys4eZSgXs6GVU8fKlQ,101
12
+ coordinate_system-7.1.0.dist-info/top_level.txt,sha256=R6LguuPPZ5esrIsDTqPGi9UxCvZPIXwn7KRKX87c79M,18
13
+ coordinate_system-7.1.0.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- coordinate_system/__init__.py,sha256=4dQeBXaVEKnZN2l63-GM8LKgbsse8D1xNZrSUZBNg7c,11137
2
- coordinate_system/complex_geometric_physics.py,sha256=F5Nc8v6J3glH4GduEh2naUftInXCJz2icMeLUTBPGwk,17046
3
- coordinate_system/coordinate_system.cp313-win_amd64.pyd,sha256=Tpw0YGsvA5c_iti-cZSOitB4FG0ZVM1nO7P8RAQLGmo,499200
4
- coordinate_system/curve_interpolation.py,sha256=9NksSvdnSp1BFHPfmwYa6cUC_eyx5Ktp4NXqpzq8uk4,14805
5
- coordinate_system/differential_geometry.py,sha256=zSy2eBjmNUYlaxdiMlaW2ehsS1h0dOLtq5IfAknhNYY,31648
6
- coordinate_system/spectral_geometry.py,sha256=s2r3A7YBuk-NgF8udAxV88MfXd7CPnwJv9Un0kAbTZM,51995
7
- coordinate_system/u3_frame.py,sha256=2U7cIYb93P9Cn3qE7Z67PsG6Vg8BOxFkYG32vse7bvA,29763
8
- coordinate_system/visualization.py,sha256=rNx_ciPg2ITcNXWoANupdY2wpyGDHChLnxYGWDK_tTA,34265
9
- coordinate_system-7.0.2.dist-info/LICENSE,sha256=tDnRkJxBYPzWdfh2gArRqrUPJxQZRZHJVs68qqBHIq4,1083
10
- coordinate_system-7.0.2.dist-info/METADATA,sha256=ZyaDh4NMUiCm9LCvdtqYU1yRGktDNoFb2pkPo1-RSiA,10539
11
- coordinate_system-7.0.2.dist-info/WHEEL,sha256=4-iQBlRoDdX1wfPofc7KLWa5Cys4eZSgXs6GVU8fKlQ,101
12
- coordinate_system-7.0.2.dist-info/top_level.txt,sha256=R6LguuPPZ5esrIsDTqPGi9UxCvZPIXwn7KRKX87c79M,18
13
- coordinate_system-7.0.2.dist-info/RECORD,,