xxxxxxxxxx
23
var drawsteps = 250, cgreen = 0;
var tadd = 0.0;
function setup() {
createCanvas(500,500); //(windowWidth, windowHeight);
print("(click canvas window and ) use [+] or [-]");
}
function draw() {
background(150,cgreen, 0);
stroke(0, 0, 150); strokeWeight(3); noFill();
translate(width/2,height/2);
beginShape();
for (var t = 0; t < drawsteps *TWO_PI; t += PI/2+tadd) {
curveVertex(t * cos(t),t * sin(t));
}
endShape();
}
function keyPressed(){
if ( key == '+' ) { tadd = 0.015; cgreen = 150;}
if ( key == '-' ) { tadd = 0.0; cgreen = 0;}
}