SHARE
TWEET

Untitled

a guest Nov 18th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Forms the top of the trees (leaves and coconuts)
  2. function drawLeaf(x, y, leafColor, leafSize, leafAngle, leafCurve) {
  3.   penUp();
  4.   moveTo(x, y);
  5.   penWidth(5);
  6.   penColor(leafColor);
  7.   turnTo(leafAngle);
  8.   penDown();
  9.   arcRight(leafCurve,leafSize);
  10.   penUp();
  11.   for (var i = 0; i < 4; i++) {
  12.     moveTo(randomNumber(x, x),y);
  13.     penWidth(randomNumber(1, 5));
  14.     penRGB(randomNumber(0, 154), randomNumber(100, 255), randomNumber(0, 50), 1);
  15.   }
  16.  
  17. }
  18. drawLeaf(100, 100, "green", 50, 45, 130);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top