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.

SEE ALSO<br />

2 2 [ 0 0 1 1 ] 0 1<br />

”Pw” [ 1 0 0 1 1 1 0 1 0 2 0 2<br />

-1 1 0 1 -1 0 0 1 -1 -1 0 1<br />

0 -2 0 2 1 -1 0 1 1 0 0 1<br />

1 0 -3 1 1 1 -3 1 0 2 -6 2<br />

-1 1 -3 1 -1 0 -3 1 -1 -1 -3 1<br />

0 -2 -6 2 1 -1 -3 1 1 0 -3 1 ]<br />

RiPatch, RiPatchMesh, RiTrimCurve<br />

RiTrimCurve ( RtInt nloops, RtInt ncurves[], RtInt order[], RtFloat knot[],<br />

RtFloat min, RtFloat max, RtInt n[], RtFloat u[], RtFloat v[], RtFloat w[] )<br />

Set the current trim curve. <strong>The</strong> trim curve contains nloops loops, and each of these<br />

loops contains ncurves curves. <strong>The</strong> total number of curves is equal to the sum of all<br />

the values in ncurves. Each of the trimming curves is a non-uniform rational B-spline<br />

curve in homogeneous parameter space (u,v,w). <strong>The</strong> curves of a loop connect in headto-tail<br />

fashion and must be explicitly closed. <strong>The</strong> arrays order, knot, min, max, n, u, v,<br />

w contain the parameters describing each trim curve. All the trim curve parameters<br />

are concatenated together into single large arrays. <strong>The</strong> meanings of these parameters<br />

are the same as the corresponding meanings for a non-uniform B-spline surface.<br />

Trim curves exclude certain areas from the non-uniform B-spline surface definition.<br />

<strong>The</strong> inside must be specified consistently using two rules: an odd winding rule that<br />

states that the inside consists of all regions for which an infinite ray from any point<br />

in the region will intersect the trim curve an odd number of times, and a curve orientation<br />

rule that states that the inside consists of the regions to the “left” as the curve<br />

is traced.<br />

Trim curves are typically used to specify boundary representations of solid models.<br />

Since trim curves are approximations and not exact, some artifacts may occur at the<br />

boundaries between intersecting output primitives. A more accurate method is to<br />

specify solids using spatial set operators or constructive solid geometry (CSG). This<br />

is described in the section on Solids and Spatial Set Operations, p. 92.<br />

<strong>The</strong> list of Trim Curves is part of the attribute state, and may be saved and restored<br />

using RiAttributeBegin and RiAttributeEnd.<br />

RIB BINDING<br />

TrimCurve ncurves order knot min max n u v w<br />

<strong>The</strong> number of loops is determined implicitly by the length of the ncurves array.<br />

EXAMPLE<br />

RtInt nloops = 1;<br />

RtInt ncurves[1] = { 1 };<br />

RtInt order[1] = { 3 };<br />

74

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

Saved successfully!

Ooh no, something went wrong!