[yt-users] Rotations in off_axis_projection

James Guillochon jfg at ucolick.org
Fri Jan 10 08:01:40 PST 2014


Hi Matt, yes I was able to resolve the issue, I need to first rotate the
domain (an operation that is specific to my problem) before applying the
inverse of the transformation (as I wanted to rotate the domain a certain
way, the operation requires applying the inverse transformation to the
camera position). For future reference, and because this wasn't clear to
me, for FLASH data at least setting the normal vector to [0,0,1] and the
north vector to [0,1,0] are the "natural" coordinates, i.e. the image x/y
will equal the domain x/y. By default, the image and domain coordinates do
not match.

Thanks for the help,
- James


On Fri, Jan 10, 2014 at 9:25 AM, Matthew Turk <matthewturk at gmail.com> wrote:

> Hi James,
>
>
> On Thursday, January 9, 2014, James Guillochon wrote:
>
>> Hi everyone,
>>
>> I have a 3D simulation FLASH that I wish to rotate and then project using
>> YT. I know the transformation matrix needed to rotate the domain such that
>> the projection is correct, depicted in this image:
>> http://i.imgur.com/AOmY6Ao.png. In the image, the dashed lines are the
>> original coordinate system, where the original "north_vector" is the red
>> dashed line, and the original "normal_vector" is a green dashed line that
>> points out of the plane (not visible). The rotated coordinates are shown by
>> the solid lines. The transformation matrix A is:
>>
>> A =
>> 0.0478113 -0.345249 0.937292
>> 0.912293 -0.367011 -0.181724
>> -0.406737 -0.863774 -0.297421
>>
>> My question is what should I set "normal_vector" and "north_vector" to to
>> get the proper projection. I tried just doing A.normal and A.north, but the
>> projection I get is not correct. I've also tried multiplying by A_inverse,
>> or just multiplying normal and/or north by A (or A_inverse), and setting
>> the other vector to a trivial direction (such as [0,0,1]), but none of
>> these projections seem to be correct.
>>
>> Another thing I have tried is opening the data in Visit and rotating the
>> domain manually, taking note of what Visit calls the "view normal" and the
>> "up vector". The "up vector" matches the "north vector" I calculate using
>> A.north, but the "view normal" does not match A.normal.
>>
>> Does anyone know the proper way to go about this? Thanks!
>>
>
> I saw that you had some discussion about this on IRC yesterday evening --
> did the issues get resolved?
>
> -Matt
>
>
>> - James
>>
>> --
>> James Guillochon
>> Einstein Fellow at the Harvard-Smithsonian CfA
>> jguillochon at cfa.harvard.edu
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>


-- 
James Guillochon
Einstein Fellow at the Harvard-Smithsonian CfA
jguillochon at cfa.harvard.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140110/bab875e8/attachment.html>


More information about the yt-users mailing list