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.
IndexDiscussionExhibition › Radial Pattern
Page Index Toggle Pages: 1
Radial Pattern (Read 630 times)
Radial Pattern
Dec 24th, 2009, 4:10pm
 
Created a random radial pattern drawer when i was just messing around in processing and thought i would share it with you guys =)
Any suggestions to make it better would be appreciated.
Code:
float a,b,ainc,binc,weight,l;

void setup(){
size(400,400);
frameRate(500);
ainc=random(.001,.1);
binc=random(.001,.01);
weight=random(.1,.6);
l=200;
strokeWeight(weight);
smooth();
}

void draw(){
translate(width/2,height/2);
rotate(b);
line(0+l*cos(a),0,0,0+l*sin(a));
a=a+ainc;
b=b+binc;
}




EDIT: ^ Tidied up the code a bit.

-Devan
Page Index Toggle Pages: 1