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 › noLoop() turns off smoothing
Page Index Toggle Pages: 1
noLoop() turns off smoothing (Read 237 times)
noLoop() turns off smoothing
Nov 26th, 2008, 2:56pm
 
This may have an obvious answer, but it's escaping me:

The following simple program will generate a smooth ellipse with noLoop() and a rough one without it. It's as if the smooth() command has no effect if the draw() function is looping:

void setup() {
 size(300, 300);
 noStroke();
 smooth();
 noLoop();
}

void draw() {
 ellipse(width/2, height/2, 50, 50);
}
Re: noLoop() turns off smoothing
Reply #1 - Nov 26th, 2008, 3:52pm
 
That shouldn't be the case unless you're using a very old release (e.g. Beta 0135) of Processing, which had a bug on some machines that would cause similar behavior.
Re: noLoop() turns off smoothing
Reply #2 - Nov 26th, 2008, 4:01pm
 
fry wrote on Nov 26th, 2008, 3:52pm:
That shouldn't be the case unless you're using a very old release (e.g. Beta 0135) of Processing, which had a bug on some machines that would cause similar behavior.


Very strange. I have been having this issue for a while, and persists even with the 1.0 release of this week. This is on a Mac by the way.

When I run this code in a new Processing installation on Ubuntu (running in a VM on my Macbook Pro) I get the same effect: noLoop() retains smoothing, and without it, I loose smoothing.

I am stumped!
Re: noLoop() turns off smoothing
Reply #3 - Nov 26th, 2008, 4:35pm
 
oh--i misread your problem.

if you don't clear the background, then you'll get artifacts because you're drawing a smooth object on top of itself at 60x per second. which means that in less than a second, the fuzzy anti-aliased edges will have turned completely dark.

you just need to use background().
Re: noLoop() turns off smoothing
Reply #4 - Nov 26th, 2008, 4:44pm
 
Aah of course, makes sense.
Thanks.
Page Index Toggle Pages: 1