Monday, December 16, 2013

Spiralling Out of Control 16/12/2013

// just type here
// and click "save" when your done

int i = 0;

void setup()
{
  size(400,400);
  smooth();
  background(9,237,135);
  frameRate(10);
}


void draw()
{
  pushMatrix();
  fill(30,200,10,10);
  //stroke(200, 10, 10);
  strokeWeight(2);
  translate(sin(radians(i)) * (i / 2) + (width / 2), cos(radians(i)) * (i / 2) + (height/2));
  rotate(i);
  scale(i);
  strokeWeight(0.4);
  shape();
  popMatrix();
  i++;
}

void shape() {
 line(1,1,1,3);
 line(1,3,2,3);
 line(2,3,2,2);
 line(2,2,1,2);
 line(1,2,2,1);
}


void mousePressed()
{
  background(255);
  i=0;  
}

info info

submitted by: technocampsuog
views: 81
Spiralling out of control example Newport University

Tags: Spiralling, out, of, control, example, Newport, University

comments comment

loading loading...

 

Add a comment: