Main Content

The Globe Display Compared with the Orthographic Projection

This example illustrates the differences between the two-dimensional orthographic projection, which looks spherical but is really flat, and the three-dimensional globe display. Use the Rotate 3D tool to manipulate the display.

Render 2-D Orthographic Projection

Load elevation raster data and a geographic cells reference object. Display the data using a two-dimensional orthographic map projection.

load topo60c
axesm ortho
framem
meshm(topo60c,topo60cR)
demcmap(topo60c)

Figure contains an axes. The axes contains 2 objects of type patch, surface.

View the map obliquely.

view(3)
daspectm('m',1)

Figure contains an axes. The axes contains 2 objects of type patch, surface.

You can view the map in 3-D from any perspective, even from underneath. To visualize this, define a geolocated data grid with the geographicGrid function, populate it with a constant z-value, and render it as a stem plot with stem3m.

topo60cRg = topo60cR;
topo60cRg.RasterSize = [20 20];
[latgrat,longrat] = geographicGrid(topo60cRg);
stem3m(latgrat,longrat,500000*ones(size(latgrat)),'r')

Figure contains an axes. The axes contains 4 objects of type patch, surface, line.

Use the Rotate 3D tool on the figure window toolbar to change your viewpoint. No matter how you position the view, you are looking at a disc with stems protruding perpendicularly.

Render 3-D Globe Display

Display the elevation data using a three-dimensional globe rather than an orthographic projection.

figure
axesm('globe','Geoid',earthRadius)
meshm(topo60c,topo60cR)
demcmap(topo60c)
view(3)

Figure contains an axes. The axes contains an object of type surface.

Include the stem plot to visualize the difference in surface normals on a sphere.

stem3m(latgrat,longrat,500000*ones(size(latgrat)),'r')

Figure contains an axes. The axes contains 3 objects of type surface, line.

You can apply lighting to the display, but its location is fixed, and does not move as the camera position is shifted.

camlight('headlight','infinite')

Figure contains an axes. The axes contains 3 objects of type surface, line.

You can use the LabelRotation property when you use the orthographic or any other Mapping Toolbox™ projection to align meridian and parallel labels with the graticule. Because the globe display is not a true map projection and is handled differently internally, LabelRotation does not work with it.

See Also

| | |