Last active
March 16, 2019 21:35
-
-
Save wonderburg7/e039af2ede8a2d8621c898fee2d8c305 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment