Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float time = 0;
- float time2 = 0;
- float time3 = 0;
- float time4 = 0;
- float time5 = 0;
- float time6 = 0;
- float time7 = 0;
- float time8 = 0;
- float time9 = 0;
- float time10 = 0;
- float time11 = 0;
- float time12 = 0;
- float time13 = 0;
- float time14 = 0;
- float time15 = 0;
- float time16 = 0;
- float time17 = 0;
- float time18 = 0;
- float[] wave = new float[0];
- float[] wave2 = new float[0];
- float[] wave3 = new float[0];
- float[] wave4 = new float[0];
- float[] wave5 = new float[0];
- float[] wave6 = new float[0];
- float[] wave7 = new float[0];
- float[] wave8 = new float[0];
- float[] wave9 = new float[0];
- float[] wave10 = new float[0];
- float[] wave11 = new float[0];
- float[] wave12 = new float[0];
- float[] wave13 = new float[0];
- float[] wave14 = new float[0];
- float[] wave15 = new float[0];
- float[] wave16 = new float[0];
- float[] wave17 = new float[0];
- float[] wave18 = new float[0];
- float x1 = 0;
- float y1 = 0;
- float x2 = 0;
- float y2 = 0;
- float x3 = 0;
- float y3 = 0;
- float x4 = 0;
- float y4 = 0;
- float x5 = 0;
- float y5 = 0;
- float x6 = 0;
- float y6 = 0;
- float x7 = 0;
- float y7 = 0;
- float x8 = 0;
- float y8 = 0;
- float x9 = 0;
- float y9 = 0;
- float x10 = 0;
- float y10 = 0;
- float x11 = 0;
- float y11 = 0;
- float x12 = 0;
- float y12 = 0;
- float x13 = 0;
- float y13 = 0;
- float x14 = 0;
- float y14 = 0;
- /*
- float timeup = random(0, 0.1);
- float time2up = random(0, 0.1);
- float time3up = random(0, 0.1);
- float time4up = random(0, 0.1);
- float time5up = random(0, 0.1);
- float time6up = random(0, 0.1);
- float time7up = random(0, 0.1);
- float time8up = random(0, 0.1);
- float time9up = random(0, 0.1);
- float time10up = random(0, 0.1);
- float time11up = random(0, 0.1);
- float time12up = random(0, 0.1);
- float time13up = random(0, 0.1);
- float time14up = random(0, 0.1);
- float time15up = random(0, 0.1);
- float time16up = random(0, 0.1);
- float time17up = random(0, 0.1);
- float time18up = random(0, 0.1);
- */
- float timeup = 0.02;
- float time2up = 0.02*2;
- float time3up = 0.02;
- float time4up = 0.02*1.2;
- float time5up = 0.02;
- float time6up = 0.02*3;
- float time7up = 0.02;
- float time8up = 0.02*2.6;
- float time9up = 0.02;
- float time10up = 0.02*2.5;
- float time11up = 0.02;
- float time12up = 0.02*1.4;
- float time13up = 0.02;
- float time14up = 0.02*1.5;
- float time15up = 0.02;
- float time16up = 0.02*1.6;
- float time17up = 0.02;
- float time18up = 0.02*8;
- void setup() {
- size(4000, 4000);
- ellipseMode(CENTER);
- strokeCap(ROUND);
- //noLoop();
- }
- void draw() {
- background(135, 182, 167);
- float radius = 100*4;
- stroke(227, 240, 155);
- strokeWeight(10);
- noFill();
- // ellipse(100,width/2,radius*2, radius*2);
- // ellipse( width/2, 100, radius*2, radius*2);
- y1 = radius * sin(time);
- x1 = radius * cos(time2);
- y2 = radius * sin(time3);
- x2 = radius * cos(time4);
- y3 = radius * sin(time5);
- x3 = radius * cos(time6);
- y4 = radius * sin(time7);
- x4 = radius * cos(time8);
- y5 = radius * sin(time9);
- x5 = radius * cos(time10);
- y6 = radius * sin(time11);
- x6 = radius * cos(time12);
- y7 = radius * sin(time13);
- x7 = radius * cos(time14);
- y8 = radius * sin(time15);
- x8 = radius * cos(time16);
- y9 = radius * sin(time17);
- x9 = radius * cos(time18);
- wave = splice(wave, y1, 0);
- wave2 = splice(wave2, x1, 0);
- wave3 = splice(wave3, y2, 0);
- wave4 = splice(wave4, x2, 0);
- wave5 = splice(wave5, y3, 0);
- wave6 = splice(wave6, x3, 0);
- wave7 = splice(wave7, y4, 0);
- wave8 = splice(wave8, x4, 0);
- wave9 = splice(wave9, y5, 0);
- wave10 = splice(wave10, x5, 0);
- wave11 = splice(wave11, y6, 0);
- wave12 = splice(wave12, x6, 0);
- wave13 = splice(wave13, y7, 0);
- wave14 = splice(wave14, x7, 0);
- wave15 = splice(wave15, y8, 0);
- wave16 = splice(wave16, x8, 0);
- wave17 = splice(wave17, y9, 0);
- wave18 = splice(wave18, x9, 0);
- pushMatrix();
- translate(width*0.25, height*0.25);
- beginShape();
- for (int i = 0; i < wave.length; i++) {
- vertex(wave2[i], wave[i]);
- }
- endShape();
- popMatrix();
- pushMatrix();
- translate(width*0.5, height*0.25);
- beginShape();
- for (int i = 0; i < wave.length; i++) {
- vertex(wave4[i], wave3[i]);
- }
- endShape();
- popMatrix();
- pushMatrix();
- translate(width*0.75, height*0.25);
- beginShape();
- for (int i = 0; i < wave.length; i++) {
- vertex(wave6[i], wave5[i]);
- }
- endShape();
- popMatrix();
- pushMatrix();
- translate(width*0.25, height*0.5);
- beginShape();
- for (int i = 0; i < wave.length; i++) {
- vertex(wave8[i], wave7[i]);
- }
- endShape();
- popMatrix();
- pushMatrix();
- translate(width*0.5, height*0.5);
- beginShape();
- for (int i = 0; i < wave.length; i++) {
- vertex(wave10[i], wave9[i]);
- }
- endShape();
- popMatrix();
- pushMatrix();
- translate(width*0.75, height*0.5);
- beginShape();
- for (int i = 0; i < wave.length; i++) {
- vertex(wave12[i], wave11[i]);
- }
- endShape();
- popMatrix();
- pushMatrix();
- translate(width*0.25, height*0.75);
- beginShape();
- for (int i = 0; i < wave.length; i++) {
- vertex(wave14[i], wave13[i]);
- }
- endShape();
- popMatrix();
- pushMatrix();
- translate(width*0.5, height*0.75);
- beginShape();
- for (int i = 0; i < wave.length; i++) {
- vertex(wave16[i], wave15[i]);
- }
- endShape();
- popMatrix();
- pushMatrix();
- translate(width*0.75, height*0.75);
- beginShape();
- for (int i = 0; i < wave.length; i++) {
- vertex(wave18[i], wave17[i]);
- }
- endShape();
- popMatrix();
- // ellipse(x2, y, 5, 5);
- fill(random(255), random(255), random(255));
- // ellipse(x1+100,y1+width/2, 8, 8);
- // ellipse(x2+width/2, y2+100, 8, 8);
- time += timeup;
- time2 += time2up;
- time3 += time3up;
- time4 += time4up;
- time5 += time5up;
- time6 += time6up;
- time7 += time7up;
- time8 += time8up;
- time9 += time9up;
- time10 += time10up;
- time11 += time11up;
- time12 += time12up;
- time13 += time13up;
- time14 += time14up;
- time15 += time15up;
- time16 += time16up;
- time17 += time17up;
- time18 += time18up;
- //gridx+=distance;
- //gridx = distance;
- //gridy+=distance;
- }
- void mouseClicked() {
- save("patterns"+frameCount+".png");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement