Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PVector v1 = new PVector();
- PVector v2 = new PVector();
- float time = 0;
- float time2 = 0;
- float time3 = 0;
- float time4 = 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 x = 0;
- float y = 0;
- float x2 = 0;
- float y2 = 0;
- float x3 = 0;
- float y3 = 0;
- float x4 = 0;
- float y4 = 0;
- float timeup = random(0.0, 0.2);
- float time2up = random(0.0, 0.2);
- float time3up = random(0.0, 0.2);
- float time4up = random(0.0, 0.2);
- float xlerp = 0;
- float ylerp = 0;
- float xlerpnew = 0;
- float ylerpnew = 0;
- float xyr1 = random(0,5);
- float xyr2 = random(0,5);
- float xyr3 = random(0,5);
- float xyr4 = random(0,5);
- float xyr5 = random(0,5);
- float xyr6 = random(0,5);
- float xyr7 = random(0,5);
- float xyr8 = random(0,5);
- void setup() {
- size(1000, 1000);
- ellipseMode(CENTER);
- //noLoop();
- }
- void draw() {
- background(36, 47, 64);
- float radius = 100;
- stroke(204, 164, 59);
- noFill();
- // ellipse(100, width/2, radius*2, radius*2);
- // ellipse( width/2, 100, radius*2, radius*2);
- // ellipse( width-100, width/2, radius*2, radius*2);
- x = radius*xyr1 * cos(time);
- y = radius*xyr2 * sin(time);
- x2 = radius*xyr3 * cos(time2);
- y2 = radius*xyr4 * sin(time2);
- x3 = radius*xyr5 * cos(time3);
- y3 = radius*xyr6 * sin(time3);
- x4 = radius*xyr7 * cos(time4);
- y4 = radius*xyr8 * sin(time4);
- wave = splice(wave, y, 0);
- wave2 = splice(wave2, x2, 0);
- wave3 = splice(wave3, x3, 0);
- wave4 = splice(wave4, lerp(x3+100, x4+width/2, 0.5), 0);
- wave5 = splice(wave5, lerp(y3+width/2, y4+100, 0.5), 0);
- xlerp = lerp(x3+100, x4+width/2, 0.5);
- ylerp = lerp(y3+width/2, y4+100, 0.5);
- xlerpnew = lerp(xlerp, x3+width-100, 0.5);
- ylerpnew = lerp(ylerp, y3+width/2, 0.5);
- wave6 = splice(wave6, lerp(xlerp, x3+width-100, 0.5), 0);
- wave7 = splice(wave7, lerp(ylerp, y3+width/2, 0.5), 0);
- //ellipse(xlerpnew, ylerpnew, 8, 8);
- pushMatrix();
- translate(0-100,0+100);
- beginShape();
- for (int i = 0; i < wave.length; i++) {
- //vertex(wave2[i]+gridx, wave[i]+gridy);
- //vertex(wave4[i], wave5[i]);
- vertex(wave6[i], wave7[i]);
- }
- endShape();
- popMatrix();
- //THese are the little circles on the circles
- // ellipse(x+100, y+width/2, 8, 8);
- //ellipse(x2+width/2, y2+100, 8, 8);
- // ellipse(x3+width-100, y3+width/2, 8, 8);
- // line(x+100,y+width/2, x2+width/2, y2+100);
- lerp(x+100, x2+width/2, 0.5);
- lerp(y+width/2, y2+100, 0.5);
- time += timeup;
- time2 -= time2up;
- time3 += time3up;
- time4 -= time4up;
- }
- void mouseClicked() {
- save("patterns"+frameCount+".png");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement