Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. int x = 100;
  2. int y = 100;
  3.  
  4. void setup() {
  5. size(800, 800);
  6. background(0, 0, 255);
  7. frameRate(30);
  8. }
  9.  
  10. void draw() {
  11. background(100, 0, 200);
  12. // Start with i as 1
  13. int i = 0;
  14. //while i is less than the width of the window
  15. while (i < width) {
  16. noStroke();
  17. float distance = abs(mouseX - i);
  18. fill(distance);
  19. rect(i, 0, 10, height);
  20.  
  21. //Increase i by 10
  22. i += 50;
  23.  
  24. // Set ellipse to center
  25. ellipseMode(CENTER);
  26.  
  27. //drawBunny(100, 100, 64, color(255));
  28. //}
  29.  
  30. ////Drawing Bunny
  31. //void drawBunny(int x, int y, x/2, y/2) {
  32.  
  33. //Bunny head
  34. fill(255);
  35. ellipse(400,400,250,250);
  36. //ellipse(mouseX, mouseY-30, 550, 550);
  37.  
  38. //Bunny ears
  39. fill(255,192,203);
  40. ellipse(300,245,50,170);
  41. //ellipse(mouseX-200, mouseY-330, 110, 312);
  42. fill(255,192,203);
  43. ellipse(495,245,50,170);
  44. //ellipse(mouseX+200, mouseY-330, 110, 312);
  45.  
  46. //Bunny eyes
  47. fill(0,0,0);
  48. ellipse(340,385,45,45);
  49. //ellipse(mouseX-114, mouseY+1, pmouseX-500, pmouseY + -200);
  50. fill(0,0,0);
  51. ellipse(454,385,45,45);
  52. //ellipse(mouseX+139, mouseY+7, pmouseX+-500, pmouseY + -200);
  53.  
  54. //Bunny nose
  55. fill(0,0,0);
  56. ellipse(400,426,70,50);
  57. //ellipse(mouseX-(-13), mouseY-(-116), -80, 78);
  58. }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement