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 › BLUR keyword slowing program
Page Index Toggle Pages: 1
BLUR keyword slowing program (Read 580 times)
BLUR keyword slowing program
Mar 23rd, 2007, 3:45pm
 
hi i've just started writing a program which involves blurred lines. ive only put a small amount of code in which involves blurred lines  moving..but the program is running very slow and lagging.can anyone tell me why? is BLUR causing a problem?
Re: BLUR keyword slowing program
Reply #1 - Mar 23rd, 2007, 4:26pm
 
hard to say without any code ... maybe you can post what you have so far?

blur is a pixel-based filter, so depending on how often you use it in your code it will sure slow things down bacause it runs thru all pixels it's applied on. i don't think this is "a problem", rather wrong usage.

F
Re: BLUR keyword slowing program
Reply #2 - Mar 23rd, 2007, 4:29pm
 
As i said its only a small piece. Can you help?

int vx;
int x = 10;
int vy;
void setup(){
 size(500,500);
  smooth();
frameRate(30);
   background(0);


}


void draw(){

filter(BLUR,1);


stroke(255);
line(30, 20, 155, 145);

x = x + 2;
stroke(255);

int vx = int(random(3))-1;
   int vy = int(random(3))-1;
line(x, 20, 195, 145);




 }

Re: BLUR keyword slowing program
Reply #3 - Mar 23rd, 2007, 5:23pm
 
i think filter( BLUR, .. ) might not have been ment to be used every frame. looks like it's really slow ...

you might want to look at other faster blur-code:
http://noise.me.uk/video/gol2/
http://builtwithprocessing.org/browse.php?s=blur

best,
F
Page Index Toggle Pages: 1