The RenderMan Interface - Paul Bourke
The RenderMan Interface - Paul Bourke
The RenderMan Interface - Paul Bourke
- 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.
U<br />
V<br />
0 1<br />
2<br />
3<br />
12 13<br />
14<br />
15<br />
4 5<br />
6 7<br />
8 9 10 11<br />
8 9 10 11<br />
4 5<br />
6 7<br />
12 13<br />
14 15 0 1<br />
V<br />
2<br />
3<br />
Typical Left-Handed<br />
Bezier Bicubic Patch<br />
Equivalent Right-Handed<br />
Bezier Bicubic Patch<br />
Figure 5.1: Bicubic patch vertex ordering<br />
This primitive is a compact way of specifying a quadrilateral mesh of patches. Each<br />
individual patch behaves as if it had been specified with RiPatch. type can be either<br />
”bilinear” or ”bicubic”. parameterlist is a list of token-array pairs where each token is<br />
one of the geometric primitive variables or a variable which has been defined with<br />
RiDeclare. <strong>The</strong> parameter list must include at least position (”P”, ”Pw” or ”Pz”) information.<br />
Patch mesh vertex data is supplied in first u and then v order just as for<br />
patches. <strong>The</strong> number of control points in a patch mesh is (nu)*(nv).<br />
Meshes can wrap around in the u or v direction, or in both directions. If meshes<br />
wrap, they close upon themselves at the ends and the first control points will be<br />
automatically repeated. As many as three control points may be repeated, depending<br />
on the basis matrix of the mesh. <strong>The</strong> way in which meshes wrap is indicated by giving<br />
a wrap mode value of either ”periodic” or ”nonperiodic”.<br />
<strong>The</strong> actual number of patches produced by this request depends on the type of the<br />
patch and the wrap modes specified. For bilinear patches, the number of patches in<br />
the u direction, nupatches, is given by<br />
nupatches =<br />
while for bicubic patches,<br />
⎧ (<br />
⎪⎨<br />
nupatches = (<br />
⎪⎩<br />
{<br />
nu if uwrap = ”periodic”<br />
nu − 1 if uwrap = ”nonperiodic”<br />
nu<br />
nustep<br />
nu−4<br />
nustep<br />
)<br />
if<br />
uwrap = ”periodic”<br />
)<br />
+ 1 if uwrap = ”nonperiodic”<br />
<strong>The</strong> same rules hold in the v direction. <strong>The</strong> total number of patches produced is equal<br />
to the product of the number of patches in each direction.<br />
70