Wednesday, January 20, 2010
Chalk marks
//Based on Ink by Johnny
PVector[] locations = new PVector[40];
void setup() {
size(800, 600, P2D);
background(0);
for(int i = 0; i < locations.length; i++) {
locations[i] = new PVector(random(0, width), random(0, height));
}
}
void draw() {
for(int i = 0; i < locations.length; i++) {
stroke(locations[i].x/2, locations[i].y/2,random(0, 255),80);
point(locations[i].x + 400*sin(locations[i].x/20), locations[i].y + 300*sin(locations[i].y/locations[i].x));
locations[i].x += random(-1, 1);
locations[i].y += random(-1, 1);
}
}
class PVector {
float x, y;
PVector(float ix, float iy) {
x = ix;
y = iy;
}}
PVector[] locations = new PVector[40];
void setup() {
size(800, 600, P2D);
background(0);
for(int i = 0; i < locations.length; i++) {
locations[i] = new PVector(random(0, width), random(0, height));
}
}
void draw() {
for(int i = 0; i < locations.length; i++) {
stroke(locations[i].x/2, locations[i].y/2,random(0, 255),80);
point(locations[i].x + 400*sin(locations[i].x/20), locations[i].y + 300*sin(locations[i].y/locations[i].x));
locations[i].x += random(-1, 1);
locations[i].y += random(-1, 1);
}
}
class PVector {
float x, y;
PVector(float ix, float iy) {
x = ix;
y = iy;
}}
info
submitted by: DARYL_Gammaviews:
Based on Inks by Johnny. Strangely random and yet seemingly intentional.

comments

Add a comment: