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

abs(x)<br />

Math Functions<br />

Description<br />

returns the absolute value of its argument.<br />

acos(a) returns the arc cosine in the range 0 to π.<br />

asin(a)<br />

atan(yoverx), atan(y,x)<br />

ceil(x)<br />

cellnoise(v), cellnoise(u,v), cellnoise(pt),<br />

cellnoise(pt,t)<br />

clamp(a,min,max)<br />

returns the arc sine in the range −π/2 to π/2.<br />

with one argument returns the arc tangent in the<br />

range −π/2 to π/2 (1 argument) or −π to π (2<br />

arguments).<br />

returns the largest integer (expressed as a float) not<br />

greater than x.<br />

returns a value which is a pseudorandom function<br />

of its arguments and is constant within each cell defined<br />

by integer lattice points, but discontinuous at<br />

integer values. Its value is always between 0 and 1.<br />

<strong>The</strong> domain of this function can be 1-D (one float),<br />

2-D (two floats), 3-D (one point), or 4-D (one point<br />

and one float).<br />

returns min if a < min, max if a > max; otherwise<br />

a.<br />

cos(a) standard trigonometric function of radian<br />

arguments.<br />

degrees(rad)<br />

converts from radians to degrees.<br />

Du(p), Dv(p), Deriv(num,den) computes the derivatives of the arguments. <strong>The</strong><br />

type returned depends on the type of the first argument.<br />

Du and Dv compute the derivatives in the u<br />

and v directions, respectively. Deriv computes the<br />

derivative of the first argument with respect to the<br />

second argument.<br />

exp(x)<br />

filterstep(edge,s1,...)<br />

floor(x)<br />

log(x), log(x,base)<br />

max(a,b,...)<br />

min(a,b,...)<br />

mix(color0, color1, value)<br />

mod(a,b)<br />

returns pow(e,x).<br />

returns a filtered version of step.<br />

returns the smallest integer (expressed as a float)<br />

not smaller than x.<br />

returns the natural logarithm of x (x=log(exp(x)))<br />

(1 arg.) or the logarithm in the specified base<br />

(x=log(pow(base,x),base)) (2 args).<br />

returns the argument with maximum value.<br />

returns the argument with minumum value.<br />

returns a linearly interpolated color value.<br />

returns 0

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

Saved successfully!

Ooh no, something went wrong!