We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Jittery text animation
Page Index Toggle Pages: 1
Jittery text animation (Read 713 times)
Jittery text animation
Jan 26th, 2008, 2:24am
 
Hi everyone.  I'm working on my first data visualization project and I've got my first question for the experts.

I've got about 100 circles (ellipses) that I have moving very slowly around the screen.  I've set their x and y positions to move between a distance of random(-0.1, 0.1) per render loop.  The motion is very smooth.  I then added text labels to each circle, centered on the center point of each.  The circles themselves continue to have very fluid movement, but the text jumps quite noticeably in 1 pixel increments.  When I zoom in using a screen loupe tool, I can see this more clearly - the circle moves smoothly, apparently by way of constant edge anti-aliasing adjustments, but the text label stays put until it's time to jump a full pixel.

Is there something I could do differently or is this a limitation I will need to work around?

Thanks in advance,
Jason
Re: Jittery text animation
Reply #1 - Feb 1st, 2008, 3:39pm
 
Here's a link to a quick sketch showing this problem:

http://concepts.blackantmedia.com/jittery/

I'm using createFont() to load a TTF font file - is there a way to specify more aggressive anti-aliasing or something else to smooth the text movement?

Thanks,
Jason
Re: Jittery text animation
Reply #2 - Feb 1st, 2008, 4:07pm
 
code?
Re: Jittery text animation
Reply #3 - Feb 1st, 2008, 4:23pm
 
I updated the sample page with a link to the code.

Thanks,
 Jason
Re: Jittery text animation
Reply #4 - Feb 8th, 2008, 9:32am
 
Have you tried OPENGL or P3D?  I looked at your code and used P3D and it worked fine for me.
Re: Jittery text animation
Reply #5 - Feb 8th, 2008, 1:39pm
 
I hadn't even thought about trying the different renderers.  Thanks for the idea - I will certainly try that.
Page Index Toggle Pages: 1