new Pictures for my Livingroom

Nikolaus Gradwohl2013-12-16T08:15:18+00:00

I created a new set of pictures for my livingroom using a small processing script.

new pictures

The script generates a pattern of circles and saves it as a pdf files each time a key is pressed

For each image 20 circles with alternating colors are drawn. The size and the position is determined by two random factors.

import processing.pdf.*;

void setup() {
  size(594, 840);
  noLoop();


}

void draw() {
  beginRecord( PDF, "circles-####.pdf" );
  colorMode(HSB);
  color c1 = color(255);
  color c2 = color(random(255),255,255);

  background(255);
  noFill();
  translate(width/2, height/2);
  scale(.7,.7);
  float a=random(20);
  float b=random(-4,4);
  for( int i=0; i<20; i++) {
    fill( i%2==0?c1:c2);
    float x = cos(i/b)*(200-i*a);
    float y = sin(i/b)*(200-i*a);
    float r = 400-20*i;
    ellipse(x, y, r,r );
  }
  endRecord();
}

void keyPressed() {
  redraw();
}
Tweet This! submit to reddit Digg! Tags: | no comments | no trackbacks

See also:

processing lissajou generator
curves abstract art generator
violet abstract art generator
sketch experiment 7 - osc events
nested cubes in processing

Trackbacks

Comments

Leave a response

Leave a comment