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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

particle. If a primitive variable is of class varying or vertex, the array contains npoints<br />

data values of the appropriate type, i.e., one per particle. If the variable is uniform or<br />

constant, the array contains a single element.<br />

<strong>The</strong> size, in object space, of each particle can be specified in the parameter list by<br />

using the primitive variable ”width”, which provides a varying float. If ”width” is not<br />

specified in the parameter list then it will default to 1.0, meaning that all particles<br />

should have an apparent diameter 1.0 units in object space. If all the points are of the<br />

same size, the user may specify the variable ”constantwidth”, which is defined as type<br />

constant float to supply a single width value for all points.<br />

Each particle is treated independently. This means a particle is shaded only once and<br />

does not have access to derivative information.<br />

RIB BINDING<br />

Points ...parameterlist...<br />

<strong>The</strong> number of points is determined implicitly by the length of the ”P” array.<br />

EXAMPLE<br />

Points ”P” [.5 -.5 0 -.5 -5 0 -.5 .5 0 .5 .5 0] ”width” [.1 .12 .05 .02]<br />

RiCurves ( RtToken type, RtInt ncurves, RtInt nvertices[], RtToken wrap, ...parameterlist...)<br />

Draws ncurves number of lines, curves, or ribbon-like particles of specified width<br />

through a set of control vertices. Multiple disconnected individual curves may be<br />

specified using one call to RiCurves. <strong>The</strong> parameter ncurves is the number of individual<br />

curves specified by this command, and nvertices is an array of length ncurves<br />

integers specifying the number of vertices in each of the respective curves.<br />

<strong>The</strong> interpolation method given by type can be either ”linear” or ”cubic”. Cubic curves<br />

interpolate using the v basis matrix and step size set by RiBasis. <strong>The</strong> u parameter<br />

changes across the width of the curve (if it has any discernable width), whereas the v<br />

parameter changes across the length of the curve (i.e., the direction specified by the<br />

control vertices). Curves may wrap around in the v direction, depending on whether<br />

wrap is ”periodic” or ”nonperiodic”. Curves that wrap close upon themselves at the<br />

ends and the first control points will be automatically repeated. As many as three<br />

control points may be repeated, depending on the basis matrix of the curve.<br />

parameterlist is a list of token-array pairs where each token is one of the standard<br />

geometric primitive variables, a variable that has been defined with RiDeclare, or is<br />

given as an inline declaration. <strong>The</strong> parameter list must include at least position (”P” or<br />

”Pw”) information. <strong>The</strong> width along the curve may be specified with either a special<br />

”width” parameter that is a varying float argument, or a ”constantwidth” parameter that<br />

is a constant float (one value for the entire RiCurves). Widths are specified in object<br />

space units of the curve. If no ”width” vector or ”constantwidth” value is given, the<br />

default width is 1.0 units in object space.<br />

Primitive variables of class constant should supply a single value of the appropriate<br />

type for the entire RiCurves. Primitive variables of class uniform should supply a<br />

84

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

Saved successfully!

Ooh no, something went wrong!