diff --git a/cosfunc1/gif_maker b/cosfunc1/gif_maker new file mode 100644 index 0000000..b86a859 --- /dev/null +++ b/cosfunc1/gif_maker @@ -0,0 +1 @@ +convert -loop 0 *.png out.gif diff --git a/cosfunc1/sketch_1/fr001.png b/cosfunc1/sketch_1/fr001.png new file mode 100644 index 0000000..45ace9d Binary files /dev/null and b/cosfunc1/sketch_1/fr001.png differ diff --git a/cosfunc1/sketch_1/fr002.png b/cosfunc1/sketch_1/fr002.png new file mode 100644 index 0000000..5e471b9 Binary files /dev/null and b/cosfunc1/sketch_1/fr002.png differ diff --git a/cosfunc1/sketch_1/fr003.png b/cosfunc1/sketch_1/fr003.png new file mode 100644 index 0000000..221e80a Binary files /dev/null and b/cosfunc1/sketch_1/fr003.png differ diff --git a/cosfunc1/sketch_1/fr004.png b/cosfunc1/sketch_1/fr004.png new file mode 100644 index 0000000..e4eddd0 Binary files /dev/null and b/cosfunc1/sketch_1/fr004.png differ diff --git a/cosfunc1/sketch_1/fr005.png b/cosfunc1/sketch_1/fr005.png new file mode 100644 index 0000000..96cf24c Binary files /dev/null and b/cosfunc1/sketch_1/fr005.png differ diff --git a/cosfunc1/sketch_1/fr006.png b/cosfunc1/sketch_1/fr006.png new file mode 100644 index 0000000..f9ed681 Binary files /dev/null and b/cosfunc1/sketch_1/fr006.png differ diff --git a/cosfunc1/sketch_1/fr007.png b/cosfunc1/sketch_1/fr007.png new file mode 100644 index 0000000..20fa362 Binary files /dev/null and b/cosfunc1/sketch_1/fr007.png differ diff --git a/cosfunc1/sketch_1/fr008.png b/cosfunc1/sketch_1/fr008.png new file mode 100644 index 0000000..d9a0eda Binary files /dev/null and b/cosfunc1/sketch_1/fr008.png differ diff --git a/cosfunc1/sketch_1/fr009.png b/cosfunc1/sketch_1/fr009.png new file mode 100644 index 0000000..bdec4fc Binary files /dev/null and b/cosfunc1/sketch_1/fr009.png differ diff --git a/cosfunc1/sketch_1/fr010.png b/cosfunc1/sketch_1/fr010.png new file mode 100644 index 0000000..c7d9f8c Binary files /dev/null and b/cosfunc1/sketch_1/fr010.png differ diff --git a/cosfunc1/sketch_1/fr011.png b/cosfunc1/sketch_1/fr011.png new file mode 100644 index 0000000..c911397 Binary files /dev/null and b/cosfunc1/sketch_1/fr011.png differ diff --git a/cosfunc1/sketch_1/fr012.png b/cosfunc1/sketch_1/fr012.png new file mode 100644 index 0000000..5368e6d Binary files /dev/null and b/cosfunc1/sketch_1/fr012.png differ diff --git a/cosfunc1/sketch_1/fr013.png b/cosfunc1/sketch_1/fr013.png new file mode 100644 index 0000000..04cc414 Binary files /dev/null and b/cosfunc1/sketch_1/fr013.png differ diff --git a/cosfunc1/sketch_1/fr014.png b/cosfunc1/sketch_1/fr014.png new file mode 100644 index 0000000..3de21cb Binary files /dev/null and b/cosfunc1/sketch_1/fr014.png differ diff --git a/cosfunc1/sketch_1/fr015.png b/cosfunc1/sketch_1/fr015.png new file mode 100644 index 0000000..967ef16 Binary files /dev/null and b/cosfunc1/sketch_1/fr015.png differ diff --git a/cosfunc1/sketch_1/fr016.png b/cosfunc1/sketch_1/fr016.png new file mode 100644 index 0000000..13d68a1 Binary files /dev/null and b/cosfunc1/sketch_1/fr016.png differ diff --git a/cosfunc1/sketch_1/fr017.png b/cosfunc1/sketch_1/fr017.png new file mode 100644 index 0000000..927369d Binary files /dev/null and b/cosfunc1/sketch_1/fr017.png differ diff --git a/cosfunc1/sketch_1/fr018.png b/cosfunc1/sketch_1/fr018.png new file mode 100644 index 0000000..0f789f8 Binary files /dev/null and b/cosfunc1/sketch_1/fr018.png differ diff --git a/cosfunc1/sketch_1/fr019.png b/cosfunc1/sketch_1/fr019.png new file mode 100644 index 0000000..033d9c7 Binary files /dev/null and b/cosfunc1/sketch_1/fr019.png differ diff --git a/cosfunc1/sketch_1/fr020.png b/cosfunc1/sketch_1/fr020.png new file mode 100644 index 0000000..520823b Binary files /dev/null and b/cosfunc1/sketch_1/fr020.png differ diff --git a/cosfunc1/sketch_1/fr021.png b/cosfunc1/sketch_1/fr021.png new file mode 100644 index 0000000..8904751 Binary files /dev/null and b/cosfunc1/sketch_1/fr021.png differ diff --git a/cosfunc1/sketch_1/fr022.png b/cosfunc1/sketch_1/fr022.png new file mode 100644 index 0000000..ad8df4b Binary files /dev/null and b/cosfunc1/sketch_1/fr022.png differ diff --git a/cosfunc1/sketch_1/fr023.png b/cosfunc1/sketch_1/fr023.png new file mode 100644 index 0000000..5d3b536 Binary files /dev/null and b/cosfunc1/sketch_1/fr023.png differ diff --git a/cosfunc1/sketch_1/fr024.png b/cosfunc1/sketch_1/fr024.png new file mode 100644 index 0000000..2b1ed5e Binary files /dev/null and b/cosfunc1/sketch_1/fr024.png differ diff --git a/cosfunc1/sketch_1/fr025.png b/cosfunc1/sketch_1/fr025.png new file mode 100644 index 0000000..d7a81f4 Binary files /dev/null and b/cosfunc1/sketch_1/fr025.png differ diff --git a/cosfunc1/sketch_1/fr026.png b/cosfunc1/sketch_1/fr026.png new file mode 100644 index 0000000..3bba128 Binary files /dev/null and b/cosfunc1/sketch_1/fr026.png differ diff --git a/cosfunc1/sketch_1/fr027.png b/cosfunc1/sketch_1/fr027.png new file mode 100644 index 0000000..872c2e2 Binary files /dev/null and b/cosfunc1/sketch_1/fr027.png differ diff --git a/cosfunc1/sketch_1/fr028.png b/cosfunc1/sketch_1/fr028.png new file mode 100644 index 0000000..ac0f898 Binary files /dev/null and b/cosfunc1/sketch_1/fr028.png differ diff --git a/cosfunc1/sketch_1/fr029.png b/cosfunc1/sketch_1/fr029.png new file mode 100644 index 0000000..8a2a3cd Binary files /dev/null and b/cosfunc1/sketch_1/fr029.png differ diff --git a/cosfunc1/sketch_1/fr030.png b/cosfunc1/sketch_1/fr030.png new file mode 100644 index 0000000..b5a4a7e Binary files /dev/null and b/cosfunc1/sketch_1/fr030.png differ diff --git a/cosfunc1/sketch_1/fr031.png b/cosfunc1/sketch_1/fr031.png new file mode 100644 index 0000000..6b21b81 Binary files /dev/null and b/cosfunc1/sketch_1/fr031.png differ diff --git a/cosfunc1/sketch_1/fr032.png b/cosfunc1/sketch_1/fr032.png new file mode 100644 index 0000000..7149cc8 Binary files /dev/null and b/cosfunc1/sketch_1/fr032.png differ diff --git a/cosfunc1/sketch_1/fr033.png b/cosfunc1/sketch_1/fr033.png new file mode 100644 index 0000000..448f6a1 Binary files /dev/null and b/cosfunc1/sketch_1/fr033.png differ diff --git a/cosfunc1/sketch_1/fr034.png b/cosfunc1/sketch_1/fr034.png new file mode 100644 index 0000000..f714f8c Binary files /dev/null and b/cosfunc1/sketch_1/fr034.png differ diff --git a/cosfunc1/sketch_1/fr035.png b/cosfunc1/sketch_1/fr035.png new file mode 100644 index 0000000..eabd6f0 Binary files /dev/null and b/cosfunc1/sketch_1/fr035.png differ diff --git a/cosfunc1/sketch_1/fr036.png b/cosfunc1/sketch_1/fr036.png new file mode 100644 index 0000000..61c7487 Binary files /dev/null and b/cosfunc1/sketch_1/fr036.png differ diff --git a/cosfunc1/sketch_1/fr037.png b/cosfunc1/sketch_1/fr037.png new file mode 100644 index 0000000..83b1be9 Binary files /dev/null and b/cosfunc1/sketch_1/fr037.png differ diff --git a/cosfunc1/sketch_1/fr038.png b/cosfunc1/sketch_1/fr038.png new file mode 100644 index 0000000..de4776f Binary files /dev/null and b/cosfunc1/sketch_1/fr038.png differ diff --git a/cosfunc1/sketch_1/fr039.png b/cosfunc1/sketch_1/fr039.png new file mode 100644 index 0000000..1e3207f Binary files /dev/null and b/cosfunc1/sketch_1/fr039.png differ diff --git a/cosfunc1/sketch_1/fr040.png b/cosfunc1/sketch_1/fr040.png new file mode 100644 index 0000000..f50a683 Binary files /dev/null and b/cosfunc1/sketch_1/fr040.png differ diff --git a/cosfunc1/sketch_1/fr041.png b/cosfunc1/sketch_1/fr041.png new file mode 100644 index 0000000..43a9994 Binary files /dev/null and b/cosfunc1/sketch_1/fr041.png differ diff --git a/cosfunc1/sketch_1/fr042.png b/cosfunc1/sketch_1/fr042.png new file mode 100644 index 0000000..43f2b4f Binary files /dev/null and b/cosfunc1/sketch_1/fr042.png differ diff --git a/cosfunc1/sketch_1/fr043.png b/cosfunc1/sketch_1/fr043.png new file mode 100644 index 0000000..9370f37 Binary files /dev/null and b/cosfunc1/sketch_1/fr043.png differ diff --git a/cosfunc1/sketch_1/fr044.png b/cosfunc1/sketch_1/fr044.png new file mode 100644 index 0000000..3b6017e Binary files /dev/null and b/cosfunc1/sketch_1/fr044.png differ diff --git a/cosfunc1/sketch_1/fr045.png b/cosfunc1/sketch_1/fr045.png new file mode 100644 index 0000000..ee60b9a Binary files /dev/null and b/cosfunc1/sketch_1/fr045.png differ diff --git a/cosfunc1/sketch_1/fr046.png b/cosfunc1/sketch_1/fr046.png new file mode 100644 index 0000000..03e4f80 Binary files /dev/null and b/cosfunc1/sketch_1/fr046.png differ diff --git a/cosfunc1/sketch_1/fr047.png b/cosfunc1/sketch_1/fr047.png new file mode 100644 index 0000000..cf2142e Binary files /dev/null and b/cosfunc1/sketch_1/fr047.png differ diff --git a/cosfunc1/sketch_1/fr048.png b/cosfunc1/sketch_1/fr048.png new file mode 100644 index 0000000..ee0e5c6 Binary files /dev/null and b/cosfunc1/sketch_1/fr048.png differ diff --git a/cosfunc1/sketch_1/fr049.png b/cosfunc1/sketch_1/fr049.png new file mode 100644 index 0000000..a8bebbc Binary files /dev/null and b/cosfunc1/sketch_1/fr049.png differ diff --git a/cosfunc1/sketch_1/fr050.png b/cosfunc1/sketch_1/fr050.png new file mode 100644 index 0000000..575bda2 Binary files /dev/null and b/cosfunc1/sketch_1/fr050.png differ diff --git a/cosfunc1/sketch_1/fr051.png b/cosfunc1/sketch_1/fr051.png new file mode 100644 index 0000000..34e7c4f Binary files /dev/null and b/cosfunc1/sketch_1/fr051.png differ diff --git a/cosfunc1/sketch_1/fr052.png b/cosfunc1/sketch_1/fr052.png new file mode 100644 index 0000000..20bfecb Binary files /dev/null and b/cosfunc1/sketch_1/fr052.png differ diff --git a/cosfunc1/sketch_1/fr053.png b/cosfunc1/sketch_1/fr053.png new file mode 100644 index 0000000..1d3e61e Binary files /dev/null and b/cosfunc1/sketch_1/fr053.png differ diff --git a/cosfunc1/sketch_1/fr054.png b/cosfunc1/sketch_1/fr054.png new file mode 100644 index 0000000..cd3642a Binary files /dev/null and b/cosfunc1/sketch_1/fr054.png differ diff --git a/cosfunc1/sketch_1/fr055.png b/cosfunc1/sketch_1/fr055.png new file mode 100644 index 0000000..ae985b9 Binary files /dev/null and b/cosfunc1/sketch_1/fr055.png differ diff --git a/cosfunc1/sketch_1/fr056.png b/cosfunc1/sketch_1/fr056.png new file mode 100644 index 0000000..016f9a7 Binary files /dev/null and b/cosfunc1/sketch_1/fr056.png differ diff --git a/cosfunc1/sketch_1/fr057.png b/cosfunc1/sketch_1/fr057.png new file mode 100644 index 0000000..9be7168 Binary files /dev/null and b/cosfunc1/sketch_1/fr057.png differ diff --git a/cosfunc1/sketch_1/fr058.png b/cosfunc1/sketch_1/fr058.png new file mode 100644 index 0000000..8f42a56 Binary files /dev/null and b/cosfunc1/sketch_1/fr058.png differ diff --git a/cosfunc1/sketch_1/fr059.png b/cosfunc1/sketch_1/fr059.png new file mode 100644 index 0000000..08d2e4c Binary files /dev/null and b/cosfunc1/sketch_1/fr059.png differ diff --git a/cosfunc1/sketch_1/fr060.png b/cosfunc1/sketch_1/fr060.png new file mode 100644 index 0000000..e0357c3 Binary files /dev/null and b/cosfunc1/sketch_1/fr060.png differ diff --git a/cosfunc1/sketch_1/fr061.png b/cosfunc1/sketch_1/fr061.png new file mode 100644 index 0000000..35f77fc Binary files /dev/null and b/cosfunc1/sketch_1/fr061.png differ diff --git a/cosfunc1/sketch_1/fr062.png b/cosfunc1/sketch_1/fr062.png new file mode 100644 index 0000000..69376f5 Binary files /dev/null and b/cosfunc1/sketch_1/fr062.png differ diff --git a/cosfunc1/sketch_1/fr063.png b/cosfunc1/sketch_1/fr063.png new file mode 100644 index 0000000..85a8571 Binary files /dev/null and b/cosfunc1/sketch_1/fr063.png differ diff --git a/cosfunc1/sketch_1/fr064.png b/cosfunc1/sketch_1/fr064.png new file mode 100644 index 0000000..1ac8fe4 Binary files /dev/null and b/cosfunc1/sketch_1/fr064.png differ diff --git a/cosfunc1/sketch_1/fr065.png b/cosfunc1/sketch_1/fr065.png new file mode 100644 index 0000000..047d459 Binary files /dev/null and b/cosfunc1/sketch_1/fr065.png differ diff --git a/cosfunc1/sketch_1/fr066.png b/cosfunc1/sketch_1/fr066.png new file mode 100644 index 0000000..599e0b0 Binary files /dev/null and b/cosfunc1/sketch_1/fr066.png differ diff --git a/cosfunc1/sketch_1/fr067.png b/cosfunc1/sketch_1/fr067.png new file mode 100644 index 0000000..00fe562 Binary files /dev/null and b/cosfunc1/sketch_1/fr067.png differ diff --git a/cosfunc1/sketch_1/fr068.png b/cosfunc1/sketch_1/fr068.png new file mode 100644 index 0000000..4c952e4 Binary files /dev/null and b/cosfunc1/sketch_1/fr068.png differ diff --git a/cosfunc1/sketch_1/fr069.png b/cosfunc1/sketch_1/fr069.png new file mode 100644 index 0000000..c371544 Binary files /dev/null and b/cosfunc1/sketch_1/fr069.png differ diff --git a/cosfunc1/sketch_1/fr070.png b/cosfunc1/sketch_1/fr070.png new file mode 100644 index 0000000..8d649e2 Binary files /dev/null and b/cosfunc1/sketch_1/fr070.png differ diff --git a/cosfunc1/sketch_1/fr071.png b/cosfunc1/sketch_1/fr071.png new file mode 100644 index 0000000..854f4ad Binary files /dev/null and b/cosfunc1/sketch_1/fr071.png differ diff --git a/cosfunc1/sketch_1/fr072.png b/cosfunc1/sketch_1/fr072.png new file mode 100644 index 0000000..40cf0d3 Binary files /dev/null and b/cosfunc1/sketch_1/fr072.png differ diff --git a/cosfunc1/sketch_1/fr073.png b/cosfunc1/sketch_1/fr073.png new file mode 100644 index 0000000..ed173b1 Binary files /dev/null and b/cosfunc1/sketch_1/fr073.png differ diff --git a/cosfunc1/sketch_1/fr074.png b/cosfunc1/sketch_1/fr074.png new file mode 100644 index 0000000..b17ddef Binary files /dev/null and b/cosfunc1/sketch_1/fr074.png differ diff --git a/cosfunc1/sketch_1/fr075.png b/cosfunc1/sketch_1/fr075.png new file mode 100644 index 0000000..257e5b5 Binary files /dev/null and b/cosfunc1/sketch_1/fr075.png differ diff --git a/cosfunc1/sketch_1/ps1.gif b/cosfunc1/sketch_1/ps1.gif new file mode 100644 index 0000000..378cdae Binary files /dev/null and b/cosfunc1/sketch_1/ps1.gif differ diff --git a/cosfunc1/sketch_1/sketch_1.pde b/cosfunc1/sketch_1/sketch_1.pde new file mode 100644 index 0000000..6695722 --- /dev/null +++ b/cosfunc1/sketch_1/sketch_1.pde @@ -0,0 +1,51 @@ +int numFrames = 75; +int m = 8000; +float delay = 10; + +void setup(){ + size(500,500,P3D); + + stroke(255); + fill(255); +} + +float x1(float t, int offset){ + return offset + 0.5*width + 500*cos(TWO_PI*t); +} +float y1(float t, int offset){ + return offset + 0.5*width + -500*cos(2*TWO_PI*t); +} + +float x2(float t, int offset){ + return offset + 0.5*width + -500*cos(TWO_PI*t); +} +float y2(float t, int offset){ + return offset + 0.5*height + 500*cos(2*TWO_PI*t); +} + +void draw(){ + float t = 1.0*(frameCount - 1)/numFrames; + + background(0); + //int[] Xoffset = {-25, 0, 25}; + //int[] Yoffset = {0, 5, 10}; + //for (int i = 0; i < 3; i++) { + ellipse(x1(t,0 ),y1(t,0 ),6 , 6); + ellipse(x2(t,0 ),y2(t,0 ),6 , 6); + pushStyle(); + strokeWeight(2); + stroke(255,100); + for(int i=0;i<=m;i++){ + float tt = 1.0*i/m; + float x = lerp(x1(t - delay*tt,0),x2(t - delay*(1-tt),0),tt); + float y = lerp(y1(t - delay*tt, 0),y2(t - delay*(1-tt),0),tt); + point(x,y); + } + popStyle(); + //} + //ellipse(x2(t),y2(t),6,6); + + println("saving frame " + frameCount + "/" + numFrames); + if(frameCount<=numFrames) saveFrame("fr###.png"); + if(frameCount == numFrames) stop(); +}