sphere_stereograph


sphere_stereograph, a FORTRAN90 code which implements the standard stereographic mapping between the unit sphere and the plane Z=1, as well as a generalization of this mapping.

The stereographic projection preserves angles, and is a conformal mapping. This implies, for instance, that the Delaunay triangulation of a sphere maps to a corresponding Delaunay triangulation of the plane.

Circles on the sphere that do not pass through the focus will be projected to circles on the plane. Circles on the sphere that do pass through the focus will be projected to straight lines on the plane.

The Standard Projection

We start with a sphere of radius 1 and center C = (0,0,0).

A plane is chosen, tangent to the sphere, at a point of tangency T which we take to be the "north pole", T = (0,0,1). We use a focus point F, which we take to be the "south pole", (0,0,-1)

For any point P on the sphere, the stereographic projection Q of the point is defined by drawing the line from F through P, and computing Q as the intersection of this line with the plane.

For any point Q on the plane, the stereographic inverse projection P of the point is defined by drawing the line from F through Q, and computing P as the intersection of this line with the sphere.

The function sphere_stereograph carries out the standard projection, and sphere_stereograph_inverse does the inverse.

Projection with arbitrary center and focus

One way to generalize the projection is to allow the center C and focus point F to be arbitrary. If we assume the point of tangency is antipodal to F then T = 2*C-F. Once these points are defined, the stereographic projection relative to F, C, and T can be set up in the same way as before.

The function sphere_stereograph2 carries out the generalized projection, and sphere_stereograph2_inverse does the inverse.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

sphere_stereograph is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

GEOMETRY, a FORTRAN90 code which performs geometric calculations in 2, 3 and M dimensional space.

SPHERE_CVT, a FORTRAN90 code which creates a mesh of well-separated points on a unit sphere using a Centroidal Voronoi Tessellation (CVT).

SPHERE_DELAUNAY, a FORTRAN90 code which computes and plots the Delaunay triangulation of points on the unit sphere.

SPHERE_DESIGN_RULE, a FORTRAN90 code which returns point sets on the surface of the unit sphere, known as designs, which can be useful for estimating integrals on the surface.

SPHERE_GRID, a FORTRAN90 code which provides a number of ways of generating grids of points, or of points and lines, or of points and lines and faces, over the unit sphere.

SPHERE_LEBEDEV_RULE, a FORTRAN90 code which computes Lebedev quadrature rules for the unit sphere;

sphere_stereograph_test

SPHERE_VORONOI, a FORTRAN90 code which computes and plots the Voronoi diagram of points on the unit sphere.

STRIPACK, a FORTRAN90 code which computes the Delaunay triangulation or Voronoi diagram of points on a unit sphere, by Robert Renka.

STRIPACK_DELAUNAY, a FORTRAN90 code which reads a set of points on the unit sphere, computes the Delaunay triangulation, and writes it to a file.

Reference:

  1. C F Marcus,
    The stereographic projection in vector notation,
    Mathematics Magazine,
    Volume 39, Number 2, March 1966, pages 100-102.

Source Code:


Last revised on 30 August 2020.