Advertisement
Guest User

Untitled

a guest
May 8th, 2017
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. int x = 0;
  2. int y = -10;
  3. int z = 15;
  4.  
  5. void setup() {
  6. size(800, 800);
  7. }
  8.  
  9. void draw() {
  10. background(255);
  11. drawEllipse();
  12. y = (y) % width;
  13. x = (x) % width;
  14. z = (z) % width;
  15. }
  16.  
  17. void drawEllipse() {
  18. fill(255, 0, 0);
  19. ellipse(400, x, 150, 150);
  20. //Left Eye
  21. fill(255);
  22. ellipse(370, y, 15, 12);
  23. fill(0);
  24. ellipse(370, y, 6, 8);
  25. //Right Eye
  26. fill(255);
  27. ellipse(430, y, 15, 12);
  28. fill(0);
  29. ellipse(430, y, 6, 8);
  30. //Mouth
  31. noFill();
  32. arc(400, z, 60, 30, 0, PI);
  33. //Nose
  34. arc(400, z-10, 10, 10, 0, PI);
  35. //Eyebrows
  36. arc(370, z-40, 20, 5, PI+QUARTER_PI, TWO_PI);
  37. arc(430, z-40, 20, 5, PI+QUARTER_PI, TWO_PI);
  38. //Speed
  39. x= x+3;
  40. y= y+3;
  41. z= z+3;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement