Guest User

Untitled

a guest
Oct 21st, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. void setup(){
  2. size (800,800);
  3. }
  4. void draw(){
  5.  
  6. translate(100,100);
  7. for(int x = 0; x< 5; x++){
  8. motif();
  9. translate(140,0);
  10. }
  11. }//end draw//
  12.  
  13.  
  14. void motif(){
  15. rectMode(CENTER);
  16.  
  17. //first rectangle//
  18. fill(0);
  19. noStroke();
  20. rect(0,0,100,100);
  21.  
  22. //2nd//
  23. stroke(255);
  24. strokeWeight(2);
  25. rect(0,0,85,85);
  26.  
  27. //3ed//
  28. noStroke();
  29. pushMatrix();
  30. rotate(radians(45));
  31. rect(0,0,100,100);
  32.  
  33. //4th//
  34. stroke(255);
  35. strokeWeight(2);
  36. rect(0,0,80,80);
  37. popMatrix();
  38.  
  39. //5th//
  40. fill(0);
  41. noStroke();
  42. rect(0,0,70,70);
  43.  
  44. }
Add Comment
Please, Sign In to add comment