12
edits
No edit summary |
|||
Line 1: | Line 1: | ||
==ASSIGNMENT 2== | |||
==Fernando Millan== | |||
[[Image:MILLAN_HW_2.JPG]] | |||
void setup () { | |||
size(2000, 1000); | |||
} | |||
void draw () { | |||
background(20, 20, 20); | |||
float Mouse = 5+(mouseX/100); | |||
float Distance = mouseX; | |||
float MY = mouseY*.90; | |||
if (mousePressed) { | |||
noStroke(); | |||
} else { | |||
stroke(0); | |||
} | |||
pushMatrix(); | |||
translate(666, height*0.5); | |||
for (int i=30; i<MY; i+=5) { | |||
for (int F=0; F<Mouse; F+=1) { | |||
if ( i % 2 == 0) { | |||
fill(100, 50); | |||
} else { | |||
fill(255, 0, 0, 50); | |||
} | |||
rectMode(CENTER); | |||
rotate(radians(F)); | |||
rect(i, i, 30, 30); | |||
} | |||
} | |||
popMatrix(); | |||
//println (mouseY); | |||
//println (mouseX); | |||
} | |||
==ASSIGNMENT 1== | ==ASSIGNMENT 1== | ||
edits