davischrs
organic
float x = width*.5;
float y = width*.5;
float angle = 0.0;
float speed = .5;
void setup() {
size (800,800);
randomSeed(21);
smooth();
background (255);
stroke (255);
fill(255,0);
frameRate(200);
}
void draw () {
angle += random(-0.3, 0.3);
x += cos(angle * speed);
y += sin(angle * speed);
translate(x,y);
rotate(angle);
stroke(
map(x,width*.2,(width/2)*.8,0,255),
map(x,width*.2,width*.8,50,255),
map(y,height*.2,height*.8,0,255),55);
ellipse (0,0, width/30,height/30);
println (frameCount);
//this code causes the drawn objects to wraparound the screen
//and constrains it to a smaller box
while(x width*.8 - 1) x-=width*.6;
while(y height*.8 - 1) y-=height*.6;
if (frameCount == 20000) {
noLoop();
//saveFrame ();
}
}
organic
float x = width*.5;
float y = width*.5;
float angle = 0.0;
float speed = .5;
void setup() {
size (800,800);
randomSeed(21);
smooth();
background (255);
stroke (255);
fill(255,0);
frameRate(200);
}
void draw () {
angle += random(-0.3, 0.3);
x += cos(angle * speed);
y += sin(angle * speed);
translate(x,y);
rotate(angle);
stroke(
map(x,width*.2,(width/2)*.8,0,255),
map(x,width*.2,width*.8,50,255),
map(y,height*.2,height*.8,0,255),55);
ellipse (0,0, width/30,height/30);
println (frameCount);
//this code causes the drawn objects to wraparound the screen
//and constrains it to a smaller box
while(x width*.8 - 1) x-=width*.6;
while(y height*.8 - 1) y-=height*.6;
if (frameCount == 20000) {
noLoop();
//saveFrame ();
}
}