Mapping Toolbox | ![]() ![]() |
Project 3-D lighted shaded relief of a general matrix map
Syntax
surflsrm(lat,long,map) surflsrm(lat,long,map,[azim elev]) surflsrm(lat,long,map,[azim elev],cmap) surflsrm(lat,long,map,[azim elev],cmap,clim) h = surflsrm(...)
Description
surfsrlm(lat,long,map) displays the general matrix map colored according to elevation and surface slopes. The current axes must have a valid map projection definition.
surfsrlm(lat,long,map,[azim elev]) displays the general matrix map with the light coming from the specified azimuth and elevation. Lighting is applied before the data is projected. Angles are in degrees, with the azimuth measured clockwise from North, and elevation up from the zero plane of the surface. By default, the direction of the light source is east (90° azimuth) at an elevation
of 45°.
surfsrlm(lat,long,map,[azim elev],cmap) displays the general matrix map using the provided colormap. The number of grayscales is chosen to keep the size of the shaded colormap below 256. By default, the colormap is constructed from 16 colors and 16 grays. If the vector of azimuth and elevation is empty, the default locations are used.
surfsrlm(lat,long,map,[azim elev],cmap,clim) uses the provided color axis limits, which by default, are automatically computed from the data.
h = surfsrlm(...) returns the handle to the surface drawn.
Remarks
This function effectively multiplies two colormaps, one with color based on elevation, the other with a grayscale based on the slope of the surface, to create a new colormap. This produces an effect similar to using a light on a surface, but with all of the visible colors actually in the colormap. Lighting calculations are performed on the unprojected data.
Examples
Create a new colormap using demcmap
with white colors for the sea and default colors for land. Use this colormap for the lighted shaded relief map of the Middle East region:
load mapmtx [cmap,clim] = demcmap(map1,[],[1 1 1],[]); axesm loximuth surflsrm(lt1,lg1,map1,[],cmap,clim)
See Also
meshlsrm |
Project 3-D lighted shaded relief of a regular matrix map |
meshm |
Display a regular matrix map warped to a projected graticule |
pcolorm |
Projected matrix map in the z = 0 plane |
shaderel |
Construct cdata and colormap for colored shaded relief |
surfacem |
Display a matrix map warped to a projected graticule |
surflm |
Display a lighted matrix map warped to a projected graticule |
surfm |
Display a matrix map warped to a projected graticule |
![]() | surflm | surfm | ![]() |