Skip to content

Coordinate Systems in Differential Geometry: Cone Example

panguojun edited this page May 22, 2025 · 4 revisions

1. Introduction

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

2. Geometric Setup

2.1 Cone Parameters

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);

2.2 Coordinate Frames

Natural Cone Coordinates:

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));
}

Reference Cylindrical Coordinates:

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);
}

3. Core Algorithms

3.1 Connection Calculation

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;

3.2 Metric Tensor Computation

vec3 metric = c1.metric();

Yields the metric tensor components:

g_ij = [ csc²θ   0  ]
       [   0     r² ]

3.3 Christoffel Symbol Extraction

From the connection matrix G:

  • G[0][1] → Γᵩ_rᵩ = 1/r
  • G[1][0] → Γʳ_ᵩᵩ = -r sin²θ

4. Theoretical Verification

4.1 Expected Quantities

For a cone with half-angle θ:

Γʳ_ᵩᵩ = -r sin²θ
Γᵩ_rᵩ = Γᵩ_ᵩr = 1/r

4.2 Curvature Calculation

The non-zero Riemann curvature component:

Rʳ_ᵩrᵩ = -sin²θ

This confirms intrinsic curvature exists (non-developable surface).

5. Implementation Details

5.1 Numerical Verification

vec3 MetricG = G.metric();
PRINTV3(MetricG); // Verify tensor properties
PRINTV(MetricG.y / MetricG.z); // Check anisotropy ratio

6. Conclusion

The 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

Clone this wiki locally