Guest User

Untitled

a guest
Feb 15th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. int w = 80;
  2. int cols, rows ;
  3. float angle = 0;
  4. float r = w/2 - 5;
  5. float [][] coords;
  6.  
  7.  
  8.  
  9. void setup() {
  10. size(800,800);
  11.  
  12. background(0);
  13. cols = width / w;
  14. rows = height / w;
  15. colorMode(HSB, 360, 360, 360);
  16. delay(10000);
  17. }
  18.  
  19. void draw() {
  20. fill(0);
  21. stroke(0);
  22. rect(0,0,width,80);
  23. rect(0,0,80,width);
  24. for(int i = 0; i<cols; i++){
  25. stroke(255);
  26. float cx = w + i * w + w / 2;
  27. float cy = w / 2;
  28. strokeWeight(1);
  29. ellipse( cx , cy , w -10 , w -10);
  30. float x = r * cos(angle * (i+1) );
  31. float y = r * sin(angle * (i+1) );
  32. strokeWeight(8);
  33. point(cx + x,cy + y);
  34. strokeWeight(1);
  35. stroke(100);
  36.  
  37. for(int j = 0; j<rows; j++){
  38. stroke(255);
  39. float cy2= w + j * w + w / 2;
  40. float cx2 = w / 2;
  41. strokeWeight(1);
  42. ellipse( cx2 , cy2 , w -10 , w -10);
  43. float x2 = r * cos(angle * (j+1) );
  44. float y2 = r * sin(angle * (j+1) );
  45. strokeWeight(8);
  46. point(cx2 + x2,cy2 + y2);
  47. strokeWeight(1);
  48. stroke(100);
  49.  
  50. stroke(i*10+j*10,255,255);
  51. strokeWeight(1);
  52. point(cx+x+(i*w), cy2+y2+(j*w));
  53. point(cx2+x2+(i*w), cy+y+(j*w));
  54.  
  55. }
  56.  
  57. }
  58. angle -= 0.01;
  59.  
  60. }
Add Comment
Please, Sign In to add comment