<div dir="ltr">To add a little more to this, here's an example:<div><br></div><div>---</div><div><br></div><div><div>import pylab</div><div>from yt.mods import *</div><div><br></div><div># following <a href="http://yt-project.org/docs/2.6/examining/generic_array_data.html">http://yt-project.org/docs/2.6/examining/generic_array_data.html</a>                                  </div>
<div>arr = np.random.random(size=(64,64,64))</div><div>data = dict(Density = arr)</div><div>bbox = np.array([[-1.5, 1.5], [-1.5, 1.5], [-1.5, 1.5]])</div><div>pf = load_uniform_grid(data, arr.shape)</div><div><br></div><div>
import yt.visualization.volume_rendering.api as vr</div><div><br></div><div>c = (pf.domain_right_edge + pf.domain_left_edge)/2.0</div><div>L = np.array([-0.0, -1.0, -1.0])</div><div>W = 2.0*pf.domain_width</div><div>N = 720</div>
<div><br></div><div>tf = vr.ColorTransferFunction((0.0,1.0))</div><div>tf.add_layers(10, 0.1)</div><div><br></div><div>cam = vr.Camera(c, L, W, N, transfer_function=tf, pf=pf, fields=[('gas', 'Density')], log_fields=[False])</div>
<div><br></div><div>rot_vector=[0.0,0.0,1.0]</div><div>cam.rotate(2*np.pi/6., rot_vector=rot_vector)</div><div><br></div><div>im = cam.snapshot()</div><div>nim = cam.draw_domain(im)</div><div><br></div><div>pylab.imshow(nim)</div>
<div>pylab.savefig("test.png")</div></div><div><br></div><div><br></div><div>---</div><div><br></div><div>This generates a simple cube with the domain drawn, and it looks as I expect.  If I change Camera to PerspectiveCamera, but leave everything else unchanged, I get a blank image.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 24, 2014 at 4:41 PM, Michael Zingale <span dir="ltr"><<a href="mailto:michael.zingale@stonybrook.edu" target="_blank">michael.zingale@stonybrook.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'd like to try using the PerspectiveCamera instead of the normal orthographic Camera.  My script renders fine with Camera(), but I thought that I should be able to just change Camera() to PerspectiveCamera() and it should render with the perspective.  Instead, I get an empty rendering -- is there something else one needs to do to use the PerspectiveCamera rather than just changing the class name but otherwise keeping the argument list the same?<div>

<br></div><div>Mike<span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div>Michael Zingale</div><div>Associate Professor</div><div><br></div><div>Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800</div>

<div><i>phone</i>:  <a href="tel:631-632-8225" value="+16316328225" target="_blank">631-632-8225</a></div><div><i>e-mail</i>: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a></div>
<div><i>web</i>: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a></div>

</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Michael Zingale</div><div>Associate Professor</div><div><br></div><div>Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800</div>
<div><i>phone</i>:  631-632-8225</div><div><i>e-mail</i>: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a></div><div><i>web</i>: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a></div>

</div>