Navigation

Operators and Keywords

Function List:

C++ API

: specular (sx, sy, sz, lv, vv)
: specular (sx, sy, sz, lv, vv, se)

Calculate the specular reflection strength of a surface defined by the normal vector elements sx, sy, sz using Phong’s approximation.

The light source location and viewer location vectors are specified using parameters lv and vv respectively. The location vectors can given as 2-element vectors [azimuth, elevation] in degrees or as 3-element vectors [x, y, z].

An optional sixth argument specifies the specular exponent (spread) se. If not given, se defaults to 10.

See also: diffuse, surfl.

Package: octave