Wednesday, January 20, 2010

Chalk marks v2

//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 + 300*sin(locations[i].x/locations[i].y), locations[i].y + 600*sin(locations[i].y/locations[i].x));
    locations[i].x += random(-3, 3);
    locations[i].y += random(-3, 3);
  }
}

    class PVector {
    float x, y;

PVector(float ix, float iy) {
  x = ix;
  y = iy;
}}

infoinfo

submitted by: DARYL_Gamma
views: 

Based on Inks by Johnny. Strangely random and yet seemingly intentional.

treeThis sketch has a parent
Tags:

commentscomment

loading loading...

 

Add a comment: