This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Calculate specular reflectance


R = specular(Nx,Ny,Nz,S,V)


R = specular(Nx,Ny,Nz,S,V) returns the reflectance of a surface with normal vector components [Nx,Ny,Nz]. S and V specify the direction to the light source and to the viewer, respectively. You can specify these directions as three vectors[x,y,z] or two vectors [Theta Phi (in spherical coordinates).

The specular highlight is strongest when the normal vector is in the direction of (S+V)/2 where S is the source direction, and V is the view direction.

The surface spread exponent can be specified by including a sixth argument as in specular(Nx,Ny,Nz,S,V,spread).