[yt-dev] camera rotation problem

Sam Skillman samskillman at gmail.com
Thu Sep 13 12:40:43 PDT 2012


Hi Geoffrey,

Can you try setting steady_north=True, north_vector=[0,0,1], and not
specify a rot_vector in the rotation call?

Sam

On Thu, Sep 13, 2012 at 12:51 PM, Geoffrey So <gsiisg at gmail.com> wrote:

> Short version:
>
> The following movie shows what's possible with yt-dev ~2.1
> The camera rotates about z axis of the data with a constant azimuthal
> angle w.r.t the z of the data:
> curl -O http://lca.ucsd.edu/~gso/test_movies/Density.avi
>
> The following movies shows what happens now if I have a rotation vector or
> no rotation vector
>
> Weird camera rotation:
> curl -O http://lca.ucsd.edu/~gso/test_movies/with_rot_vector.mpg
> Camera rotates about the "up" axis of the camera:
> curl -O http://lca.ucsd.edu/~gso/test_movies/no_rot_vector.mpg
>
> Long version:
>
> I brought this issue up a while back but got distracted before it was
> resolved, and over past two days did more digging/testing.
>
> symptom:
>
> I cannot rotate the camera about the z axis of the data while keeping the
> azimuthal angle constant anymore, where as I could do this before in I
> believe yt-dev 2.1ish.
>
> What I tried/found:
>
> I thought I mailed the dev list but couldn't dig it out of the yt-dev
> archive, so maybe I only complained in IRC before.  This thread is the
> latter portion where Nathan and Sam were helping me with helpful
> suggestions and what to try.
>
> http://lists.spacepope.org/htdig.cgi/yt-dev-spacepope.org/2012-August/002267.html
> The example script Sam provided (by not specifying the north_vector) will
> rotate the camera about the camera's z (up) axis, but not the data's z
> axis, if looking at the image, what I am trying to do is have the camera
> rotate around the disk about the axis normal to the disk's plane (assume
> disk is in x-y plane).
>
> I tried playing with the north_vector, steady_north in the camera object,
> and the rot_vector in cam.rotation, made sure the vectors are normalized.
>
> I found that if I specify the normal vector (usually designated "L" in
> example scripts) as the x or -x axis, and the north vector as the z axis, I
> can look at the data cube (in this case Enzo data), and watch it rotate
> about the z axis, the behavior I expected.  However, if my L is tilted not
> 90 degrees (non x or y axis), no matter what I specify as the north vector,
> the rotation angle changes and the cube wobbles or precesses.
>
> I've modified Sam's script to image the entire box, because it's harder to
> see the effect if we're looking at a sphere
> http://paste.yt-project.org/show/2689/
> This script will produce the strange rotation, if the rot_vector is taken
> out on line 17, then the rotation about the camera up is recovered.  But
> that's not what was done before and not what I wanted.
>
> I also wrote the script to reproduce the effect I wanted with the
> rotation, but this is a lot more work than before.  I have to specify a new
> L and a new up angle for the camera for every frame to get back the effect
> I wanted.
> http://paste.yt-project.org/show/2690/
>
> Hope this help track down the problem, cam.rotation is so much simpler to
> use :-)
>
> From
> G.S.
>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20120913/e108a080/attachment.htm>


More information about the yt-dev mailing list