<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Andrew,<br>
    <br>
    In addition to the steady_north parameter in the camera command,
    there is an north_vector parameter, so you can explicitly set what
    you want your viewing orientation to be.  I use that to good effect
    in the rotate-around-your-object animations.  Good luck!<br>
    <br>
    Cameron<br>
    <br>
    On 05/04/2011 09:34 AM, Sam Skillman wrote:
    <blockquote
      cite="mid:BANLkTikj=rpEahf7PKkYc6cDVfaqF3RwmQ@mail.gmail.com"
      type="cite">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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
              href="mailto:andrew.davis@yale.edu">andrew.davis@yale.edu</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            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
                        moz-do-not-send="true"
                        href="mailto:andrew.davis@yale.edu"
                        target="_blank">andrew.davis@yale.edu</a>      **<br>
                      **  Dept. of Astronomy          <a
                        moz-do-not-send="true" href="tel:203-432-5119"
                        value="+12034325119" target="_blank">203-432-5119</a>
                                           **<br>
                      **  Yale University             <a
                        moz-do-not-send="true"
                        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 moz-do-not-send="true"
              href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
            <a moz-do-not-send="true"
              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>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
yt-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>
<a class="moz-txt-link-freetext" href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Cameron Hummels
PhD Candidate, Astronomy Department of Columbia University
Public Outreach Director, Astronomy Department of Columbia University
NASA IYA New York State Student Ambassador
<a class="moz-txt-link-freetext" href="http://outreach.astro.columbia.edu">http://outreach.astro.columbia.edu</a> 
PGP: 0x06F886E3</pre>
  </body>
</html>