Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. drawBackground();
  2. drawClouds();
  3. drawTrees();
  4. drawFence();
  5. function drawBackground(){
  6. noStroke();
  7. background(rgb(0,200,255));
  8. fill("green");
  9. rect(0,380,400,20);
  10. }
  11.  
  12. function drawTrees(){
  13. noStroke();
  14. //Draw All Trunks
  15. fill(rgb(150,100,0));
  16. rect(210,330,30,50);
  17. rect(290,330,30,50);
  18. rect(360,330,30,50);
  19. //Draw All Branches
  20. fill("green");
  21. regularPolygon(225,280,3,100);
  22. regularPolygon(305,280,3,110);
  23. regularPolygon(375,290,3,95);
  24. }
  25.  
  26. function drawClouds(){
  27. noStroke();
  28. fill(rgb(255,255,255,100));
  29. ellipse(300,200,200,50);
  30. ellipse(320,200,200,70);
  31. ellipse(340,200,200,50);
  32.  
  33. ellipse(100,100,200,50);
  34. ellipse(120,100,200,70);
  35. ellipse(140,100,200,50);
  36. }
  37.  
  38. function drawFence(){
  39. stroke("white");
  40. strokeWeight(5);
  41. line(0,360,400,360);
  42. line(20,350,20,380);
  43. line(50,350,50,380);
  44. line(80,350,80,380);
  45. line(110,350,110,380);
  46. line(140,350,140,380);
  47. line(170,350,170,380);
  48. line(200,350,200,380);
  49. line(230,350,230,380);
  50. line(260,350,260,380);
  51. line(290,350,290,380);
  52. line(320,350,320,380);
  53. line(350,350,350,380);
  54. line(380,350,380,380);
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement