Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. float myAngle = 0;
  2.  
  3. void setup(){
  4. size(640, 360);
  5. background(0);
  6. noStroke();
  7. colorMode(HSB);
  8. }
  9.  
  10. void draw(){
  11.  
  12. fill(random(255),255,255);
  13.  
  14. //translate(width/2,height/2);
  15. pushMatrix();
  16. translate(width/2, height/2);
  17. rotate(myAngle);
  18. rectMode(CENTER);
  19. //rect(0, 0, mouseX, mouseX);
  20. rect(0, 0, sin(myAngle/100)*400, sin(myAngle/100)*400);
  21. myAngle++;
  22. popMatrix();
  23. fill(0,1);
  24. rect(width/2,height/2,width,height);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement