Skip to content
Andrew Voirol
Monday, August 31, 2026geogenesis-unfolding-globe

Geodesic arc morphing: spherical SLERP flight paths across dynamic projections

Visualizationd3-geoAnimation

Great-circle paths represent the shortest distance between two points on a spherical surface. As a map morphs between 3D spherical and 2D planar topologies, these trajectories must warp dynamically without distortion or seam breaks.

1. Great-Circle Distance & SLERP Interpolation

Given origin P1=(λ1,ϕ1)P_1 = (\lambda_1, \phi_1)P1​=(λ1​,ϕ1​) and destination P2=(λ2,ϕ2)P_2 = (\lambda_2, \phi_2)P2​=(λ2​,ϕ2​), unit surface vectors v1,v2∈S2\mathbf{v}_1, \mathbf{v}_2 \in \mathbb{S}^2v1​,v2​∈S2 are computed. Central angle Ω\OmegaΩ is obtained via the Haversine equation:

h=sin⁡2(Δϕ2)+cos⁡ϕ1cos⁡ϕ2sin⁡2(Δλ2),Ω=2arcsin⁡(min⁡(1,h))h = \sin^2\left(\frac{\Delta\phi}{2}\right) + \cos\phi_1 \cos\phi_2 \sin^2\left(\frac{\Delta\lambda}{2}\right), \quad \Omega = 2 \arcsin(\min(1, \sqrt{h}))h=sin2(2Δϕ​)+cosϕ1​cosϕ2​sin2(2Δλ​),Ω=2arcsin(min(1,h​))

For path parameter u∈[0,1]u \in [0, 1]u∈[0,1] sampled across 64 waypoints, spherical linear interpolation (SLERP) generates intermediate surface unit vectors:

v(u)=sin⁡((1−u)Ω)sin⁡Ωv1+sin⁡(uΩ)sin⁡Ωv2\mathbf{v}(u) = \frac{\sin((1 - u)\Omega)}{\sin\Omega} \mathbf{v}_1 + \frac{\sin(u\Omega)}{\sin\Omega} \mathbf{v}_2v(u)=sinΩsin((1−u)Ω)​v1​+sinΩsin(uΩ)​v2​

2. Continuous Projection Morphing

Each waypoint (λ(u),ϕ(u))(\lambda(u), \phi(u))(λ(u),ϕ(u)) is transformed through the continuous projection operator:

pscreen(u,t)=Tt(λ(u),ϕ(u);P)\mathbf{p}_{\text{screen}}(u, t) = \mathcal{T}_t(\lambda(u), \phi(u); P)pscreen​(u,t)=Tt​(λ(u),ϕ(u);P)

On the 3D globe (t<0.5t < 0.5t<0.5), back-face culling is enforced using camera normal dot products (v(u)⋅ncamera>0\mathbf{v}(u) \cdot \mathbf{n}_{\text{camera}} > 0v(u)⋅ncamera​>0). Trajectories are rendered with a phosphor glow halo and an animated photon particle with trail decay.

← Previous

Hardware-accelerated country picking: 24-bit bijective RGB buffers

Next →

Geodesic Haversine spherical arc derivation vs flat Mercator linear chord error


Andrew Voirol

Builder, hacker, shipper. Currently leaving localhost.

Navigate

WorkThreadsBuilder's LogAboutContactRSS Feed

Connect

X / TwitterGitHubLinkedIn

© 2026 Andrew Voirol·Back to top ↑
✦Just one prompt away from figuring it all out.