Clothoids & Fairing
Clothoid Kinematic Invariant:
κ(s) = A · s, guaranteeing constant rate-of-change of lateral acceleration. 2. Fresnel Integral Formulation: Evaluated via Fresnel cosine C(u) and sine S(u) integrals. 3. Civil Infrastructure Standard: Mandatory transition geometry for all high-speed rail and freeway off-ramps.1import math23def sample_clothoid_spiral(length=3.0, a_param=1.0, num_samples=50):4 """5 Computes Euler Spiral (Clothoid / Cornu spiral) where curvature grows linearly6 with arc length: kappa(s) = s / a^2, so tangent angle theta(s) = s^2 / (2 * a^2).7 Integrates Fresnel integrals x(s) = int cos(theta(u)) du, y(s) = int sin(theta(u)) du8 using composite midpoint quadrature.9 """10 ds = length / (num_samples - 1)11 x, y = 0.0, 0.012 points = [(x, y, 0.0)]1314 for i in range(1, num_samples):15 s_mid = (i - 0.5) * ds16 theta_mid = (s_mid ** 2) / (2.0 * (a_param ** 2))17 x += math.cos(theta_mid) * ds18 y += math.sin(theta_mid) * ds19 points.append((x, y, (i * ds) / (a_param ** 2))) # (x, y, kappa)20 return points
Clothoid (Euler Spiral) Transition Curves: If a high-speed train transitions directly from a straight track (κ = 0) into a circular turn (κ = 1/R), passengers experience a catastrophic step-function jump in lateral centrifugal acceleration (a = v^2 κ), inducing infinite jerk (da/dt = ∞). A clothoid curve features curvature that increases strictly linearly with arc length (κ(s) ∝ s), allowing the steering wheel to turn at a perfectly constant rotational speed.
Fairing Principles:
E = ∫ κ(s)^2 ds penalizes high curvature spikes. 2. Bi-Laplacian Diffusion: Δ^2 P = 0 smooths curvature without collapsing the curve into a chord. 3. Convexity Preservation: Eliminates spurious inflection points and oscillations.1import numpy as np23def fair_curve_minimum_energy(control_points, alpha_fair=0.1, max_iter=25):4 """5 Curve fairing via Minimum Bending Energy optimization.6 Minimizes E(C) = integral(kappa(s)^2 ds) approx sum(||P_{i-1} - 2*P_i + P_{i+1}||^2).7 Interior control vertices undergo 4th-order bi-Laplacian smoothing:8 P_new = P - alpha * Delta^2(P).9 """10 pts = np.array(control_points, dtype=float)11 n = len(pts)1213 for _ in range(max_iter):14 for i in range(2, n - 2):15 # Fourth-order finite difference stencil: [1, -4, 6, -4, 1]16 bilap = pts[i-2] - 4*pts[i-1] + 6*pts[i] - 4*pts[i+1] + pts[i+2]17 pts[i] -= alpha_fair * bilap1819 return pts
Minimum Bending Energy Curve Fairing: In boat hull lofting and aircraft aerodynamics, digitized scanned curves contain high-frequency measurement noise. A mechanical wooden spline naturally assumes the curve that minimizes total internal strain energy E = ∫ κ^2 ds. Digital fairing solves this variational problem using 4th-order bi-Laplacian diffusion, stripping away jitter while anchoring firmly to key design waypoints.
Related Concepts
Interactive geometrical visualization of porcupine curvature combs and G0 to G3 continuity.
Curvature combs, Class-A continuity G0-G3, clothoid spirals, and curve fairing.
Interactive geometrical visualization of soap film minimal surfaces and inverted catenary arches.