Note that here "rectangle" refers to a spherical rectangle, specifically a degenerate rectangle that lies entirely on a great circle, with interior angles of 180°. It is rectangular in the sense that opposite edges must have the same lengths, but adjacent edges may have different lengths. Regardless, its projection will still take the form of a Euclidean square.
Here's a picture of the projection in square Guyou aspect (explained below) with the hemispheres separated at 20°W and 160°E: Contrast the actual Guyou projection, which is conformal. They look very similar, to the point that you'd have to view them side-by-side to tell the difference, but this is a compromise projection, with (slightly) worse angles but (slightly) better areas than the conformal Guyou projection.
To my knowledge, this is the first-ever non-conformal polyhedral projection to maintain smoothness everywhere except the vertices.
Okay, so if it's not a conformal projection, then what's so great about it?
Other than being smooth, of course.
Well, it meets the theoretical optimum resolution-efficiency for any rectangular dihedral projection (which, as I explained there, is valuable for ensuring that no information is lost, as well as making good compromise projections in general). In fact, it has the same resolution-efficiency as the plate carree projection, while having less extreme singularities. (Indeed, the plate carree can be obtained as a special case of this one, in the limit as two corners approach the same point.) That means I would seriously recommend considering this projection for any application where you'd consider using the plate carree projection!
It's definitely my favorite so far of any of the projections I've invented myself. (Admittedly, there aren't many of those that weren't jokes.)
Although it is provably optimal in its category, it is not necessarily the only optimal projection. There could be others tied with it, that might be considered better in some more nebulous aspect. (In fact, I already have developed another resolution-optimal projection some time ago, although it is patently worse since it isn't smooth.) However, this projection certainly looks pretty good to me.
Also, it doesn't require elliptic functions to calculate. That's one major advantage over the Guyou projection.
In fact, although it took quite some time to stumble across the idea and work out the details, once I was done the final projection turned out to be surprisingly simple.
The x coordinate of the projection of a point is given by one of:
- The semiminor axis of the ellipse containing the point whose focus points are the top-left and bottom-left corners.
- The semiminor axis of the ellipse containing the point whose focus points are the top-right and bottom-right corners.
- The reciprocal eccentricity of the hyperbola containing the point whose focus points are the top-left and top-right corners.
- The reciprocal eccentricity of the hyperbola containing the point whose focus points are the bottom-left and bottom-right corners.
The y coordinate of the projection of a point is given by one of:
- The semiminor axis of the ellipse containing the point whose focus points are the top-left and top-right corners.
- The semiminor axis of the ellipse containing the point whose focus points are the bottom-left and bottom-right corners.
- The reciprocal eccentricity of the hyperbola containing the point whose focus points are the top-left and bottom-left corners.
- The reciprocal eccentricity of the hyperbola containing the point whose focus points are the top-right and bottom-right corners.
It follows trivially that horizontal and vertical lines in the projection will correspond to ellipses on the sphere.
The semiminor axis of an ellipse is given by:
semiminor = acos(cos(sum_of_distances_to_foci / 2) / cos(distance_between_foci / 2))
The reciprocal eccentricity of a hyperbola (which is also an ellipse, but shh, don't tell anyone) is given by:
1/eccentricity = asin(sin(difference_between_distances_to_foci / 2) / sin(distance_between_foci / 2))
...Or at least, that's what I think this value should be called, based on trying to find the closest planar analogue. I initially just called it a semiminor axis too, but that appears to not be correct. Regardless, whatever the above value is called is what we're interested in. Up to congruence (in the choice of applying asin versus acos), it's the equivalent of the semiminor axis of the ellipse when one focus is flipped to its antipode.
The definitions in terms of acos are more convenient if you want the Cartesian coordinate (0,0) to lie at a corner of the square (as you typically would when generating computer graphics), while the definitions in terms of asin are more convenient if you want the Cartesian coordinate (0,0) to lie at the center of the square.
Thus, using the computer graphics convention, we get:
x(P) = acos(cos((d(P,TL) + d(P,BL)) / 2) / cos(d(TL,BL) / 2)) = acos(sin((d(P,TR) - d(P,TL)) / 2) / sin(d(TL,TR) / 2))
y(P) = acos(cos((d(P,TL) + d(P,TR)) / 2) / cos(d(TL,TR) / 2)) = acos(sin((d(P,BL) - d(P,TL)) / 2) / sin(d(TL,BL) / 2))
...where d is the usual great-circle distance. It's convenient to use the first form for x and the second form for y, or vice versa, since this means only two distances need to be computed.
The inverse form is trickier. Working backwards from these equations, we can find:
d(P,TL) = acos(cos(y) * cos(d(TL,TR) / 2)) - asin(cos(x) * sin(d(TL,TR) / 2))
d(P,TR) = acos(cos(y) * cos(d(TL,TR) / 2)) + asin(cos(x) * sin(d(TL,TR) / 2))
One can then use the following formulae to convert the two-point equidistant projection to an azimuthal equidistant projection:
distance = acos((cos(d(P,TL)) + cos(d(P,TR))) / (2 * cos(d(TL,TR) / 2)))
azimuth = acos((cos(d(P,TL)) - cos(d(P,TR))) / (2 * sin(d(TL,TR) / 2)) / sin(distance))
In fact, it's possible to cut down on the trigonometric functions a little:
distance = acos(cos(y) * √(1 - (cos(x) * sin(d(TL,TR) / 2))2))
azimuth = acos(cos(x) * √(1 - (cos(y) * cos(d(TL,TR) / 2))2) / sin(distance))
This gives azimuthal coordinates centered on the midpoint of the TL-TR edge, not on the midpoint of the square. It can then be converted to standard longitude-latitude coordinates using the usual oblique detransformation:
longitude = atan2(sin(distance)*sin(azimuth-top_center_bearing), cos(top_center_latitude)*cos(distance) + sin(top_center_latitude)*sin(distance)*cos(azimuth-top_center_bearing)) + top_center_longitude
latitude = asin(sin(top_center_latitude)*cos(distance) - cos(top_center_latitude)*sin(distance)*cos(azimuth-top_center_bearing))
Phew! Possibly this can be crunched down further, but this is the version which I use and it works.
The Tissot distortion parameters are, unfortunately, difficult to calculate. I figured them out, see below! We can make the following observations:
- The Tissot semiminor axis is, at all points, greater than or equal to one. This is, in fact, the property that makes the projection to be resolution-efficiency-optimal (in combination with its total area). However, it is not constant one (the way the plate carree or azimuthal equidistant projections are), so it is not a constant-resolution projection. I'm not sure if trying to find a constant-resolution projection would actually improve it, since the decrease in semiminor axes across the projection would necessarily come with an increase in semimajor axes, probably resulting in an increase in angle distortion, but it's something to look out for, anyway.
- Both semiminor and semimajor axis, and consequently scale, are unbounded and approach infinity near the vertices. However, they remain much lower across the majority of the projection, and of course the projection as a whole still has a finite (and quite compact) area.
- Angle distortion, on the other hand, is sharply bounded: in the square case, the semimajor axis is never more than √2 times the semiminor axis. (In the rectangular case, the ratio is 1/sin(half length of shorter edge). Notice how this tends to infinity in the limit.) Therefore, although not conformal, angles are preserved quite well overall. (Since I mentioned that resolution-optimal projections aren't unique, I have to wonder if this projection has minimax angle distortion within its category, which would give a solid motivation for using it.) In the square case, the projection is conformal on the diagonals (but not constant scale, of course), while the worst angle distortion lies at the midpoints of the edges, away from the vertices (which have the worst area distortion). The rectangular case is more coplicated, as angle distortion will drop to normal at the longer edge, but increase to infinity at the shorter edge.
- In the face-polar, or Peirce, aspect, all four corners lie in the equator. In the square case, this allow one degree of freedom (a longitude). In the rectangular case, this allows two degrees of freedom (two longitudes). The square case is obtained when the longitudes are 90° apart. In the limit as the longitudes approach either equality or antipodality, one obtains a transverse plate carree projection.
- In the edge-polar, or Guyou, aspect, two corners lie at equal distances on opposite sides of the north pole, and the other two likewise for the south pole. In the square case, this allows one degree of freedom (a longitude). In the rectangular case, this allows two degrees of freedom (a longitude and a latitude). The square case is obtained when the latitude equals 45°. In the limit case as the latitude approaches 90°, one obtains a normal plate carree projection. In the limit case as the latitude approaches 0°, one obtains a transverse plate carree projection.
- In the vertex-polar, or Adams, aspect, two corners lie at the poles, and the other two lie on the equator. In the square case, this allows one degree of freedom (a longitude). There is no natural way to extend this to the rectangular case. (One could place a rectangles with two vertices at the poles and the other two oblique, but this lacks the symmetry of rectangular projections in Peirce or Guyou aspect. If one did try it, the limit case would be a normal plate carree projection.)
- All aspects other than those three are considered oblique. This allows three degrees of freedom in the square case and four in the rectangular case, so always two more degrees of freedom than any of the above "normal" aspects.
Although, as usual, I haven't implemented graticules into my projector, here is a rendition of the projection's graticules made in gnuplot: The code used for this is:
Code: Select all
set parametric
set size ratio -1
unset xtics
unset ytics
unset xzeroaxis
unset yzeroaxis
unset key
set multiplot layout 1,2
x(longitude, latitude) = asin(sin((+ acos((sin(latitude) - cos(latitude)*sin(longitude)) / sqrt(2)) - acos((+ sin(latitude) + cos(latitude)*sin(longitude)) / sqrt(2))) / 2) * sqrt(2))
y(longitude, latitude) = asin(sin((+ acos((sin(latitude) - cos(latitude)*sin(longitude)) / sqrt(2)) - acos((- sin(latitude) - cos(latitude)*sin(longitude)) / sqrt(2))) / 2) * sqrt(2))
set title 'Guyou'
plot [-pi/2:+pi/2] [-pi/2:+pi/2] [-pi/2:+pi/2] for[i=-6:+6] x(t, pi*i/12), y(t, pi*i/12) lc 1, for[i=-5:+5] x(pi*i/12, t), y(pi*i/12, t) lc 1
x(longitude, latitude) = asin(-cos((acos(cos(latitude)*cos(longitude)) + acos(cos(latitude)*sin(longitude))) / 2) * sqrt(2))
y(longitude, latitude) = asin( sin((acos(cos(latitude)*cos(longitude)) - acos(cos(latitude)*sin(longitude))) / 2) * sqrt(2))
set title 'Peirce'
plot [-pi/2:+pi/2] [-pi/2:+pi/2] [-pi/2:+pi/2] for[i=1:6] x(t*2, pi*i/12), y(t*2, pi*i/12) lc 1, for[i=0:23] x(pi*i/12, t/2+pi/4), y(pi*i/12, t/2+pi/4) lc 1
Concentric circles around the center of the square, such as parallels in the Peirce aspect, are mapped as curves satisfying cos(x) * cos(y) = cos(r). I discovered this formula quite some time ago, so I'm happy to finally find a practical use for it!
Finally, here's my implementation, with Linux binary and C source code: What's left to do:
- Figure out how to extend the principle used here to other polyhedra besides the rectangular dihedron.
- Figure out analogous equal-area projections.
- Convince people to actually use this projection!