Moving rects produced by FillRect

Hi all,
I am curious if there is a function that allows PTB users to move the
contents of a group of
pixels to another location quickly and return the original pixel
group to the background
color.

I want to use Screen('fillrect') to create small dots on the screen
and then move them to
another location in real-time (not a premade movie). However,
'fillrect' puts limitations on
the amount of dots I can produce each frame and, to my knowledge, how
many dots I can
move. This is because (the way I am doing this), in order to "move"
a dot, I need to not
only call 'fillrect' to fill the new dot location, but I need to
'fillrect' to change the old dot
location back to the background. This means that can make (about)
two fewer new dots
than if I didn't move any dots. Depending on how many dots I want to
move between
frames, this can be QUITE costly to my ability to produce new dots
elsewhere.

If I could quickly move the dots to another location, however, I
would not have to make
two extra calls to 'fillrect' per moved dot and the cost in time to
move dots would
(hopefully) by much less.

I looked trough all the screen commands without any luck and a search
of topics related to
moving onscreen stimuli on the forum didn't turn up any help either.
Of note, I did read a
post (1182) that mentioned a MoveRect, ShiftRect, or RectShift
function. I have no idea
what exactly that refers to.

Thanks for your help,
Seth
Which version of the PTB are you using? For OSX there is a DrawDots
command. If you are using OS9, I have a drawdots.mex file that will
do what you want. If you're using Windows, I don't know whether
anyone has written a fast dot drawing routine.

keith

On Oct 5, 2005, at 9:30 PM, sethegger1313 wrote:

> Hi all,
> I am curious if there is a function that allows PTB users to move the
> contents of a group of
> pixels to another location quickly and return the original pixel
> group to the background
> color.
>
> I want to use Screen('fillrect') to create small dots on the screen
> and then move them to
> another location in real-time (not a premade movie). However,
> 'fillrect' puts limitations on
> the amount of dots I can produce each frame and, to my knowledge, how
> many dots I can
> move. This is because (the way I am doing this), in order to "move"
> a dot, I need to not
> only call 'fillrect' to fill the new dot location, but I need to
> 'fillrect' to change the old dot
> location back to the background. This means that can make (about)
> two fewer new dots
> than if I didn't move any dots. Depending on how many dots I want to
> move between
> frames, this can be QUITE costly to my ability to produce new dots
> elsewhere.
>
> If I could quickly move the dots to another location, however, I
> would not have to make
> two extra calls to 'fillrect' per moved dot and the cost in time to
> move dots would
> (hopefully) by much less.
>
> I looked trough all the screen commands without any luck and a search
> of topics related to
> moving onscreen stimuli on the forum didn't turn up any help either.
> Of note, I did read a
> post (1182) that mentioned a MoveRect, ShiftRect, or RectShift
> function. I have no idea
> what exactly that refers to.
>
> Thanks for your help,
> Seth
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor --------------------
> ~-->
> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your
> home page
> http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/BEfwlB/TM
> --------------------------------------------------------------------
> ~->
>
> Post your message to: psychtoolbox@yahoogroups.com
> Please indicate OS9, OSX, or WIN version, and include your full name.
> Denis Pelli, David Brainard, and Allen Ingling.
> http://psychtoolbox.org
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>