Skip to content

Instantly share code, notes, and snippets.

@nataliefreed
Created January 25, 2017 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nataliefreed/4248273f99f8648f884afb7f0456692c to your computer and use it in GitHub Desktop.
Save nataliefreed/4248273f99f8648f884afb7f0456692c to your computer and use it in GitHub Desktop.
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