[visionegg] Re: animating target motion

Jordanna Sprayberry wrote:
> Sorry to pester you all, but I am getting ready to debug a stimulus
> that is moving a circular target in three dimensions. In the past I
> have done this by changing the x,y coordinates for horizontal and
> vertical motion, then changing the size as a representation of
> looming-axis motion. Before I get into trying to fix my antiquated
> stimulus, I thought I would check in and see if Vision Egg has a
> different mechanism for 3-D animation. If so, can you please send me a
> module name/ function so I can look it up in the documentation?
>
> Also, can Vision Egg apply motion blur to a target? Again, if so, can
> someone send the function name? I spent several hours looking through
> documentation on Sunday, then had to get back to grading papers...
>
> thanks in advance for any help you can offer.

Hi Jordanna,

The VE does support 3D stuff. The trick will be getting a good spatial
calibration. Essentially, you need to know the location of your subject,
the screen, and your objects all in the same coordinate system. Then
you'll need to set the camera projection and location matrix to view the
screen from the position of the subject in that coordinate system. Then
you can specify the 3D location of targets directly. I don't have any
simple demos that do this, although I am using these techniques
routinely in some very ugly, very complex experimental scripts. I'd like
to produce a simplified demo/tutorial on the subject, but I don't know
when I'll get the time to do it.

In the meantime, to answer your question very simply, you can specify
the 3D location of a rectangle using VisionEgg.MoreStimuli.Rectangle3D.
And you can do a texture mapped rectangle using TextureStimulus3D. Check
something like demo/movingPOV.py for how to set the camera location and
projection matrix.

-Andrew

-- 
Andrew D. Straw, Ph.D.
California Institute of Technology
http://www.its.caltech.edu/~astraw/

======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: