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 />

area(P)<br />

calculatenormal(P)<br />

depth(P)<br />

distance(p1, p2)<br />

faceforward(N, I)<br />

fresnel(I, N, eta, Kr, Kt [, R, T])<br />

length(V)<br />

Geometric Functions<br />

Description<br />

returns the differential surface area.<br />

returns surface normal given a point on the<br />

surface.<br />

returns the depth of the point P in camera coordinates.<br />

<strong>The</strong> depth is normalized to lie between 0<br />

(at the near clipping plane) and 1 (at the far clipping<br />

plane).<br />

returns the distance between two points.<br />

flips N so that it faces in the direction opposite to<br />

I.<br />

returns the reflection coefficient Kr and refraction<br />

(or transmission) coefficient Kt given an incident<br />

direction I, the surface normal N, and the relative<br />

index of refraction eta. Optionally, this procedure<br />

also returns the reflected (R) and transmitted (T)<br />

vectors.<br />

returns the length of a vector.<br />

normalize(V) returns a unit vector in the direction of V.<br />

ptlined(Q, P1, P2)<br />

transform(fromspace, tospace, P)<br />

vtransform(fromspace, tospace, V)<br />

ntransform(fromspace, tospace, N)<br />

reflect(I, N)<br />

refract(I, N, eta)<br />

setxcomp(P, x), setycomp(P, y),<br />

setzcomp(P, z)<br />

xcomp(P), ycomp(P), zcomp(P)<br />

returns the distance from Q to the line segment<br />

joining P1 and P2.<br />

transforms the point P from the coordinate system<br />

fromspace to the coordinate system tospace.<br />

If fromspace is absent, it is assumed to be the<br />

”current” coordinate system.<br />

transforms the vector V from the coordinate system<br />

fromspace to the coordinate system tospace.<br />

If fromspace is absent, it is assumed to be the<br />

”current” coordinate system.<br />

transforms the normal N from the coordinate system<br />

fromspace to the coordinate system tospace.<br />

If fromspace is absent, it is assumed to be the<br />

”current” coordinate system.<br />

returns the reflection vector given an incident direction<br />

I and a normal vector N.<br />

returns the transmitted vector given an incident<br />

direction I, the normal vector N and the relative<br />

index of refraction eta.<br />

sets the x, y, or z component.<br />

gets the x, y, or z component.<br />

206

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

Saved successfully!

Ooh no, something went wrong!