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.

ottom<br />

top<br />

left right<br />

Screen Window<br />

Y<br />

Image plane<br />

(Screen coordinates)<br />

X<br />

Y<br />

Camera<br />

Perspective Viewing<br />

coordinates<br />

Frustum (Pyramid) Screen-to-Raster<br />

Z<br />

Mapping<br />

X<br />

Display device<br />

(Raster coordinates)<br />

X<br />

Crop Window<br />

Y<br />

xresolution * pixel-a.r.<br />

frame-a.r.<br />

Output image resolution<br />

yresolution<br />

Display maximum resolution<br />

xresolution<br />

Figure 4.1: Camera-to-Raster Projection Geometry<br />

<strong>The</strong> following example shows how to position a camera:<br />

RiBegin ();<br />

RiFormat ( xres, yres, 1.0 ); /* Raster coordinate system */<br />

RiFrameAspectRatio ( 4.0/3.0 ); /* Screen coordinate system */<br />

RiFrameBegin (0);<br />

RiProjection (”perspective,”...); /* Camera coordinate system */<br />

RiRotate (... );<br />

RiWorldBegin (); /* World coordinate system */<br />

...<br />

RiTransform (...); /* Object coordinate system */<br />

RiWorldEnd ();<br />

RiFrameEnd ();<br />

RiEnd ();<br />

<strong>The</strong> various camera procedures are described below, with some of the concepts illustrated<br />

in Figure 4.1, Camera-to-Raster Projection Geometry.<br />

22

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

Saved successfully!

Ooh no, something went wrong!