[visionegg] Re: drawing

  • From: Andrew Straw <astraw@xxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Thu, 17 May 2007 15:30:14 -0700

John Christie wrote:
> On May 17, 2007, at 4:00 PM, adam naples wrote:
>> Hi , I'm not totally sure what you want to do.
>> something like create Navon type stimuli on-the-fly for each trial?
> yes... but not letters, arbitrary shapes.
>> or do you need to generate a bunch of stimuli for later use?
> that would suffice but not be ideal
>> either way, you might want to look into pyopengl for the former.
> OK, so drawing in openGL... that sounds like a bit of an unhappy
> proposition.  I would have thought there was a Python library that
> further simplified things.
>> or pyx pyx.sourceforge.net for the latter.
>> I would check out  pyx first, the drawing code is a little easier to
>> get the hang of, and you get the benefit of generating EPS files of
>> all your  stimuli that will look nice in print.
> OK, I'll defiinitely check it out.  Wouldn't one be able to generate
> the EPS and keep it in memory and then present it?

It seems to me that line rendering EPS would be fairly expensive in
terms of CPU time.

More ideas:

There's support in VE for using pygame surfaces. Pygame has some drawing
commands http://www.pygame.org/docs/ref/draw.html

Another idea would be to use Agg a C++ drawing library. Matplotlib has a
Python wrapper of Agg you could presumably bend to your will with a bit
of fender and bodywork. I think Enthought's kiva/chaco does too. Agg
does beautiful anti-aliased drawing. http://www.antigrain.com/

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

Other related posts: