From 4a9a70fc06ccadec19ff387e3a206f8be0b3d9b8 Mon Sep 17 00:00:00 2001 From: lee2sman Date: Thu, 21 Jan 2021 04:53:14 -0500 Subject: [PATCH] add turtle triangle icon to end of drawing --- lib/plogo.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/plogo.js b/lib/plogo.js index ebd1047..5701f72 100644 --- a/lib/plogo.js +++ b/lib/plogo.js @@ -3,6 +3,7 @@ function setup(){ createCanvas(windowWidth,windowHeight); //canvas is size of window resetDefaults(); turtle(); + displayTurtle(); } function resetDefaults(){ @@ -61,6 +62,16 @@ function randint(max=100){ //default returns int between 0 and 100 return int(random(max)) } +function displayTurtle(){ + stroke(0,255,0); + strokeWeight(1); + fill(0,255,0); + push() + translate(x,y) + rotate(angle) + triangle(-10,10,10,10,0,-10); + pop() +} function windowResized(){ //resizes canvas if window is resized resizeCanvas(windowWidth, windowHeight); }