-
Notifications
You must be signed in to change notification settings - Fork 2
Coordinate Systems in Differential Geometry: Cone Example
panguojun edited this page May 22, 2025
·
4 revisions
Differential geometry forms the mathematical foundation for modern geometric computing. The core challenge lies in efficiently computing connection coefficients and curvature quantities from discrete coordinate representations. Our cone example demonstrates:
- Coordinate frame construction
- Metric tensor computation
- Connection form calculation
const real r = 1.0; // Base radius
const real theta_deg = 60.0; // Half-angle (degrees)
const real theta = theta_deg * PI / 180.0;
const real cot_theta = cot(theta);
const real csc_theta = 1.0/sin(theta);crd3 calc_c(real phi_deg, real r = 1.0) {
real phi = phi_deg * PI / 180.0;
vec3 e_r = { cos(phi), sin(phi), cot(theta) }; // ∂/∂r
vec3 e_phi = { -r*sin(phi), r*cos(phi), 0 }; // ∂/∂φ
return crd3(e_r, e_phi, cross(e_r, e_phi));
}crd3 calc_C(real phi_deg, real r = 1.0) {
real phi = phi_deg * PI / 180.0;
real R = r / sin(theta);
vec3 e_r = { R*cos(phi), R*sin(phi), 0 }; // ∂/∂r
vec3 e_phi = { -R*sin(phi), R*cos(phi), 0 }; // ∂/∂φ
vec3 e_z = { 0, 0, R }; // ∂/∂z
return crd3(e_r, e_phi, e_z);
}The fundamental operation computes the affine connection between frames:
// Finite difference step
real d_phi = 1.0; // 1 degree
real ds = r * (d_phi * PI / 180.0); // Arc length
// Frame calculations
crd3 c1 = calc_c(phi_deg);
crd3 c2 = calc_c(phi_deg + d_phi);
crd3 C1 = calc_C(phi_deg);
crd3 C2 = calc_C(phi_deg + d_phi);
// Core connection computation
crd3 G = (c2 / c1 / C2 - C1.reversed()) / ds;vec3 metric = c1.metric();Yields the metric tensor components:
g_ij = [ csc²θ 0 ]
[ 0 r² ]
From the connection matrix G:
-
G[0][1]→ Γᵩ_rᵩ = 1/r -
G[1][0]→ Γʳ_ᵩᵩ = -r sin²θ
For a cone with half-angle θ:
Γʳ_ᵩᵩ = -r sin²θ
Γᵩ_rᵩ = Γᵩ_ᵩr = 1/r
The non-zero Riemann curvature component:
Rʳ_ᵩrᵩ = -sin²θ
This confirms intrinsic curvature exists (non-developable surface).
vec3 MetricG = G.metric();
PRINTV3(MetricG); // Verify tensor properties
PRINTV(MetricG.y / MetricG.z); // Check anisotropy ratioThe cone example demonstrates how coordinate frame operations provide an efficient computational pathway to differential geometric quantities. Key advantages include:
- Direct implementation of geometric intuition
- Numerically stable frame operations
- Clear correspondence to theoretical constructs
- Extensible to arbitrary surfaces