# jittery motion with filloval

**URL:** <https://psychtoolbox.discourse.group/t/jittery-motion-with-filloval/2042>\
**Category:** Uncategorized\
**Created:** [January 14, 2009, 3:48pm UTC](https://psychtoolbox.discourse.group/t/jittery-motion-with-filloval/2042 "2009-01-14T15:48:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [January 14, 2009, 3:48pm UTC](https://psychtoolbox.discourse.group/t/jittery-motion-with-filloval/2042/1 "2009-01-14T15:48:34Z")

</div>

Hello everyone.  
  
My goal is to have a circle, drawn by screen('FillOval'), move according to a predefined   
random trajectory on the screen. Pretty simple eh? The problem is the circle jitters / vibrates   
/jumps every now and then as it is moving on its trajectory. the funny thing is if I use the   
same code but replace FillOval with FillRect, the motion is smooth!   
  
Any tips on why this is happening and how to prevent it ?  
  
  
This simple code will be used as part of a more complex project involving alpha blending.  
  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [January 15, 2009, 4:05pm UTC](https://psychtoolbox.discourse.group/t/jittery-motion-with-filloval/2042/2 "2009-01-15T16:05:25Z")

</div>

right now all I want to accomplish is  
  
 Screen(window,'FillOval', [0 0 255], mask{frame});  
 flipTime = Screen(window, 'Flip');   
  
Mac Pro  
OS X 10.5.3  
2 X 3.2 Quad Core intel   
graphics cards:  
ATI Radeon HD 2600 XT  
NVIDIA GeForce 8800 GT  
  
  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner" \<mario.kleiner@...\> wrote:  
> \>  
> \> What do you mean with "jitters/vibrates"?  
> \>   
> \> A "jump" would mean for me that you miss video refresh  
> \> intervals, so the motion is not smooth, maybe because  
> \> drawing the filled oval is too slow on your graphics  
> \> hardware? What graphics card, operating system do  
> \> you have? Example code?  
> \>   
> \> -mario  
> \>   
> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "coder244" \<coder244@\> wrote:  
> \> \>  
> \> \> Hello everyone.  
> \> \>   
> \> \> My goal is to have a circle, drawn by screen('FillOval'), move according to a predefined   
> \> \> random trajectory on the screen. Pretty simple eh? The problem is the circle jitters /   
> \> vibrates   
> \> \> /jumps every now and then as it is moving on its trajectory. the funny thing is if I use   
> \> the   
> \> \> same code but replace FillOval with FillRect, the motion is smooth!   
> \> \>   
> \> \> Any tips on why this is happening and how to prevent it ?  
> \> \>   
> \> \>   
> \> \> This simple code will be used as part of a more complex project involving alpha   
> \> blending.  
> \> \>   
> \> \> Thanks in advance  
> \> \>  
> \>

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [January 16, 2009, 12:22am UTC](https://psychtoolbox.discourse.group/t/jittery-motion-with-filloval/2042/3 "2009-01-16T00:22:02Z")

</div>

David Fencsiks tip is a good one. Provide the size  
of the biggest oval you're going to draw, ie. if  
the max diameter is say 100 pixels, do a  
  

> \> Screen(window,'FillOval', [0 0 255], mask{frame}, 100);

If the resolution of your display is high and the  
size of your ovals is small then the GPU has to do  
much more work than neccessary, and you can  
cut down by providing the correct maximum value.  
  
if your animation loop really just looks like...  
  
for frame=1:something  
 Screen(window,'FillOval', [0 0 255], mask{frame});  
 flipTime = Screen(window, 'Flip');  
end  
  
... then Filloval is too slow and providing the  
maxdiameter parameter is the best you can  
do to cut down drawing time.  
  
Do you get many skipped frames?  
  
Ovals are expensive to draw, because their  
round shape must be approximated by lots of  
small line segments or filled triangles, so this  
is quite a bit of load in some cases.  
  
The 'DrawDots' method is efficient for circles, but the  
upper limit on NVidia and ATI hardware is around  
63-64 pixels diameter, on Intel hardware even  
lower (around 10 or so).  
  
The other way to do it would be to draw the  
set of ovals into a set of Offscreen windows,  
then 'DrawTexture' those to the screen, as  
demonstrated in "DrawingSpeedTest".  
  
-mario  
  
  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "coder244" \<coder244@...\> wrote:  
> \>  
> \> right now all I want to accomplish is  
> \>   
> \>   
> \> Mac Pro  
> \> OS X 10.5.3  
> \> 2 X 3.2 Quad Core intel   
> \> graphics cards:  
> \> ATI Radeon HD 2600 XT  
> \> NVIDIA GeForce 8800 GT  
> \>   
> \>   
> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner" \<mario.kleiner@\> wrote:  
> \> \>  
> \> \> What do you mean with "jitters/vibrates"?  
> \> \>   
> \> \> A "jump" would mean for me that you miss video refresh  
> \> \> intervals, so the motion is not smooth, maybe because  
> \> \> drawing the filled oval is too slow on your graphics  
> \> \> hardware? What graphics card, operating system do  
> \> \> you have? Example code?  
> \> \>   
> \> \> -mario  
> \> \>   
> \> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "coder244" \<coder244@\> wrote:  
> \> \> \>  
> \> \> \> Hello everyone.  
> \> \> \>   
> \> \> \> My goal is to have a circle, drawn by screen('FillOval'), move according to a   
> predefined   
> \> \> \> random trajectory on the screen. Pretty simple eh? The problem is the circle jitters /   
> \> \> vibrates   
> \> \> \> /jumps every now and then as it is moving on its trajectory. the funny thing is if I   
> use   
> \> \> the   
> \> \> \> same code but replace FillOval with FillRect, the motion is smooth!   
> \> \> \>   
> \> \> \> Any tips on why this is happening and how to prevent it ?  
> \> \> \>   
> \> \> \>   
> \> \> \> This simple code will be used as part of a more complex project involving alpha   
> \> \> blending.  
> \> \> \>   
> \> \> \> Thanks in advance  
> \> \> \>  
> \> \>  
> \>

---

<div class="post-metadata">

**Author:** ![coder244](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@coder244](https://psychtoolbox.discourse.group/u/coder244)\
**Post date:** [January 19, 2009, 5:01pm UTC](https://psychtoolbox.discourse.group/t/jittery-motion-with-filloval/2042/4 "2009-01-19T17:01:37Z")

</div>

forget the last post, this is the output from testCircle.m ( I had changed graphics cards to   
test it)  
  
  
  
PTB-INFO: This is the OpenGL-Psychtoolbox for Apple OS X, version 3.0.8. (Build date:   
Aug 15 2008)  
PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.  
PTB-INFO: Psychtoolbox is licensed to you under terms of the GNU General Public License   
(GPL). See file 'License.txt' in the  
PTB-INFO: Psychtoolbox root folder for a copy of the GPL license.  
  
  
  
OpenGL-Extensions are: GL\_ARB\_transpose\_matrix GL\_ARB\_vertex\_program   
GL\_ARB\_vertex\_blend GL\_ARB\_window\_pos GL\_ARB\_shader\_objects GL\_ARB\_vertex\_shader   
GL\_ARB\_shading\_language\_100 GL\_EXT\_multi\_draw\_arrays GL\_EXT\_clip\_volume\_hint   
GL\_EXT\_rescale\_normal GL\_EXT\_draw\_range\_elements GL\_EXT\_fog\_coord   
GL\_EXT\_gpu\_program\_parameters GL\_EXT\_geometry\_shader4 GL\_EXT\_transform\_feedback   
GL\_APPLE\_client\_storage GL\_APPLE\_specular\_vector GL\_APPLE\_transform\_hint   
GL\_APPLE\_packed\_pixels GL\_APPLE\_fence GL\_APPLE\_vertex\_array\_object   
GL\_APPLE\_vertex\_program\_evaluators GL\_APPLE\_element\_array GL\_APPLE\_flush\_render   
GL\_APPLE\_aux\_depth\_stencil GL\_NV\_texgen\_reflection GL\_NV\_light\_max\_exponent   
GL\_IBM\_rasterpos\_clip GL\_SGIS\_generate\_mipmap GL\_ARB\_imaging   
GL\_ARB\_point\_parameters GL\_ARB\_texture\_env\_crossbar GL\_ARB\_texture\_border\_clamp   
GL\_ARB\_multitexture GL\_ARB\_texture\_env\_add GL\_ARB\_texture\_cube\_map   
GL\_ARB\_texture\_env\_dot3 GL\_ARB\_multisample GL\_ARB\_texture\_env\_combine   
GL\_ARB\_texture\_compression GL\_ARB\_texture\_mirrored\_repeat GL\_ARB\_shadow   
GL\_ARB\_depth\_texture GL\_ARB\_fragment\_program GL\_ARB\_fragment\_program\_shadow   
GL\_ARB\_fragment\_shader GL\_ARB\_occlusion\_query GL\_ARB\_point\_sprite   
GL\_ARB\_texture\_non\_power\_of\_two GL\_ARB\_vertex\_buffer\_object   
GL\_ARB\_pixel\_buffer\_object GL\_ARB\_draw\_buffers GL\_ARB\_shader\_texture\_lod   
GL\_EXT\_compiled\_vertex\_array GL\_EXT\_framebuffer\_object GL\_EXT\_framebuffer\_blit   
GL\_EXT\_framebuffer\_multisample GL\_EXT\_texture\_rectangle GL\_ARB\_texture\_rectangle   
GL\_EXT\_texture\_env\_add GL\_EXT\_blend\_color GL\_EXT\_blend\_minmax   
GL\_EXT\_blend\_subtract GL\_EXT\_texture\_lod\_bias GL\_EXT\_abgr GL\_EXT\_bgra   
GL\_EXT\_stencil\_wrap GL\_EXT\_texture\_filter\_anisotropic GL\_EXT\_secondary\_color   
GL\_EXT\_blend\_func\_separate GL\_EXT\_shadow\_funcs GL\_EXT\_stencil\_two\_side   
GL\_EXT\_depth\_bounds\_test GL\_EXT\_texture\_compression\_s3tc   
GL\_EXT\_texture\_compression\_dxt1 GL\_EXT\_texture\_sRGB   
GL\_EXT\_blend\_equation\_separate GL\_EXT\_texture\_mirror\_clamp   
GL\_EXT\_packed\_depth\_stencil GL\_EXT\_bindable\_uniform GL\_EXT\_texture\_integer   
GL\_EXT\_gpu\_shader4 GL\_EXT\_draw\_buffers2 GL\_APPLE\_flush\_buffer\_range   
GL\_APPLE\_ycbcr\_422 GL\_APPLE\_vertex\_array\_range GL\_APPLE\_texture\_range   
GL\_APPLE\_float\_pixels GL\_ATI\_texture\_float GL\_ARB\_texture\_float GL\_ARB\_half\_float\_pixel   
GL\_APPLE\_pixel\_buffer GL\_APPLE\_object\_purgeable GL\_NV\_point\_sprite   
GL\_NV\_register\_combiners GL\_NV\_register\_combiners2 GL\_NV\_blend\_square   
GL\_NV\_texture\_shader GL\_NV\_texture\_shader2 GL\_NV\_texture\_shader3   
GL\_NV\_fog\_distance GL\_NV\_depth\_clamp GL\_NV\_multisample\_filter\_hint   
GL\_NV\_fragment\_program\_option GL\_NV\_fragment\_program2   
GL\_NV\_vertex\_program2\_option GL\_NV\_vertex\_program3 GL\_ATI\_texture\_mirror\_once   
GL\_ATI\_texture\_env\_combine3 GL\_ATI\_separate\_stencil GL\_SGIS\_texture\_edge\_clamp   
GL\_SGIS\_texture\_lod   
  
  
  
PTB-INFO: You are using a multi-display setup (2 active displays):  
PTB-INFO: Please read 'help MultiDisplaySetups' for specific information on the Do's,   
Dont's,  
PTB-INFO: and possible causes of trouble and how to diagnose and resolve them.  
  
PTB-INFO: According to the operating system, some of your connected displays do not   
seem to   
PTB-INFO: be switched into mirror mode. For a discussion of mirror mode vs. non-mirror   
mode,  
PTB-INFO: please read 'help MirrorMode'.  
  
  
PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: NVIDIA GeForce 8800 GT OpenGL   
Engine :: 2.0 NVIDIA-1.5.36  
PTB-INFO: Renderer has 512 MB of VRAM and a maximum 493 MB of texture memory.  
PTB-Info: VBL startline = 1050 , VBL Endline = 1050  
PTB-Info: Measured monitor refresh interval from beamposition = 16.678533 ms   
[59.957311 Hz].  
PTB-Info: Will use beamposition query for accurate Flip time stamping.  
PTB-Info: Measured monitor refresh interval from VBLsync = 16.679081 ms [59.955340   
Hz]. (50 valid samples taken, stddev=0.033410 ms.)  
PTB-Info: Reported monitor refresh interval from operating system = 16.666667 ms   
[60.000000 Hz].  
PTB-Info: Small deviations between reported values are normal and no reason to worry.  
  
  
I am using a high resolution Im not entirely sure about the missed frames, is there a way   
to check  
  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner" \<mario.kleiner@...\> wrote:  
> \>  
> \> Hmm,  
> \>   
> \> your code is missing. Just put it into the "Files" section  
> \> of the forum.  
> \>   
> \> However, i tested drawing a 'FillOval' within a  
> \> 'FrameRect', passing the same rect parameter as  
> \> you described. I tested in an animation loop,  
> \> on a MacPro like yours with NVidia 8800 under  
> \> OS/X 10.5.6, and on a MacBookPro with ATI X1600  
> \> und 10.4.11.  
> \>   
> \> I can't reproduce the "jitter", the oval always nicely  
> \> fits into the framed rectangle with no wobble whatsoever,  
> \> i don't get any skipped frames at 90 Hz refresh, with  
> \> or without the 'maxdiameter' parameter at a resolution  
> \> of 1600 x 1400 pixels and the drawing time is about  
> \> 0.4 msecs for an 800 x 800 pixels oval, way too short  
> \> to cause timing problems.  
> \>   
> \> So either:  
> \>   
> \> a) You found an operating system bug in your OS and  
> \> an upgrade would fix it. Rather unlikely but not impossible.  
> \>   
> \> b) Something else is causing massive timing problems?  
> \>   
> \> c) Your code does something unhealthy?  
> \>   
> \> d) Its not real, but some kind of artifact of motion  
> \> perception? Have yout tried playing it at a low redraw  
> \> rate or as sequence of still images to see if there is  
> \> really something in the picture that causes this?  
> \>   
> \> I think of things like this "Brillenputzillusion" (look  
> \> at the frame of the left glass):  
> \>   
> \> \<[http://www.yakachu.de/temp/brillenputzillusion1.avi](http://www.yakachu.de/temp/brillenputzillusion1.avi)\>  
> \> \<[http://www.yakachu.de/temp/brillenputzillusion2.avi](http://www.yakachu.de/temp/brillenputzillusion2.avi)\>  
> \>   
> \> For b/c we need a minimal piece of code that shows  
> \> the problem. Does PTB report lots of skipped frames/  
> \> missed flip deadlines at the end? Do you use very  
> \> high resolution and very high refresh rate?  
> \>   
> \> For d) Did you test on a CRT or on a flat panel?  
> \>   
> \> -mario  
> \>   
> \>   
> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "coder244" \<coder244@\> wrote:  
> \> \>  
> \> \> THanks for all the replies so far.  
> \> \>   
> \> \> The UpToMaxDiameter setting does not solve my problem.  
> \> \>   
> \> \> I tried using offscreen windows as in the DrawingSpeedTest example but this is not   
> what   
> \> I   
> \> \> want to achieve. This is my goal:   
> \> \> For each frame (monitor refresh) a NEW circle is drawn on the screen, its position   
> \> \> incremented slightly, this gives the illusion a Single circle without a trace/trail is   
> moving   
> \> \> around the screen.   
> \> \>   
> \> \> The moving circle will act as an aperture for complex moving dots. So using drawDots   
> \> \> directly is not an option. My code is complex but here is a simplified version of what   
> I'm   
> \> \> doing:  
> \> \>   
> \> \> for i =1: numberOfFrames  
> \> \>   
> \> \> Screen(window,'FillOval', [0 0 0 255], mask{i},maxSize);  
> \> \>   
> \> \> end  
> \> \>   
> \> \> mask is essential a cell containing 4 column vectors for each new position at each   
> \> frame,   
> \> \> this part works as I mentioned before using FillRect gives a filled rectangle moving   
> \> around   
> \> \> the screen smoothly. I know its a speed issue with fillOval, so the question is, is there   
> a   
> \> \> way to work around it?   
> \> \>   
> \> \> here is some code ( its alot more complex)   
> \> \>   
> \> \>   
> \> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner" \<mario.kleiner@\> wrote:  
> \> \> \>  
> \> \> \> David Fencsiks tip is a good one. Provide the size  
> \> \> \> of the biggest oval you're going to draw, ie. if  
> \> \> \> the max diameter is say 100 pixels, do a  
> \> \> \>   
> \> \> \> \> Screen(window,'FillOval', [0 0 255], mask{frame}, 100);  
> \> \> \>   
> \> \> \> If the resolution of your display is high and the  
> \> \> \> size of your ovals is small then the GPU has to do  
> \> \> \> much more work than neccessary, and you can  
> \> \> \> cut down by providing the correct maximum value.  
> \> \> \>   
> \> \> \> if your animation loop really just looks like...  
> \> \> \>   
> \> \> \> for frame=1:something  
> \> \> \> Screen(window,'FillOval', [0 0 255], mask{frame});  
> \> \> \> flipTime = Screen(window, 'Flip');  
> \> \> \> end  
> \> \> \>   
> \> \> \> ... then Filloval is too slow and providing the  
> \> \> \> maxdiameter parameter is the best you can  
> \> \> \> do to cut down drawing time.  
> \> \> \>   
> \> \> \> Do you get many skipped frames?  
> \> \> \>   
> \> \> \> Ovals are expensive to draw, because their  
> \> \> \> round shape must be approximated by lots of  
> \> \> \> small line segments or filled triangles, so this  
> \> \> \> is quite a bit of load in some cases.  
> \> \> \>   
> \> \> \> The 'DrawDots' method is efficient for circles, but the  
> \> \> \> upper limit on NVidia and ATI hardware is around  
> \> \> \> 63-64 pixels diameter, on Intel hardware even  
> \> \> \> lower (around 10 or so).  
> \> \> \>   
> \> \> \> The other way to do it would be to draw the  
> \> \> \> set of ovals into a set of Offscreen windows,  
> \> \> \> then 'DrawTexture' those to the screen, as  
> \> \> \> demonstrated in "DrawingSpeedTest".  
> \> \> \>   
> \> \> \> -mario  
> \> \> \>   
> \> \> \>   
> \> \> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "coder244" \<coder244@\> wrote:  
> \> \> \> \>  
> \> \> \> \> right now all I want to accomplish is  
> \> \> \> \>   
> \> \> \> \>   
> \> \> \> \> Mac Pro  
> \> \> \> \> OS X 10.5.3  
> \> \> \> \> 2 X 3.2 Quad Core intel   
> \> \> \> \> graphics cards:  
> \> \> \> \> ATI Radeon HD 2600 XT  
> \> \> \> \> NVIDIA GeForce 8800 GT  
> \> \> \> \>   
> \> \> \> \>   
> \> \> \> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner" \<mario.kleiner@\> wrote:  
> \> \> \> \> \>  
> \> \> \> \> \> What do you mean with "jitters/vibrates"?  
> \> \> \> \> \>   
> \> \> \> \> \> A "jump" would mean for me that you miss video refresh  
> \> \> \> \> \> intervals, so the motion is not smooth, maybe because  
> \> \> \> \> \> drawing the filled oval is too slow on your graphics  
> \> \> \> \> \> hardware? What graphics card, operating system do  
> \> \> \> \> \> you have? Example code?  
> \> \> \> \> \>   
> \> \> \> \> \> -mario  
> \> \> \> \> \>   
> \> \> \> \> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "coder244" \<coder244@\> wrote:  
> \> \> \> \> \> \>  
> \> \> \> \> \> \> Hello everyone.  
> \> \> \> \> \> \>   
> \> \> \> \> \> \> My goal is to have a circle, drawn by screen('FillOval'), move according to a   
> \> \> \> predefined   
> \> \> \> \> \> \> random trajectory on the screen. Pretty simple eh? The problem is the circle   
> \> \> jitters /   
> \> \> \> \> \> vibrates   
> \> \> \> \> \> \> /jumps every now and then as it is moving on its trajectory. the funny thing   
> is   
> \> if I   
> \> \> \> use   
> \> \> \> \> \> the   
> \> \> \> \> \> \> same code but replace FillOval with FillRect, the motion is smooth!   
> \> \> \> \> \> \>   
> \> \> \> \> \> \> Any tips on why this is happening and how to prevent it ?  
> \> \> \> \> \> \>   
> \> \> \> \> \> \>   
> \> \> \> \> \> \> This simple code will be used as part of a more complex project involving   
> \> alpha   
> \> \> \> \> \> blending.  
> \> \> \> \> \> \>   
> \> \> \> \> \> \> Thanks in advance  
> \> \> \> \> \> \>  
> \> \> \> \> \>  
> \> \> \> \>  
> \> \> \>  
> \> \>  
> \>

---

<div class="post-metadata">

**Author:** ![coder244](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@coder244](https://psychtoolbox.discourse.group/u/coder244)\
**Post date:** [January 19, 2009, 2:39pm UTC](https://psychtoolbox.discourse.group/t/jittery-motion-with-filloval/2042/5 "2009-01-19T14:39:10Z")

</div>

okay, I've finally put some code up (simplified) theres two files a .mat file you need to load   
and a testCircle.m .   
  
It might be my random position generation thats wrong but if you try the same data with   
fillRect and fillOval you get smooth motion in the first.   
  
  
If anyone tries and has any thoughts like me know.  
  
  
Thanks again!  
  
  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner" \<mario.kleiner@...\> wrote:  
> \>  
> \> Hmm,  
> \>   
> \> your code is missing. Just put it into the "Files" section  
> \> of the forum.  
> \>   
> \> However, i tested drawing a 'FillOval' within a  
> \> 'FrameRect', passing the same rect parameter as  
> \> you described. I tested in an animation loop,  
> \> on a MacPro like yours with NVidia 8800 under  
> \> OS/X 10.5.6, and on a MacBookPro with ATI X1600  
> \> und 10.4.11.  
> \>   
> \> I can't reproduce the "jitter", the oval always nicely  
> \> fits into the framed rectangle with no wobble whatsoever,  
> \> i don't get any skipped frames at 90 Hz refresh, with  
> \> or without the 'maxdiameter' parameter at a resolution  
> \> of 1600 x 1400 pixels and the drawing time is about  
> \> 0.4 msecs for an 800 x 800 pixels oval, way too short  
> \> to cause timing problems.  
> \>   
> \> So either:  
> \>   
> \> a) You found an operating system bug in your OS and  
> \> an upgrade would fix it. Rather unlikely but not impossible.  
> \>   
> \> b) Something else is causing massive timing problems?  
> \>   
> \> c) Your code does something unhealthy?  
> \>   
> \> d) Its not real, but some kind of artifact of motion  
> \> perception? Have yout tried playing it at a low redraw  
> \> rate or as sequence of still images to see if there is  
> \> really something in the picture that causes this?  
> \>   
> \> I think of things like this "Brillenputzillusion" (look  
> \> at the frame of the left glass):  
> \>   
> \> \<[http://www.yakachu.de/temp/brillenputzillusion1.avi](http://www.yakachu.de/temp/brillenputzillusion1.avi)\>  
> \> \<[http://www.yakachu.de/temp/brillenputzillusion2.avi](http://www.yakachu.de/temp/brillenputzillusion2.avi)\>  
> \>   
> \> For b/c we need a minimal piece of code that shows  
> \> the problem. Does PTB report lots of skipped frames/  
> \> missed flip deadlines at the end? Do you use very  
> \> high resolution and very high refresh rate?  
> \>   
> \> For d) Did you test on a CRT or on a flat panel?  
> \>   
> \> -mario  
> \>   
> \>   
> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "coder244" \<coder244@\> wrote:  
> \> \>  
> \> \> THanks for all the replies so far.  
> \> \>   
> \> \> The UpToMaxDiameter setting does not solve my problem.  
> \> \>   
> \> \> I tried using offscreen windows as in the DrawingSpeedTest example but this is not   
> what   
> \> I   
> \> \> want to achieve. This is my goal:   
> \> \> For each frame (monitor refresh) a NEW circle is drawn on the screen, its position   
> \> \> incremented slightly, this gives the illusion a Single circle without a trace/trail is   
> moving   
> \> \> around the screen.   
> \> \>   
> \> \> The moving circle will act as an aperture for complex moving dots. So using drawDots   
> \> \> directly is not an option. My code is complex but here is a simplified version of what   
> I'm   
> \> \> doing:  
> \> \>   
> \> \> for i =1: numberOfFrames  
> \> \>   
> \> \> Screen(window,'FillOval', [0 0 0 255], mask{i},maxSize);  
> \> \>   
> \> \> end  
> \> \>   
> \> \> mask is essential a cell containing 4 column vectors for each new position at each   
> \> frame,   
> \> \> this part works as I mentioned before using FillRect gives a filled rectangle moving   
> \> around   
> \> \> the screen smoothly. I know its a speed issue with fillOval, so the question is, is there   
> a   
> \> \> way to work around it?   
> \> \>   
> \> \> here is some code ( its alot more complex)   
> \> \>   
> \> \>   
> \> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner" \<mario.kleiner@\> wrote:  
> \> \> \>  
> \> \> \> David Fencsiks tip is a good one. Provide the size  
> \> \> \> of the biggest oval you're going to draw, ie. if  
> \> \> \> the max diameter is say 100 pixels, do a  
> \> \> \>   
> \> \> \> \> Screen(window,'FillOval', [0 0 255], mask{frame}, 100);  
> \> \> \>   
> \> \> \> If the resolution of your display is high and the  
> \> \> \> size of your ovals is small then the GPU has to do  
> \> \> \> much more work than neccessary, and you can  
> \> \> \> cut down by providing the correct maximum value.  
> \> \> \>   
> \> \> \> if your animation loop really just looks like...  
> \> \> \>   
> \> \> \> for frame=1:something  
> \> \> \> Screen(window,'FillOval', [0 0 255], mask{frame});  
> \> \> \> flipTime = Screen(window, 'Flip');  
> \> \> \> end  
> \> \> \>   
> \> \> \> ... then Filloval is too slow and providing the  
> \> \> \> maxdiameter parameter is the best you can  
> \> \> \> do to cut down drawing time.  
> \> \> \>   
> \> \> \> Do you get many skipped frames?  
> \> \> \>   
> \> \> \> Ovals are expensive to draw, because their  
> \> \> \> round shape must be approximated by lots of  
> \> \> \> small line segments or filled triangles, so this  
> \> \> \> is quite a bit of load in some cases.  
> \> \> \>   
> \> \> \> The 'DrawDots' method is efficient for circles, but the  
> \> \> \> upper limit on NVidia and ATI hardware is around  
> \> \> \> 63-64 pixels diameter, on Intel hardware even  
> \> \> \> lower (around 10 or so).  
> \> \> \>   
> \> \> \> The other way to do it would be to draw the  
> \> \> \> set of ovals into a set of Offscreen windows,  
> \> \> \> then 'DrawTexture' those to the screen, as  
> \> \> \> demonstrated in "DrawingSpeedTest".  
> \> \> \>   
> \> \> \> -mario  
> \> \> \>   
> \> \> \>   
> \> \> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "coder244" \<coder244@\> wrote:  
> \> \> \> \>  
> \> \> \> \> right now all I want to accomplish is  
> \> \> \> \>   
> \> \> \> \>   
> \> \> \> \> Mac Pro  
> \> \> \> \> OS X 10.5.3  
> \> \> \> \> 2 X 3.2 Quad Core intel   
> \> \> \> \> graphics cards:  
> \> \> \> \> ATI Radeon HD 2600 XT  
> \> \> \> \> NVIDIA GeForce 8800 GT  
> \> \> \> \>   
> \> \> \> \>   
> \> \> \> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner" \<mario.kleiner@\> wrote:  
> \> \> \> \> \>  
> \> \> \> \> \> What do you mean with "jitters/vibrates"?  
> \> \> \> \> \>   
> \> \> \> \> \> A "jump" would mean for me that you miss video refresh  
> \> \> \> \> \> intervals, so the motion is not smooth, maybe because  
> \> \> \> \> \> drawing the filled oval is too slow on your graphics  
> \> \> \> \> \> hardware? What graphics card, operating system do  
> \> \> \> \> \> you have? Example code?  
> \> \> \> \> \>   
> \> \> \> \> \> -mario  
> \> \> \> \> \>   
> \> \> \> \> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "coder244" \<coder244@\> wrote:  
> \> \> \> \> \> \>  
> \> \> \> \> \> \> Hello everyone.  
> \> \> \> \> \> \>   
> \> \> \> \> \> \> My goal is to have a circle, drawn by screen('FillOval'), move according to a   
> \> \> \> predefined   
> \> \> \> \> \> \> random trajectory on the screen. Pretty simple eh? The problem is the circle   
> \> \> jitters /   
> \> \> \> \> \> vibrates   
> \> \> \> \> \> \> /jumps every now and then as it is moving on its trajectory. the funny thing   
> is   
> \> if I   
> \> \> \> use   
> \> \> \> \> \> the   
> \> \> \> \> \> \> same code but replace FillOval with FillRect, the motion is smooth!   
> \> \> \> \> \> \>   
> \> \> \> \> \> \> Any tips on why this is happening and how to prevent it ?  
> \> \> \> \> \> \>   
> \> \> \> \> \> \>   
> \> \> \> \> \> \> This simple code will be used as part of a more complex project involving   
> \> alpha   
> \> \> \> \> \> blending.  
> \> \> \> \> \> \>   
> \> \> \> \> \> \> Thanks in advance  
> \> \> \> \> \> \>  
> \> \> \> \> \>  
> \> \> \> \>  
> \> \> \>  
> \> \>  
> \>
