Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.47 KB | None | 0 0
  1. float time = 0;
  2. float time2 = 0;
  3. float time3 = 0;
  4. float time4 = 0;
  5. float time5 = 0;
  6. float time6 = 0;
  7. float time7 = 0;
  8. float time8 = 0;
  9. float time9 = 0;
  10. float time10 = 0;
  11. float time11 = 0;
  12. float time12 = 0;
  13. float time13 = 0;
  14. float time14 = 0;
  15. float time15 = 0;
  16. float time16 = 0;
  17. float time17 = 0;
  18. float time18 = 0;
  19.  
  20. float[] wave = new float[0];
  21. float[] wave2 = new float[0];
  22. float[] wave3 = new float[0];
  23. float[] wave4 = new float[0];
  24. float[] wave5 = new float[0];
  25. float[] wave6 = new float[0];
  26. float[] wave7 = new float[0];
  27. float[] wave8 = new float[0];
  28. float[] wave9 = new float[0];
  29. float[] wave10 = new float[0];
  30. float[] wave11 = new float[0];
  31. float[] wave12 = new float[0];
  32. float[] wave13 = new float[0];
  33. float[] wave14 = new float[0];
  34. float[] wave15 = new float[0];
  35. float[] wave16 = new float[0];
  36. float[] wave17 = new float[0];
  37. float[] wave18 = new float[0];
  38.  
  39.  
  40. float x1 = 0;
  41. float y1 = 0;
  42. float x2 = 0;
  43. float y2 = 0;
  44. float x3 = 0;
  45. float y3 = 0;
  46. float x4 = 0;
  47. float y4 = 0;
  48. float x5 = 0;
  49. float y5 = 0;
  50. float x6 = 0;
  51. float y6 = 0;
  52. float x7 = 0;
  53. float y7 = 0;
  54. float x8 = 0;
  55. float y8 = 0;
  56. float x9 = 0;
  57. float y9 = 0;
  58. float x10 = 0;
  59. float y10 = 0;
  60. float x11 = 0;
  61. float y11 = 0;
  62. float x12 = 0;
  63. float y12 = 0;
  64. float x13 = 0;
  65. float y13 = 0;
  66. float x14 = 0;
  67. float y14 = 0;
  68.  
  69. /*
  70. float timeup = random(0, 0.1);
  71. float time2up = random(0, 0.1);
  72. float time3up = random(0, 0.1);
  73. float time4up = random(0, 0.1);
  74. float time5up = random(0, 0.1);
  75. float time6up = random(0, 0.1);
  76. float time7up = random(0, 0.1);
  77. float time8up = random(0, 0.1);
  78. float time9up = random(0, 0.1);
  79. float time10up = random(0, 0.1);
  80. float time11up = random(0, 0.1);
  81. float time12up = random(0, 0.1);
  82. float time13up = random(0, 0.1);
  83. float time14up = random(0, 0.1);
  84. float time15up = random(0, 0.1);
  85. float time16up = random(0, 0.1);
  86. float time17up = random(0, 0.1);
  87. float time18up = random(0, 0.1);
  88. */
  89.  
  90. float timeup = 0.02;
  91. float time2up = 0.02*2;
  92. float time3up = 0.02;
  93. float time4up = 0.02*1.2;
  94. float time5up = 0.02;
  95. float time6up = 0.02*3;
  96. float time7up = 0.02;
  97. float time8up = 0.02*2.6;
  98. float time9up = 0.02;
  99. float time10up = 0.02*2.5;
  100. float time11up = 0.02;
  101. float time12up = 0.02*1.4;
  102. float time13up = 0.02;
  103. float time14up = 0.02*1.5;
  104. float time15up = 0.02;
  105. float time16up = 0.02*1.6;
  106. float time17up = 0.02;
  107. float time18up = 0.02*8;
  108.  
  109.  
  110. void setup() {
  111. size(4000, 4000);
  112. ellipseMode(CENTER);
  113. strokeCap(ROUND);
  114. //noLoop();
  115. }
  116.  
  117. void draw() {
  118. background(135, 182, 167);
  119. float radius = 100*4;
  120.  
  121.  
  122. stroke(227, 240, 155);
  123. strokeWeight(10);
  124. noFill();
  125.  
  126. // ellipse(100,width/2,radius*2, radius*2);
  127. // ellipse( width/2, 100, radius*2, radius*2);
  128.  
  129.  
  130. y1 = radius * sin(time);
  131. x1 = radius * cos(time2);
  132. y2 = radius * sin(time3);
  133. x2 = radius * cos(time4);
  134. y3 = radius * sin(time5);
  135. x3 = radius * cos(time6);
  136. y4 = radius * sin(time7);
  137. x4 = radius * cos(time8);
  138. y5 = radius * sin(time9);
  139. x5 = radius * cos(time10);
  140. y6 = radius * sin(time11);
  141. x6 = radius * cos(time12);
  142. y7 = radius * sin(time13);
  143. x7 = radius * cos(time14);
  144. y8 = radius * sin(time15);
  145. x8 = radius * cos(time16);
  146. y9 = radius * sin(time17);
  147. x9 = radius * cos(time18);
  148.  
  149.  
  150. wave = splice(wave, y1, 0);
  151. wave2 = splice(wave2, x1, 0);
  152. wave3 = splice(wave3, y2, 0);
  153. wave4 = splice(wave4, x2, 0);
  154. wave5 = splice(wave5, y3, 0);
  155. wave6 = splice(wave6, x3, 0);
  156. wave7 = splice(wave7, y4, 0);
  157. wave8 = splice(wave8, x4, 0);
  158. wave9 = splice(wave9, y5, 0);
  159. wave10 = splice(wave10, x5, 0);
  160. wave11 = splice(wave11, y6, 0);
  161. wave12 = splice(wave12, x6, 0);
  162. wave13 = splice(wave13, y7, 0);
  163. wave14 = splice(wave14, x7, 0);
  164. wave15 = splice(wave15, y8, 0);
  165. wave16 = splice(wave16, x8, 0);
  166. wave17 = splice(wave17, y9, 0);
  167. wave18 = splice(wave18, x9, 0);
  168.  
  169. pushMatrix();
  170. translate(width*0.25, height*0.25);
  171. beginShape();
  172. for (int i = 0; i < wave.length; i++) {
  173. vertex(wave2[i], wave[i]);
  174. }
  175. endShape();
  176. popMatrix();
  177.  
  178. pushMatrix();
  179. translate(width*0.5, height*0.25);
  180. beginShape();
  181. for (int i = 0; i < wave.length; i++) {
  182. vertex(wave4[i], wave3[i]);
  183. }
  184. endShape();
  185. popMatrix();
  186.  
  187. pushMatrix();
  188. translate(width*0.75, height*0.25);
  189. beginShape();
  190. for (int i = 0; i < wave.length; i++) {
  191. vertex(wave6[i], wave5[i]);
  192. }
  193. endShape();
  194.  
  195. popMatrix();
  196.  
  197. pushMatrix();
  198. translate(width*0.25, height*0.5);
  199. beginShape();
  200. for (int i = 0; i < wave.length; i++) {
  201. vertex(wave8[i], wave7[i]);
  202. }
  203. endShape();
  204. popMatrix();
  205.  
  206. pushMatrix();
  207. translate(width*0.5, height*0.5);
  208. beginShape();
  209. for (int i = 0; i < wave.length; i++) {
  210. vertex(wave10[i], wave9[i]);
  211. }
  212. endShape();
  213. popMatrix();
  214.  
  215. pushMatrix();
  216. translate(width*0.75, height*0.5);
  217. beginShape();
  218. for (int i = 0; i < wave.length; i++) {
  219. vertex(wave12[i], wave11[i]);
  220. }
  221. endShape();
  222. popMatrix();
  223.  
  224. pushMatrix();
  225. translate(width*0.25, height*0.75);
  226. beginShape();
  227. for (int i = 0; i < wave.length; i++) {
  228. vertex(wave14[i], wave13[i]);
  229. }
  230. endShape();
  231. popMatrix();
  232.  
  233. pushMatrix();
  234. translate(width*0.5, height*0.75);
  235. beginShape();
  236. for (int i = 0; i < wave.length; i++) {
  237. vertex(wave16[i], wave15[i]);
  238. }
  239. endShape();
  240. popMatrix();
  241.  
  242. pushMatrix();
  243. translate(width*0.75, height*0.75);
  244. beginShape();
  245. for (int i = 0; i < wave.length; i++) {
  246. vertex(wave18[i], wave17[i]);
  247. }
  248. endShape();
  249. popMatrix();
  250.  
  251. // ellipse(x2, y, 5, 5);
  252.  
  253. fill(random(255), random(255), random(255));
  254. // ellipse(x1+100,y1+width/2, 8, 8);
  255. // ellipse(x2+width/2, y2+100, 8, 8);
  256.  
  257. time += timeup;
  258. time2 += time2up;
  259. time3 += time3up;
  260. time4 += time4up;
  261. time5 += time5up;
  262. time6 += time6up;
  263. time7 += time7up;
  264. time8 += time8up;
  265. time9 += time9up;
  266. time10 += time10up;
  267. time11 += time11up;
  268. time12 += time12up;
  269. time13 += time13up;
  270. time14 += time14up;
  271. time15 += time15up;
  272. time16 += time16up;
  273. time17 += time17up;
  274. time18 += time18up;
  275.  
  276.  
  277.  
  278. //gridx+=distance;
  279.  
  280. //gridx = distance;
  281. //gridy+=distance;
  282.  
  283. }
  284.  
  285. void mouseClicked() {
  286. save("patterns"+frameCount+".png");
  287. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement