[Yt-dev] Axis-aligned normal vectors in the camera

j s oishi jsoishi at gmail.com
Thu Jul 29 08:19:16 PDT 2010


Hi,

I've never worked with a North vector, but I know Andy Cunningham has,
and I know he patched the source to allow some flexibility with this.
I don't remember exactly what he did, but you might consider asking
him.

j

On Thu, Jul 29, 2010 at 8:14 AM, Matthew Turk <matthewturk at gmail.com> wrote:
> Hi Rick,
>
> I think I agree with your assessment, it's in the
> setup_normalized_vectors.  What I think is happening is that my guess
> for a north vector (if unsupplied, and I don't know about anybody else
> but I never supply a north vector ...) is resulting in it getting zero
> for the other unit vectors.  Would you be able to see what the value
> of cam.north_vector is in your script?
>
> What we might also want to do is just add some jitter to the estimate
> for a North vector, which might be able to help it.  Inside
> setup_normalized_vectors, if you change the original:
>
>        if north_vector is None:
>            vecs = na.identity(3)
>            t = na.cross(normal_vector, vecs).sum(axis=1)
>            ax = t.argmax()
>            north_vector = na.cross(vecs[ax,:], normal_vector).ravel()
>
> to something like:
>
>        if north_vector is None:
>            vecs = na.identity(3)
>            t = na.cross(normal_vector + [1e-9, 0.0, 0.0], vecs).sum(axis=1)
>            ax = t.argmax()
>            north_vector = na.cross(vecs[ax,:], normal_vector).ravel()
>
> it might have some (good?) effect.  I think Sam has an alternate
> mechanism for estimating a north vector that might fix this, too..
>
> -Matt
> On Thu, Jul 29, 2010 at 7:58 AM, Rick Wagner <rwagner at physics.ucsd.edu> wrote:
>> Good Morning,
>>
>> I've been trying out the volume render, with a lot of success. However, while I was starting to work on rotating the view, I found the normal vectors aligned with x, y or z would create blank images. After reading what was printed on the console, I saw that the volume being rendered had zero width in two dimensions:
>>
>> yt         INFO       2010-07-29 08:31:28,740 Traversing 17583 bricks between [ 0.45  0.5   0.5 ] and [ 0.55  0.5   0.5 ]
>>
>> I tried looking into extension/volume_rendering/camera.py last night, in particular _setup_normalized_vectors, but the body and mind were weak. I'll keep trying, but if anyone has suggestions, or corrections to my method, they would be appreciated.
>>
>> Rendering script at http://paste.enzotools.org/show/958/
>>
>> Thanks,
>> Rick
>>
>> _______________________________________________
>> Yt-dev mailing list
>> Yt-dev at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>>
> _______________________________________________
> Yt-dev mailing list
> Yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>



-- 
----------------
i am dot org: www.jsoishi.org



More information about the yt-dev mailing list