26.01.2015 Views

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Function<br />

comp(c, index)<br />

setcomp(c, index, value)<br />

Color Functions<br />

Description<br />

gets individual color component.<br />

sets individual color component.<br />

Function<br />

printf(format, val1, val2, ..., valn)<br />

format(pattern, val1, val2, ..., valn)<br />

concat(str1, ..., strn)<br />

match(pattern, subject)<br />

String Functions<br />

Description<br />

Prints the values of the specified variables on the<br />

standard output stream of the renderer. format<br />

uses ”%f”, ”%p”, ”%c”, and ”%s” to indicate float,<br />

point, color and string, respectively.<br />

Returns a formatted string (using the same rules as<br />

printf).<br />

Returns a concatenated string.<br />

String pattern matching.<br />

Function<br />

ambient()<br />

diffuse(N)<br />

phong(N, V, size)<br />

specular(N, V, roughness)<br />

specularbrdf(L, N, V, roughness)<br />

trace(P, R)<br />

Shading and Lighting Functions<br />

Description<br />

returns the total amount of ambient light incident<br />

upon the surface.<br />

returns the diffuse component of the lighting<br />

model.<br />

implements the Phong specular lighting model.<br />

returns the specular component of the lighting<br />

model. N is the normal to the surface. V is a vector<br />

from a point on the surface towards the viewer.<br />

returns the specular reflection contribution of a<br />

particular light direction.<br />

returns the incident light falling on a point P in a<br />

given direction R.<br />

207

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!