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

Continuous unfurl engine: Pythagorean limb departure and dynamic horizon clipping

Visualizationd3-geoProjection

When transitioning between a 3D orthographic sphere and a planar cylindrical projection, standard GIS frameworks perform hard cuts or opacity fades. GeoGenesis implements a frame-by-frame continuous geometric morpher driven by the Pythagorean limb departure envelope R2−y2\sqrt{R^2 - y^2}R2−y2​.

1. Parallel Limb Departure Derivation

On an orthographic sphere of radius RRR, surface coordinates (λ,ϕ)(\lambda, \phi)(λ,ϕ) map to Cartesian screen coordinates:

xortho(λ,ϕ)=Rcos⁡ϕsin⁡λ,yortho(λ,ϕ)=Rsin⁡ϕx_{\text{ortho}}(\lambda, \phi) = R \cos\phi \sin\lambda, \quad y_{\text{ortho}}(\lambda, \phi) = R \sin\phixortho​(λ,ϕ)=Rcosϕsinλ,yortho​(λ,ϕ)=Rsinϕ

At vertical offset y∈[−R,R]y \in [-R, R]y∈[−R,R], latitude ϕ\phiϕ is fixed by sin⁡ϕ=y/R\sin\phi = y / Rsinϕ=y/R. Applying the Pythagorean theorem to the cross-sectional circle parallel to the equatorial plane at height yyy:

xlimb2+y2=R2  ⟹  xlimb(y)=±R2−y2=±Rcos⁡ϕx_{\text{limb}}^2 + y^2 = R^2 \implies x_{\text{limb}}(y) = \pm \sqrt{R^2 - y^2} = \pm R \cos\phixlimb2​+y2=R2⟹xlimb​(y)=±R2−y2​=±Rcosϕ

2. Continuous Morphing Topology Function

For unfurl parameter t∈[0,1]t \in [0, 1]t∈[0,1] (t=0t = 0t=0: sphere; t=1t = 1t=1: planar projection PPP), the blended transformation Tt\mathcal{T}_tTt​ is defined as:

Tt(λ,ϕ;P)=[(1−t)⋅Rcos⁡ϕsin⁡λ+t⋅XP(λ,ϕ)(1−t)⋅Rsin⁡ϕ+t⋅YP(λ,ϕ)]\mathcal{T}_t(\lambda, \phi; P) = \begin{bmatrix} (1 - t) \cdot R \cos\phi \sin\lambda + t \cdot X_P(\lambda, \phi) \\ (1 - t) \cdot R \sin\phi + t \cdot Y_P(\lambda, \phi) \end{bmatrix}Tt​(λ,ϕ;P)=[(1−t)⋅Rcosϕsinλ+t⋅XP​(λ,ϕ)(1−t)⋅Rsinϕ+t⋅YP​(λ,ϕ)​]

3. Dynamic Horizon Clipping α(t)\alpha(t)α(t)

At t=0t = 0t=0, only the visible hemisphere facing the camera is rendered (α0=90∘=π/2 rad\alpha_0 = 90^\circ = \pi/2\text{ rad}α0​=90∘=π/2 rad). As t→1t \to 1t→1, the clipping boundary expands to reveal the complete 360∘360^\circ360∘ planet:

α(t)=π2(1+t)\alpha(t) = \frac{\pi}{2} (1 + t)α(t)=2π​(1+t)

Antimeridian cutting (d3.geoClipAntimeridian) activates when t>0.001t > 0.001t>0.001, preventing meridian seam tearing during planar layouts while preserving continuous 3D rotation at t=0t = 0t=0.

← Previous

MGRS/UTM geodetic conversion and 3D screen-to-sphere raycasting

Next →

Multi-projection topology mutators: Taylor sinc guards and Newton-Raphson Kepler solvers


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.