Graphics Programs Reference
In-Depth Information
material dull
The default is material default .
The material and lighting commands are simple interfaces for
changing the handle graphics properties that affect lighting. See the
Using MATLAB Graphics manual for more details. For now, we illus-
trate some of the fine tuning effects that you can achieve. Here is the
matlab logo, produced using the membrane function and illuminated:
h = light('pos',[-.5 .5 .1]);
axis off
The flat region near the light is a constant colour. That is because, by
default, the light rays are parallel to the line joining the position of the
light and the centre of the plot. To simulate a point source of light at
the position of the light, set the style property of the light to local :
As another example, the following uses various reflectance properties
of the (slightly roughened) sphere, along with a light off to one side, to
produce a simulated crescent moon (see moon.m in companion software).
First the spherical data points are randomized to produce a slightly
rough sphere:
[x,y,z] = sphere(100);
N = size(x,1);
Search WWH ::

Custom Search