Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. int SIZE = width - (width*1/3);//Finalizes a "size" variable
  2. int X_CENTRE = (width/2);//Creates a value of the width centre of the canvas.
  3. int Y_CENTRE = (height/2);//Creates a value of the height centre of the canvas.
  4. int eyeSpacing = SIZE/20;//Sets a value for the spacing between the eyes.
  5. int wingSpacing = SIZE/6;//Sets a value for the spacing between the wings.
  6. int eye_Size = SIZE/20;//Sets the size of the eyes.
  7. int wingWidth = SIZE/2;//Sets the width of the wing.
  8. int wingHeight = SIZE/4;//Sets the height of the wing.
  9.  
  10.  
  11. void setup()
  12. {
  13. size(900,900);//Sets the size of the canvas.
  14. background(#F2ABF1);//Colors the background pink.
  15. }
  16.  
  17. void draw()
  18. {
  19.  
  20. drawBee();
  21.  
  22. }
  23.  
  24.  
  25. void setSizeXandY()
  26. {
  27.  
  28.  
  29.  
  30. }
  31.  
  32. void drawBee()
  33. {
  34.  
  35. strokeWeight(10);//Sets the thickness of the shape.
  36. fill(#39F7FF);//Colors the wings blue.
  37. ellipse(X_CENTRE-wingSpacing,Y_CENTRE*1.2+15,wingWidth,wingHeight);//Draws the left wing.
  38. ellipse(X_CENTRE+wingSpacing,Y_CENTRE*1.2+15,wingWidth,wingHeight);//Draws the right wing.
  39.  
  40.  
  41. fill(#F7E00A);//Colors the body yellow.
  42. strokeWeight(14);//Sets the thickness of the shape.
  43. ellipse(X_CENTRE,Y_CENTRE*1.2,SIZE*0.5,SIZE*0.8);//Draws the body of the bee.
  44.  
  45.  
  46. fill(0);//Colors the triangle black.
  47. triangle(X_CENTRE-25,Y_CENTRE*1.2+245,X_CENTRE+25,Y_CENTRE*1.2+245,X_CENTRE,Y_CENTRE*1.2+265);//Draws a triangle (the spike) in the bottom of the body.
  48.  
  49.  
  50. strokeWeight(30);//Sets the thickness of the shape.
  51. line(X_CENTRE-SIZE/4.3,Y_CENTRE*1.2+15,X_CENTRE+SIZE/4.21,Y_CENTRE*1.2+15);//Draws the middle stripe on the body.
  52. line(X_CENTRE-SIZE/4.32,Y_CENTRE*1.2-50,X_CENTRE+SIZE/4.3,Y_CENTRE*1.2-50);//Draws the top stripe on the body.
  53. line(X_CENTRE-SIZE/4.5,Y_CENTRE*1.2+77,X_CENTRE+SIZE/4.45,Y_CENTRE*1.2+77);//Draws the bottom stripe on the body.
  54.  
  55. strokeWeight(10);//Sets the thickness of the shape.
  56. fill(0);//Colors the eyes black.
  57. circle(X_CENTRE-eyeSpacing,Y_CENTRE/1.3,eye_Size);//Draws the left eye.
  58. circle(X_CENTRE+eyeSpacing,Y_CENTRE/1.3,eye_Size);//Draws the right eye.
  59.  
  60. }
  61.  
  62.  
  63.  
  64. void calcDimensions()
  65. {
  66.  
  67.  
  68.  
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement