Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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