This chapter is not on math foundations for general 3D graphics; rather, it is on useful mathematics for virtual globes, with a focus on ellipsoids. This chapter is unique in that it contains some derivations, but we are computer science practitioners, not mathematicians, so it also provides working code in a handy Ellipsoid class. Our colleague, Jim Woodburn, helped significantly with the derivations.
This chapter covers:
- Geographic (longitude, latitude, height) and WGS84 (x, y, z) coordinates.
- Oblate spheroids (Earth's shape).
- Surface normals: geodetic vs. geocentric.
- Conversion between geographic and WGS84 coordinates.
- Scaling a arbitrary point in space to the ellipsoid surface.
- Curves on ellipsoids.