Xing Xu-13-9-65
void setup() {
size(860, 860);
strokeWeight( 1.2 );
smooth();
background (255);
for (int i = 0; i < 8; i = i+1) {
float radius=random(0,300);
ellipse(random(0,860), random(0,860), radius,radius);
}
float x=0,y=0,a,b;
float[] xarray=new float[1000];
float[] yarray=new float[1000];
int linepoint=0,count=0;
for (int i = 0; i < 8; i = i+1) {
count=0;
y=y+random(0,200);
x=0;
while (x<860){
count=count+1;
a=x+random(0,120);
b=y+random(-10,10);
line(x,y,a,b);
x=a;y=b;
xarray[count]=x;
yarray[count]=y;
if (i>0)
{
if (random(0,3)>2.2)
{
linepoint=int(random(0,19));
line(xarray[linepoint],yarray[linepoint],x,y);
}
if (random(0,3)<1.3)
line(x,yarray[linepoint],x,y);
}
}
}
}
void draw(){
}
void mousePressed() {
strokeWeight( 1.2 );
smooth();
background (255);
for (int i = 0; i < 8; i = i+1) {
float radius=random(0,300);
ellipse(random(0,860), random(0,860), radius,radius);
}
float x=0,y=0,a,b;
float[] xarray=new float[1000];
float[] yarray=new float[1000];
int linepoint=0,count=0;
for (int i = 0; i < 8; i = i+1) {
count=0;
y=y+random(0,200);
x=0;
while (x<860){
count=count+1;
a=x+random(0,120);
b=y+random(-10,10);
line(x,y,a,b);
x=a;y=b;
xarray[count]=x;
yarray[count]=y;
if (i>0)
{
if (random(0,3)>2.2)
{
linepoint=int(random(0,19));
line(xarray[linepoint],yarray[linepoint],x,y);
}
if (random(0,3)<1.3)
line(x,yarray[linepoint],x,y);
}
}
}
}