Danna - Exercise E

By Danna Bialik
//for some reason this wasn't on my page, i finished it in time void setup () { size (400, 400); background(0); } void draw() { if (mousePressed == true) { //if mouse is pressed stroke (mouseY, 0, mouseX, 50); noFill(); strokeWeight (mouseX/25); triangle (pmouseX, pmouseY, 140, 160, mouseX, mouseY); }else{ //otherwise stroke (20, 205, 20, 50); //set stroke to strokeWeight (.5); noFill(); float radius = (5+mouseY); //begin spiral for (int deg = 0; deg < 360+(mouseX+40)+ (mouseY+60); deg += 11) { float angle = radians (deg); float x= 140+ (cos(angle) * radius); float y= 160 +(sin (angle) * radius); ellipse (x, y, 5, 5); radius = radius +0.34; } } }

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*