biVector forum

Stereographic representation of the 2-sphere

Howdy folks,

I have been working (occasionally and inconsistently) for the past few months on concretely building all the algebra needed to do 2-dimensional spherical geometry with points represented using stereographic projection onto a plane.

There are many more parts to add, and especially many more (interactive) diagrams to include, but perhaps folks here have some advice or ideas even in this draft state.

My goal is to make something at least somewhat useful/accessible to someone without much knowledge of GA, and to pitch ideas toward people who are trying to implement e.g. computational geometry tools on a sphere, say for geography.

Most of the material here has been written down in one form or another over the past centuries, but there are some parts I haven’t seen before, and I find the formulas in my version to be quite pleasant and straightforward to work with.

I’m putting this in the conformal subforum even though I am not using the CGA model per se (partly because my understanding of CGA is a bit spotty, and partly because I think it’s less accessible to a general reader audience) because it is clear there is a close relationship between the sphere represented under stereographic projection and the CGA model of the plane.

Most things in this notebook generalize very straightforwardly to the hyperbolic plane, and can also be a useful start toward understanding the 3-sphere under stereographic projection onto 3-space, e.g. the so-called “modified Rodrigues parameters” of unit quaternions stereographically projected onto 3-space.

I also hope eventually to figure out what the most computationally efficient and easiest-to-implement generalization of these tools should be for working with points on an ellipsoid of revolution.

My hope is to reimplement most types of geodetic / cartographic computations using this representation instead of the usual longitude–latitude representation, because it should be just as efficient for storage/transmission of data while having much nicer (more efficient, easier to code up, easier to reason about) computations.

Anyhow, my question for you all is: do you know of other sources which discuss stereographic representation of points and get into a good number of concrete details?

There’s some nice material in but it is somewhat general/abstract and only covers a few basics.

Does anyone have any other suggestions or advice?


hi, i really like this notebook. i think cga would add a lot of clarity and concision since it universally combines all of the ideas but without need for coordinates, and the ideas generalize to arbitrary geometry and dimension. the dorst book ‘ga for computer science’ is a good resource for cga.

would be a fun to translate.

Go for it.

The current version is already basically coordinate free (coordinates are used in the beginning to introduce notation), but I’m curious to see how stereographic metrical computations generalize to higher dimensions. I haven’t thought too much about it, even in the simplest cases like the area of a triangle or the volume of a tetrahedron in the 3-sphere.

I also still need to work through / write up all of the relations about spherical triangles and small circles on the 2-sphere: finding their incenter, circumcenter, orthocenter; computing intersections; finding the small circle circumscribing 2 or 3 small circles; flipping between different representations of small circles; …

Hi @jrus, I couldn’t tell from your post how committed you are to using CGA. If you are mainly interested in working with circles on the sphere then CGA is probably the way to go.

But if your main intention is to do spherical geometry and trigonometry using GA then I would suggest considering using projective geometric algebra (PGA) in the form of P(\mathbb{R}_{3,0,0}^*) or P(\mathbb{R}_{3,0,0}) for this task. One neat trick in this model is that multiplication by the pseudoscalar converts a triangle into the famous “polar triangle”, for which a set of similar but not identical formulas are valid. In fact, many of the familiar formulas of spherical trigonometry can be directly derived using the geometric product. I expect the study of triangle centers would also be productive; it certainly is for the euclidean PGA P(\mathbb{R}_{2,0,1}^*).

I briefly discuss both these options in the SIGGRAPH course notes (Section 6.3) available here on The dual construction appears to be preferable since then the spherical isometries are generated by reflections in planes through the origin – which agrees with the way we usually think of the isometry group of a space. (The alternative using the standard construction generates the direct isometry group via rotations of 180 degrees around lines through the origin (“half turns”); the reflections in planes have to be obtained using other techniques.)

This theme is also briefly handled in the second part of my GAME2020 lecture dealing with non-euclidean geometry using PGA. This lecture also includes a discussion of hyperbolic geometry using P(\mathbb{R}_{2,1,0}^*) or P(\mathbb{R}_{2,1,0}). This lecture will soon be available as video and slides also on

I have also written some ganja.js demos for these non-euclidean plane that are part of the above slides. One feature that will probably be unfamiliar for you is that the display is not on the round sphere but is a flat plane obtained by central projection (not stereographic projection). This plane represents one hemisphere of the full sphere. That’s necessary in order for it to be considered a true noneuclidean geometry, since one of the axioms is that every pair of lines intersects in exactly one point, whereas great circles on the sphere intersect always in two. It’s not difficult to render this model as two identical round hemispheres forming a single sphere … but that’s not been done yet.

Sorry if the context was unclear. Did you read my linked notebook?

This topic is closely related to CGA, which is why I put it in this forum, but I am not explicitly storing CGA coordinates or manipulating them that way per se (so perhaps the regular vector GA forum would also be a fine venue).

The context is that I intend to do spherical geometry under stereographic projection so that I can get away with only storing 2 floating-point coordinates per point, but still have nice mostly rational formulas plus occasional square roots. Stereographically projected points are much nicer to work with than latitude/longitude, and are only mildly less convenient to work with than points embedded in cartesian 3-space. Here we are talking about computational geometry type work, e.g. for use in mapmaking, with very large numbers of points and real-time processing as a goal.

Using cartesian points is not an efficient representation, because 1 coordinate is essentially wasted, and the precision is extremely nonuniform over the surface of the sphere, meaning that for the same density of coverage it demands something like double the bandwidth.

This plane represents one hemisphere of the full sphere. That’s necessary in order for it to be considered a true noneuclidean geometry, since one of the axioms is that every pair of lines intersects in exactly one point,

Saying that spherical geometry is not a “true noneuclidean geometry” seems like a questionable semantic quibble to me. Fixing up that axiom is not hard.

But if you look in my notebook there is a discussion of the relationship between the stereographic and gnomonic projections.

I apologize for not looking at your notebook before posting my reply. I do think that my reply may be of interest to people generally interested in spherical geometry so I’ll leave it, but your needs clearly are much more complex and advanced than my suggestions could fulfil.

The PGA option I mentioned is essentially the quaternion GA you seem to be using extensively for handling rotations. There’s more however to PGA than quaternions, it might be worth looking into it more closely.

Do I understand correctly that you would like to know to what extend you can extend your use of GA for the applications you describe in your notebook? The notebook is impressive with quite diverse results; to provide any real guidance I would have to study it more than I have.

Since you have referenced the work of Normal Wildberger, you might be interested in a preprint of mine devoted to applying PGA to his rational trigonometry: For example, it establishes the exact duality of spread and quadrance.

Mostly I’m trying to solicit whatever feedback I can find. For example: is my exposition reasonably clear? Are the formulas legible? Did I skip too many steps? Is there prior work I should go read up on where there might be useful other results, or earlier derivations of the same results I have here?

Sorry there still aren’t good pictures in that notebook. I should probably just sketch some on paper as a stopgap on the way to rendering interactive diagrams which takes a lot more effort.

I think someone who is an expert in CGA might be able to see and elaborate more easily than I what the relationship is between CGA and what I have in that notebook. I’m curious if there has been effort to use CGA to express metrical relationships on the sphere per se. Etc.

There is a straightforward connection between quaternions and Möbius transformations. The quaternion R can be turned into the matrix M = [R + eRe, Re – eR; –Re + eR, R + eRe], where e is any unit vector. Then the transformation RvR⁻¹ on the sphere corresponds to the Möbius transformation using that matrix on the stereographic projection of the sphere onto the plane perpendicular to e.

In practice what I am applying to stereographically projected points is those Möbius transformations, not the quaternions per se.

I think if I need to represent many spherical rotations and do more computations with them, I would consider using a 3-coordinate representation. If R = a + B are the scalar and bivector parts of the quaternion, we can use B / (|R| + a) as a pure-bivector representation of the quaternion. This is a stereographic projection of the 3-sphere of normalized quaternions, sometimes called the “modified Rodrigues parameters”.

Thanks for the details. I’m beginning to get a clearer picture of what you’re after.
Indeed CGA is a good candidate. The rotors of CGA when restricted to the null points (which form the unit sphere) are exactly the conformal transformations of the sphere and hence can by stereographic projection be transferred (conformally) to the euclidean plane. There is an explicit formula mapping Möbius transformations as 2x2 complex matrices to 4x4 real projective matrices preserving the signature (3,1) and these in turn can be converted to rotors in CGA - I hope I can remember where I read it, but it shouldn’t be too hard to reconstruct. It may be well-known. It’s my hunch that at least some of the calculations you are doing on the sphere can be carried out using the geometric product in CGA.

Yes, I also expect that many parts of spherical geometry (and also hyperbolic geometry; the two are bundled up together in the CGA of the plane) can be expressed with the geometric product in CGA(2) ∼ R(3, 1). Probably including a lot of metrical calculations.

I just haven’t ever tried to work through the details. It might make some derivations and/or exposition clearer and easier, but I think in practical implementations I’ll still want to mostly work in terms of just 2 coordinates wherever possible.

One thing people here may find intriguing is the paraboloid representation of the sphere, what I call v in the top of that notebook. I find it quite amazing that the composition of the central projection from the sphere onto a paraboloid (passing through the equator and with focus at the origin) along with a parallel projection onto the plane of the equator is equivalent to the stereographic projection. I have never really seen much discussion of projections back and forth between a sphere/hyperboloid and a paraboloid. But I admit I am not any kind of expert in conic sections or quadric surfaces.

The paraboloid is usually obtained from the sphere with a projective transformation that moves the NP to the PT at infinity in the N direction and the SP to the origin, which becomes the “tip” of the paraboloid. It’s a rotation of 90 degrees in the 3-sphere around the horizontal line at infinity. I hadn’t heard that you can do a central projection onto a slightly lower paraboloid instead.
BTW, if you’re interested in Mercators map and its connection to mathematics you might enjoy this film that I helped make while at the TU Berlin:

Nice video.

@cgunn3 you might enjoy this conformal world map I made a few years ago:

Or my (unrelated) 2017 Bridges paper