The RenderMan Interface - Paul Bourke
The RenderMan Interface - Paul Bourke
The RenderMan Interface - Paul Bourke
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
No checking is done by the <strong>RenderMan</strong> <strong>Interface</strong> to ensure that polygons are planar<br />
and nondegenerate. <strong>The</strong> rendering program will attempt to render invalid polygons<br />
but the results are unpredictable.<br />
RIB BINDING<br />
GeneralPolygon nvertices ...parameterlist...<br />
<strong>The</strong> number of loops in the general polygon is determined implicitly by the length of<br />
the nvertices array.<br />
EXAMPLE<br />
GeneralPolygon [4 3] ”P” [ 0 0 0 0 1 0 0 1 1 0 0 1<br />
0 0.25 0.5 0 0.75 0.75 0 0.75 0.25 ]<br />
SEE ALSO<br />
RiPolygon, RiPointsPolygons, RiPointsGeneralPolygons<br />
RiPointsPolygons ( RtInt npolys, RtInt nvertices[], RtInt vertices[], ...parameterlist...)<br />
Define npolys planar convex polygons that share vertices. <strong>The</strong> array nvertices contains<br />
the number of vertices in each polygon and has length npolys. <strong>The</strong> array vertices<br />
contains, for each polygon vertex, an index into the varying primitive variable<br />
arrays. <strong>The</strong> varying arrays are 0-based. vertices has length equal to the sum of all<br />
of the values in the nvertices array. Individual vertices in the parameterlist are thus<br />
accessed indirectly through the indices in the array vertices.<br />
parameterlist is a list of token-array pairs where each token is one of the standard geometric<br />
primitive variables or a variable that has been defined with RiDeclare. <strong>The</strong><br />
parameter list must include at least position (”P”) information. If a primitive variable<br />
is of class vertex or varying, the array contains n elements of the type corresponding<br />
to the token, where the number n is equal to the maximum value in the array vertices<br />
plus one. If the variable is uniform, the array contains npolys elements of the associated<br />
type. If the variable is constant, the array contains exactly one element of the<br />
associated type. <strong>The</strong> number of floats associated with each type is given in Table 5.1,<br />
Standard Geometric Primitive Variables. <strong>The</strong> interpretation of these variables is the<br />
same as for a convex polygon.<br />
No checking is done by the <strong>RenderMan</strong> <strong>Interface</strong> to ensure that polygons are planar,<br />
convex and nondegenerate. <strong>The</strong> rendering program will attempt to render invalid<br />
polygons but the results are unpredictable.<br />
RIB BINDING<br />
PointsPolygons nvertices vertices ...parameterlist...<br />
<strong>The</strong> number of polygons is determined implicitly by the length of the nvertices array.<br />
EXAMPLE<br />
PointsPolygons [3 3 3] [0 3 2 0 1 3 1 4 3]<br />
”P” [0 1 1 0 3 1 0 0 0 0 2 0 0 4 0]<br />
”Cs” [0 .3 .4 0 .3 .9 .2 .2 .2 .5 .2 0 .9 .8 0]<br />
66