Created
January 25, 2017 18:17
-
-
Save nataliefreed/4248273f99f8648f884afb7f0456692c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
createCanvas(800, 800); | |
for(var i=0;i<10;i++) { | |
if(i % 3 == 0) { | |
arrow(50, 50, 10, color(255, 0, 100)); | |
} | |
else { | |
arrow(50, 50, 10, color(150, 0, 255)); | |
} | |
translate(50, 0); | |
} | |
var total = 0; | |
while(total < 100) { | |
arrow(50, 50, 10, color(100, 200, 255)); | |
translate(20, 20); | |
total = total+10; | |
} | |
} | |
function draw() { | |
} | |
function arrow(x, y, w, color) { | |
strokeWeight(3); | |
stroke(color); | |
line(x-3.*w,y, x+w, y); | |
line(x+w,y, x, y-w*0.5); | |
line(x+w,y, x, y+w*0.5); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment