[visionegg] checkerboard - dartboard

  • From: "Thomas Kammer" <thomas.kammer@xxxxxxxxxx>
  • To: <visionegg@xxxxxxxxxxxxx>
  • Date: Fri, 14 Jan 2011 16:12:40 +0100

Hi all,

I'm working with VisionEgg for some years now presenting simple stimuli and
registering responses from (human) subjects. Now I'm trying to generate
classical checkerboard flickering stimuli. With the simple approach using
put_pixel I get a flickering checkerboard:

for i in range(param['no_cycles']):
        if i%2 == 0:
            pp = check[0,:,:,:]
        else:
            pp = check[1,:,:,:]
            
        screen.put_pixels(pixels=pp)        
        swap_buffers() 

But I think this is all but elegant. Furthermore, it is quite time consuming
to set up a new pair of checkerboards, e.g. with varied contrast, since
every pixel in the check array has to be calculated every time.

I tried to use textures on the basis of Target2D. I nicely realized two
patches with the right colors. But I failed to multiply them in order to
create a checkerboard. The only idea I had was to copy the patch using
get_frame_buffer_as_image, but I failed to draw a full board. 

Does anyone has an idea how to multiply a Target2D, allowing to change color
for all instances of the object at once?

kind regards from Ulm, Germany
thomas kammer

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

Other related posts:

  • » [visionegg] checkerboard - dartboard - Thomas Kammer