/******************************* * CAM (Code As Medium) * Experiment 1 | Stage 4 * Ira Greenberg 7.10.06 * Happy Oxford, Ohio *******************************/ void setup(){ size(400, 400); background(255, 127, 75); smooth(); float ang=0; float px=0, py=0; float radius = 0; for (int i=0; i<1000; i++){ px = width/2+cos(radians(ang))*radius; py = height/2+sin(radians(ang))*radius; tri((i*.09), px, py, color(255, 25), color(255-(i*255/1000), 127, 75, 50)); ang+=5; radius+=.2+i/700; } } void tri(float radius, float x, float y, color strokeCol, color fillCol){ float ang = 0; float px, py; stroke(strokeCol); fill(fillCol); beginShape(); for (int i=0; i< 3; i++){ px = x+cos(radians(ang))*radius; py = y+sin(radians(ang))*radius; vertex(px, py); ang+=360/3; } endShape(); }