Hi Andrew,<div><br></div><div>I have seen this before, and my recollection was that it was solved by first moving to the Camera interface for volume renderings, which is documented here:</div><div><br></div><div><a href="http://yt.enzotools.org/doc/visualizing/volume_rendering.html#the-camera-interface">http://yt.enzotools.org/doc/visualizing/volume_rendering.html#the-camera-interface</a> </div>

<div><br></div><div>and here:</div><div><br></div><div><a href="http://yt.enzotools.org/doc/reference/api/generated/yt.visualization.volume_rendering.camera.Camera.html#yt.visualization.volume_rendering.camera.Camera">http://yt.enzotools.org/doc/reference/api/generated/yt.visualization.volume_rendering.camera.Camera.html#yt.visualization.volume_rendering.camera.Camera</a></div>

<div><br></div><div>and by then using the keyword steady_north=True in the Camera object initialization.  This attempts to keep the "up" orientation constant while moving the camera during rotations, translations, etc.  This may not be necessary, but I have found it useful.</div>

<div><br></div><div>I will also note that there are other benefits to using the Camera interface, such as access to the Camera.rotation(theta, n_steps, rot_vector=None) function, which returns a series of n_steps snapshots rotating through an angle of theta.  Here the optional "rot_vector" can be used to specify the vector about which you want to rotate, but if none is specified then it uses the current north vector, which is probably what you want. </div>

<div><br></div><div>Let us know if this helps!</div><div><br></div><div>Best,</div><div>Sam</div><div><br><div class="gmail_quote">On Wed, May 4, 2011 at 9:14 AM, Andrew Davis <span dir="ltr"><<a href="mailto:andrew.davis@yale.edu">andrew.davis@yale.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div>Hi folks,</div><div><br></div><div>I'm doing some simple volume rendering, with the end goal to make a movie looking at the central object from a bunch of different angles (just going around in a circle).  When I do the script below, some of the images are rotated 90 degrees from the others -- that is, the correct viewing direction, but just rotated clockwise 90 degrees.  Any thoughts why that would be happening?</div>

<div><br></div><div>Cheers,</div><div><br></div><div>Andrew</div><div><br></div><div>tf=ColorTransferFunction((mi,ma))</div><div>tf.add_layers(6,w=0.02)</div><div>v,c=pf.h.find_max("Density")</div><div>W = 0.01/pf['pc']</div>

<div>Nvec=512</div><div>for i in range(200):</div><div>   dy=4.*math.pi/199.</div><div>   theta = i * dy</div><div>   yval = math.cos(theta)</div><div>   xval = math.sin(theta)</div><div>   L=[xval,yval,0.]</div><div>   vp=pf.h.volume_rendering(L,W,c,Nvec,tf,whole_box=True)</div>

<div>   vp.ray_cast()</div><div>   write_bitmap(vp.image,"VolTest_%03d.png" % i)</div><div><br></div><div>
<div style="word-wrap:break-word"><div><div>*************************************************************<br>**  Andrew J. Davis             <a href="mailto:andrew.davis@yale.edu" target="_blank">andrew.davis@yale.edu</a>      **<br>

**  Dept. of Astronomy          <a href="tel:203-432-5119" value="+12034325119" target="_blank">203-432-5119</a>                      **<br>**  Yale University             <a href="http://www.astro.yale.edu/adavis" target="_blank">www.astro.yale.edu/adavis</a>   **<br>

*************************************************************</div></div><div><br></div></div><br><br>
</div>
<br></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>