Mapping Toolbox | ![]() ![]() |
Project three-dimensional shaded surface with lighting on a map axes
Syntax
h = surflm(map) h = surflm(map,s) h = surflm(lat,lon,map) h = surflm(lat,lon,map,s) h = surflm(lat,lon,map,s,k)
Description
surflm
is like surfm
except that it shades the monochrome map surface with a light source, and the only allowed graticule is the size of the map matrix.
h = surflm(map) displays the matrix map map
projected to a graticule grid the size of map
in accordance with the current map axes MapProjection
property. It is displayed with a default light source. The handle h
of the displayed surface object can be returned.
h = surflm(map,s) specifies the direction of the light source. s
is a two- or three-element vector that specifies the direction from the surface map to the light source. s=[sx sy sz]
or s=[azimuth elevation]
. The default s
is 45º counterclockwise from the current view direction.
h = surflm(lat,lon,map) allows you to specify your graticule. lat
and lon
can be vectors with elements corresponding to map
rows and columns, respectively, or they can be matrices the size of map
. The resulting graticule will be the size of map
.
h = surflm(lat,lon,map,s,k) specifies the reflectance constant. k
is a four-element vector defining the relative contributions of ambient light,
diffuse reflection, specular reflection, and the specular shine coefficient. k=[ka,kd,ks,shine]
and defaults to [.55 .6 .4 10]
.
Examples
To see this, type the following. The graticule is the size of topo (180 x 360) and is rendered in 3-D, so it might take a while. It is also memory intensive:
See Also
surfm |
Matrix map projected on map axes |
![]() | surfacem | surflsrm | ![]() |