MATLAB Function Reference
  Go to function:
    Search    Help Desk 
material    See Also

Controls the reflectance properties of Surfaces and Patches

Syntax

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 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, 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 metal 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



[ Previous | Help Desk | Next ]