MATLAB Function Reference |
Controls the reflectance properties of surfaces and patches
Syntax
material shiny material dull material metal material([ka kd ks]) material([ka kd ks n]) material([ka kd ks n sc]) material default
Description
material
sets the lighting characteristics of surface and patch objects.
material shiny
sets the reflectance properties so that the object has a high specular reflectance relative to the diffuse and ambient light, and the color of the specular light depends only on the color of the light source.
material dull
sets the reflectance properties so that the object reflects more diffuse light and has no specular highlights, but the color of the reflected light depends only on the light source.
material metal
sets the reflectance properties so that the object has a very high specular reflectance, very low ambient and diffuse reflectance, and the color of the reflected light depends on both the color of the light source and the color of the object.
material([ka kd ks])
sets the ambient/diffuse/specular strength of the objects.
material([ka kd ks n])
sets the ambient/diffuse/specular strength and specular exponent of the objects.
material([ka kd ks n sc])
sets the ambient/diffuse/specular strength, specular exponent, and specular color reflectance of the objects.
material default
sets the ambient/diffuse/specular strength, specular exponent, and specular color reflectance of the objects to their defaults.
Remarks
The material
command sets the AmbientStrength
, DiffuseStrength
, SpecularStrength
, SpecularExponent
, and SpecularColorReflectance
properties of all surface and patch objects in the axes. There must be visible light objects in the axes for lighting to be enabled. Look at the materal.m
M-file to see the actual values set (enter the command type
material
).
See Also
light
, lighting
, patch
, surface
Lighting as a Visualization Tool for more information on lighting
Lighting for related functions
mat2str | matlabcolon (matlab:) |
© 1994-2005 The MathWorks, Inc.