violet abstract art generator

Nikolaus Gradwohl2013-02-12T08:14:51+00:00

I generated new pictures for my living-room wall using a little processing sketch that generates random violet triangles.

violet aag

Here is the code I used to generate them if you want to create some for your living-room too

import processing.pdf.*;

void setup() {
  size(297, 420);
  noLoop();

  beginRecord(PDF, "violet-####.pdf");
  colorMode(HSB); 
}

boolean record = false;

void draw() {
  background(255);

  for ( int i=0; i<20; i++) {
    float h =  200 + random( -10, 10);
      fill(h, 255, 255, 128 + random(30));
    stroke(h, 255, 128, 128 + random(30));
    strokeWeight(2);

    beginShape();
    float x = random( 80, width - 80);
    float y = random( 80, height - 80);
    float r = random( 50, 80);
    for( int j =0; j < 3; j++) {
      vertex( x + random(-r,r), y + random( -r, r ));
    }

    endShape(CLOSE);
  }
  endRecord();
}

void keyPressed() {
  beginRecord(PDF, "violet-####.pdf");
  colorMode(HSB);
  redraw();
}
Tweet This! submit to reddit Digg! Tags: | no comments | no trackbacks

See also:

new Pictures for my Livingroom
processing lissajou generator
curves abstract art generator
sketch experiment 7 - osc events
nested cubes in processing

Trackbacks

Comments

Leave a response

Leave a comment