Wednesday, January 13, 2010

Inky

PVector[] locations = new PVector[40];

void setup() {
  size(400, 400, P2D);
  for(int i = 0; i < locations.length; i++) {
    locations[i] = new PVector(random(0, width), random(0, height));
  }
  stroke(0, 100);
}

void draw() {
  for(int i = 0; i < locations.length; i++) {
    point(locations[i].x, locations[i].y);
    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 info

submitted by: jon_stutters
views: 487
I found this strangely compelling given that its almost no code.

Tags:

comments comment

loading loading...

 

Add a comment: