material
Sets the reflectance properties of surfaces and patches.
Category: Graphics > Formatting and Annotation
Syntax
material shiny
Strong specular highlights that take the color of the light.
material dull
No specular highlight, mostly diffuse reflection.
material metal
Strong specular highlight that takes the color of the surface.
material default
Restores the default values.
material([ka kd ks n sc])
Sets the five parameters directly.
Description
The setting changes the AmbientStrength, DiffuseStrength, SpecularStrength, SpecularExponent and SpecularColorReflectance properties of every surface and patch in the axes. A larger specular exponent makes the highlight smaller and sharper.
Like all lighting settings it has a visible effect only when a light is present in the axes.
Input arguments
[ka kd ks n sc]- Ambient, diffuse and specular strength, specular exponent and specular color reflectance.
Example
Shiny sphere
s = surf(sphere(40));
shading interp
lighting gouraud
camlight
material shiny
s.SpecularExponent
Output
ans = 10