1. Help

# Spherical Panoramas

Hello, you either have JavaScript turned off or an old version of Adobe's Flash Player. Get the latest Flash player.

### Spherical Panoramas - Page Text Content

S: Spherical Panoramas

FC: Spherical Panoramas | Planar projections of panoramic photographs | Bruce Torrence

1: Spherical Panoramas Bruce Torrence 2012

3: However, a flat image is in many ways more accessible and practical than these computer-dependent applications. If we can find a mathematical mapping, or projection, that can map points from a sphere to a plane, then these viewable sphere panoramas can be printed and shared, hung on the wall, shown on a flat computer display, or included in a book or in Math Horizons. We need a function that takes points on the viewable sphere as input and outputs locations in the two-dimensional plane. Luckily, cartographers and astronomers have been addressing this problem for millennia. What keeps cartography both interesting and difficult is a theorem by Riemann, which states that any mapping from a sphere to a plane will introduce some sort of distortion. Cartographers are naturally concerned with which sorts of distortions a projection introduces and whether a projection is suitable for the map-user’s purpose. For instance, a specific projection might fail to preserve area, distances, angles, orientation, or any combination of these. To get an idea of how projections are created or chosen for a purpose, consider an example. The Mercator projection is well suited for navigation because a straight line on a Mercator map corresponds to a path a ship would take while keeping its compass bearing constant. However, the Mercator map is not ideal if equal area is a concern because of the large changes in scale, especially near the poles. | Let’s consider the equirectangular projection as a candidate to map viewable spheres. Even by cartography standards, it is old, attributed to Marinus of Tyre, circa 100 A.D. In this projection, the meridians (lines of longitude) are set as equally spaced vertical lines, and the parallels (lines of latitude) are equally spaced horizontal lines. For an equirectangular projection, you map a point from a sphere to a plane by simply renaming longitude and latitude to x and y, respectively. The left and right edges correspond to a single meridian line, while the top and bottom edges correspond to the North Pole and South Pole, respectively. The format yields an image with a 2:1 aspect ratio because it takes 360 degrees to go all the way around the world longitudinally, but only 180 degrees to go from the North Pole to the South Pole. The equirectangular projection is so straightforward and useful that it has become the de facto standard native format for storing digital versions of viewable spheres. A word of warning: In addition to cartography jargon such as meridians, parallels, equators, and poles, our discussion may include panorama terminology such as zenith (the point on the viewable sphere directly above the observer), nadir (the point below), and the horizon line.

4: Looking at this equirectangular projection, we see that everything is oriented well (things that are pointed upward in the visible sphere are pointing upward in the equirectangular projection). However, as we can see, the equirectangular projection is not very well suited for viewing the parts of the panoramas near the zenith or the nadir. There is a rather nasty horizontal stretching at the top and the bottom of the projection. Granted, these parts often comprise uninteresting flooring, grass, sky, or ceiling. But the features that are there are unrecognizable and can detract from the panorama’s aesthetics. We want to look for projections that produce panoramas where no features are skewed or stretched. Do such projections exist? Under a reasonable interpretation of the phrase “no features are skewed or stretched,” the answer is a resounding yes! | Conformal Mappings When looking at different attributes of projections, one property seems to be better suited for photographic content than others: conformality. Mathematically speaking, conformal mappings are mappings that preserve angles at a local level. For instance, if two curves meet at, say, a 45-degree angle on the viewable sphere, then their images in the plane under a conformal mapping will also meet at 45 degrees. To be conformal, a mapping must preserve every angle on the viewable sphere. Qualitatively speaking, conformal maps ensure that the imagery does not get sheared or skewed; there is no squishing and stretching of the sort that we see near the top and bottom of an equirectangular projection. (While delightfully simple, equirectangular projections are not conformal.) As a consequence of preserving angles, it can be shown that any squishing or stretching that does happen under a conformal mapping occurs in all directions uniformly. This ensures that small features retain their shapes, even though we can expect some variations in scale and orientation. In other words, small-scale details will keep their overall shape and appearance, but large-scale shapes might grow, | a | a | a

5: shrink, bend, or become distorted in some manner. This change of scale is not as problematic for photographic content as it is for maps perhaps because your eye tends to accept larger and smaller details as closer and farther away, respectively. The conformal stereographic projection is about as old as the equirectangular projection. It is attributed to Ptolemy in the second century A.D. It is one of the most popular projections for viewable spheres. If we imagine the viewable sphere itself as a translucent ball resting on a white floor, we could place a light bulb at the zenith of the sphere and then look at the floor. The imagery on the floor is the stereographic projection of the sphere. This mathematical function lives up to its name as an actual projection. | The stereographic projection of a viewable sphere is striking. Everything below the horizon is transformed to the interior of a circular region reminiscent of the little planet from Saint-Exupery’s Little Prince. So it is no surprise that these projections have been dubbed “Little Planets.” | In a stereographic projection, the nadir of the panorama is moved to the center of this little planet sphere. Because the nadir is so prominent, it is not uncommon to see panoramas that are taken from a point directly above a decorative floor element.

6: The horizon, which forms the equator of the viewable sphere, gets projected onto a circle. Everything below the horizon lands inside the circle, and everything above the horizon lands outside it. The photographic details at the horizon are such that the horizontal plane of the ground underfoot is parallel to the viewer’s line of sight. So when this horizon is mapped to a circle, it gives the appearance of being the edge of a sphere viewed head on. Lines to Circles Stereographic projection can be better understood by seeing what it does to a something as simple as a line in the original scene. What happens to the edge of a sidewalk or building, or to the edges of the book that you are now reading? Recall that we first project the three-dimensional scene onto the viewable sphere. We then apply stereographic projection to the spherical image. We need to follow a line in the original scene through these two stages. For the first stage, start with any line in the scene that does not contain the center O of the viewable sphere. It will be projected to a great circle on the viewable sphere, as shown in figure 3. To see why, simply note that the line together with the center O determine a plane. Since this plane passes through the | center of the viewable sphere, it intersects the sphere in a great circle. | For the second stage, we are left with the task of determining what happens to a great circle under stereographic projection. We will see that there are two distinct cases: those great circles on the sphere that pass through the zenith and those that do not. The first case is simple. Any great circle containing the zenith must also contain the nadir. Such circles are meridians; as such, they correspond to lines under stereographic projection. Every such line passes through the nadir at the center of the final image, and we could reasonably call them radial lines.

7: Since vertical lines in the original three-dimensional scene are portions of meridians on the viewable sphere, we conclude that vertical lines in the three-dimensional scene map to radial lines in the stereographic projection. More generally, any line meeting the horizon at a right angle corresponds to a meridian on the viewable sphere, and thus maps to a radial line in the stereographic projection. The second case is slightly less simple. It can be shown that any circle (great or otherwise) on the surface of the sphere, that does not pass through the zenith, will map under stereographic projection to another circle. See figure 4, and consult the Needham reference in the Further Reading section for details. This implies that lines in the original scene that are not meridians on the viewable sphere will map stereographically to circles. Lines that intersect the horizon at nearly a right angle (great circles that are nearly meridians on the viewable sphere) will map stereographically to large circles. Lines that are closer to horizontal will map to smaller circles. The smallest circle in the stereographic projection that corresponds to a line in the original scene is the horizon circle; no great circle on the sphere projects stereographically to something smaller. | So we have answered the question of what happens to linear features in the three-dimensional scene. Every straight line in the original scene becomes, under stereographic projection, either a portion of a radial line, or some portion of a circle, according to whether or not the original line corresponds to a meridian on the viewable sphere. Moreover, it is not hard to see that any sphere in the original scene projects to a circle on the viewable sphere, and thus also maps via stereographic projection to a circle. Straight lines and spheres become circles in a stereographic projection. Now close one eye again, and look for lines in the scene around you. Can you envision the stereographic projection of your viewable sphere? | This article first appeared in Math Horizons, Sept. 2011. Reproduced with permission.

8: Lisbon Oriente Station, Stereographic Projection, 2011

9: Ashland Station, Stereographic Projection, 2011

10: Lisbon Santa Apolonia Station, Stereographic Projection, 2011

11: Jardim da Manga, Stereographic Projection, 2011

12: Jardim da Manga, Equirectangular Panorama, 2011

13: Praca 8 de Maio, Equirectangular Panorama, 2011

14: Alfama district, Lisbon, Portugal, Stereographic Projection, 2011

15: View of Nazaré from the Sitio, Portugal, Stereographic Projection, 2011

16: Centrum Planet, Enchantment of the Seas, Stereographic Projection, 2011

17: Centrum Tunnel, Enchantment of the Seas, Stereographic Projection, 2011

19: A Walk in the Woods Equirectangular Panorama, 2011

20: Lisbon Alfama Park Lagrange Projection 2011

21: Poor Farm Park, equirectangular panorama, 2011 | Ashland Foliage Lagrange Projection 2011

22: Izzy Isn't DIzzy, Equirectangular Panorama, 2011

23: Center of the Universe, Stereographic Projection, 2011

24: Rua Augusta Arch, Lisbon, Stereographic Projection, 2011

25: Convento do Carmo, Stereographic Projection, 2011

26: Mall Bridge, Lisbon, Portugal, Stereographic Projection, 2011

27: Casino Royale, Stereographic Projection, 2011

28: Living Room, Stereographic Projection from North Pole, 2011

29: Living Room, Stereographic Projection from South Pole, 2011

30: Atop the Tower at Pena Palace, Stereographic Projection, 2011

31: MAA Carriage House, Stereographic Projection, 2011

32: Looking Over the Rail, Stereographic Projection, 2011

33: MAA Carriage House, equirectangular panorama, 2011 | Sunset on Deck Ten, Stereographic Projection, 2011

34: Pool Deck,Equirectangular Panorama, 2011

35: Sunset on the Tracks , Equirectangular Panorama, 2011

36: Garden Planet, Stereogaphic Projection, 2011

37: Izzy in the Garden, Stereographic Projection, 2011

38: Ashland Station under the Blossoms, Stereographic Projection, 2011

39: Alfama Neighborhood, Stereographic Projection, 2011

40: Courtyard at Pena Palace 2, Stereographic Projection, 2011

41: Stretchy Pants, Double Stereographic Projection, 2011

42: Loon Mountain Gondola, Equirectangular Panorama, 2011

43: Front Yard, Equirectangular Panorama, 2011

44: Math Seminar Planet, Stereographic Projection, 2011

45: Bruce, Eve, Zoe, Cyril, and a Cucumber, Tiling based on a Peirce Quincuncial Projection, 2011

46: Ashland Foliage Planet, Stereographic Projection, 2011

47: Praca 8 de Maio, Coimbra Portugal, stereographic projection, 2011

Sizes: mini|medium|large|ginormous
• By: Bruce T.
• Joined: almost 7 years ago
• Published Mixbooks: 2
No contributors