DrawArc with larger penwidth than current pixel size

Hi Mario and friends!!

I am trying to put an annulus around stimuli that are viewed in stereo mode 4 (free fusion). I originally thought to use alpha blending to do this, but I am unsure how to alpha blend in this mode. Maybe a simple alternative would be to use the DrawArc function to draw a circle with a large enough pen width to occlude part of the stimulus. It seems, however, that currently there is no possibility to define a particular pen width for this function. Do you have a solution to this problem or documentation that may help me?

Thanks in advance.

Kiley Seymour

The University of Sydney
Camperdown NSW 2006 Australia
Hi Kiley,
I am probably not appreciating your problem, not having tried stereo modes myself, but PTB has the function Circle() to easily generate circles. I guess you could use that to create a texture that is transparent in the middle (fourth texture channel) and just draw this texture over your stimulus?
Best,
Dee
On Wed, Jan 20, 2010 at 7:11 PM, kiley_seymour <kiley_seymour@...> wrote:

Hi Mario and friends!!

I am trying to put an annulus around stimuli that are viewed in stereo mode 4 (free fusion). I originally thought to use alpha blending to do this, but I am unsure how to alpha blend in this mode. Maybe a simple alternative would be to use the DrawArc function to draw a circle with a large enough pen width to occlude part of the stimulus. It seems, however, that currently there is no possibility to define a particular pen width for this function. Do you have a solution to this problem or documentation that may help me?

Thanks in advance.

Kiley Seymour

The University of Sydney
Camperdown NSW 2006 Australia


Hi Dr. Kiley! (congratulations to the hard-earned name extension),

alpha-blending should just work fine in stereomodes, just as in mono mode, so you can simply follow the same approach as in the demos where we use alpha blending for apertures. There's also Screen('FrameArc') which draws an arc like 'DrawArc', but with a selectable pen width, cfe. ArcDemo.

Best wishes and say "hi" to Scott
-mario

--- In psychtoolbox@yahoogroups.com, "kiley_seymour" <kiley_seymour@...> wrote:
>
> Hi Mario and friends!!
>
> I am trying to put an annulus around stimuli that are viewed in stereo mode 4 (free fusion). I originally thought to use alpha blending to do this, but I am unsure how to alpha blend in this mode. Maybe a simple alternative would be to use the DrawArc function to draw a circle with a large enough pen width to occlude part of the stimulus. It seems, however, that currently there is no possibility to define a particular pen width for this function. Do you have a solution to this problem or documentation that may help me?
>
> Thanks in advance.
>
> Kiley Seymour
>
> The University of Sydney
> Camperdown NSW 2006 Australia
>
Yep, making an annulus/aperture using alpha blending in stereomode is def the way to go. ....just a simple texture of [grey, alpha] values drawn to each stereobuffer.

-Thad.


--- In psychtoolbox@yahoogroups.com, "Mario" <mario.kleiner@...> wrote:
>
>
>
> Hi Dr. Kiley! (congratulations to the hard-earned name extension),
>
> alpha-blending should just work fine in stereomodes, just as in mono mode, so you can simply follow the same approach as in the demos where we use alpha blending for apertures. There's also Screen('FrameArc') which draws an arc like 'DrawArc', but with a selectable pen width, cfe. ArcDemo.
>
> Best wishes and say "hi" to Scott
> -mario
>
> --- In psychtoolbox@yahoogroups.com, "kiley_seymour" <kiley_seymour@> wrote:
> >
> > Hi Mario and friends!!
> >
> > I am trying to put an annulus around stimuli that are viewed in stereo mode 4 (free fusion). I originally thought to use alpha blending to do this, but I am unsure how to alpha blend in this mode. Maybe a simple alternative would be to use the DrawArc function to draw a circle with a large enough pen width to occlude part of the stimulus. It seems, however, that currently there is no possibility to define a particular pen width for this function. Do you have a solution to this problem or documentation that may help me?
> >
> > Thanks in advance.
> >
> > Kiley Seymour
> >
> > The University of Sydney
> > Camperdown NSW 2006 Australia
> >
>