Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. float ellipseXPosition;
  2. color red = color(255,0,0);
  3. color randomColor = randomColor();
  4.  
  5.  
  6. void setup() {
  7. size(500,500);
  8. noStroke();
  9.  
  10. ellipseXPosition = 250;
  11. }
  12.  
  13.  
  14. void draw() {
  15. background(255,255,255);
  16. fill(randomColor);
  17.  
  18. circle(250,250,300);
  19.  
  20. //ellipseXPosition = ellipseXPosition + 0.2;
  21. }
  22.  
  23. void circle(float xPos, float yPos, float diameter) {
  24.  
  25. // x y width hight
  26. // float float float float
  27. ellipse(xPos, yPos, diameter, diameter);
  28.  
  29. }
  30.  
  31. color randomColor() {
  32.  
  33. float r = random(0,255);
  34. float g = random(0,255);
  35. float b = random(0,255);
  36.  
  37. color resultColor = color(r,g,b);
  38.  
  39. return resultColor;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement