- case 0: V.set(Pn.x, yt , Pn.z); break; // bouncing line\r
- case 1: V.set(Pn.x, map(cos(PI*t * Pn.x),-1,1,0,1) , Pn.z); break; // top tap\r
- case 2: V.set(Pn.x, amp*map(Pn.x<.5?Pn.x:1-Pn.x,0,.5 ,0,t-.5)+.5, Pn.z); break; // V shape\r
- case 3: V.set(Pn.x, Pn.x < cMidNorm.x ? map(Pn.x,0,cMidNorm.x, .5,yt) :\r
- map(Pn.x,cMidNorm.x,1, yt,.5), Pn.z); break; // Random V shape\r
-\r
- case 4: V.set(Pn.x, .5*(Pn.x < cMidNorm.x ? map(Pn.x,0,cMidNorm.x, .5,yt) :\r
- map(Pn.x,cMidNorm.x,1, yt,.5)) +\r
- .5*(Pn.z < cMidNorm.z ? map(Pn.z,0,cMidNorm.z, .5,yt) :\r
- map(Pn.z,cMidNorm.z,1, yt,.5)), Pn.z); break; // Random Pyramid shape\r
- \r
- case 5: V.set(Pn.x, amp*map((Pn.x-.5)*(Pn.x-.5),0,.25,0,t-.5)+.5, Pn.z); break; // wings\r
- case 6: V.set(Pn.x, amp*map((mp -.5)*(mp -.5),0,.25,0,t-.5)+.5, Pn.z); break; // wings\r
-\r
- case 7: V.set(cMid); return color(0,0,c1c(1 - (V.distance(Px) > (pRad.getValuef()+.1)*150?1:0)) ); // sphere\r
- case 8: V.set(cMid); return color(0,0,c1c(1 - CalcCone(Px,V,xyzMid) * 0.02 > .5?1:0)); // cone\r
- case 9: \r
- \r
- \r
- case 10: return color(100 + noise(Pn.x,Pn.y,Pn.z + (NoiseMove+50000)/1000.)*200,\r
- 85,c1c(Pn.y < noise(Pn.x + NoiseMove/2000.,Pn.z)*(1+amp)-amp/2.-.1 ? 1 : 0)); // noise\r
- default: return color(0,0,0);\r
- }\r
+ case 0: V.set(Pn.x, yt , Pn.z); break; // bouncing line\r
+ case 1: V.set(Pn.x, map(cos(PI*t * Pn.x),-1,1,0,1) , Pn.z); break; // top tap\r
+ case 2: V.set(Pn.x, amp*map(Pn.x<.5?Pn.x:1-Pn.x,0,.5 ,0,t-.5)+.5, Pn.z); break; // V shape\r
+ case 3: V.set(Pn.x, Pn.x < cMidNorm.x ? map(Pn.x,0,cMidNorm.x, .5,yt) :\r
+ map(Pn.x,cMidNorm.x,1, yt,.5), Pn.z); break; // Random V shape\r
+\r
+ case 4: V.set(Pn.x, .5*(Pn.x < cMidNorm.x ? map(Pn.x,0,cMidNorm.x, .5,yt) :\r
+ map(Pn.x,cMidNorm.x,1, yt,.5)) +\r
+ .5*(Pn.z < cMidNorm.z ? map(Pn.z,0,cMidNorm.z, .5,yt) :\r
+ map(Pn.z,cMidNorm.z,1, yt,.5)), Pn.z); break; // Random Pyramid shape\r
+ \r
+ case 5: V.set(Pn.x, amp*map((Pn.x-.5)*(Pn.x-.5),0,.25,0,t-.5)+.5, Pn.z); break; // wings\r
+ case 6: V.set(Pn.x, amp*map((mp -.5)*(mp -.5),0,.25,0,t-.5)+.5, Pn.z); break; // wings\r
+\r
+ case 7: return color(0,0, min(\r
+ distToSeg(Px.x, Px.y, a1.getX(70),a1.getY(70), mCtr.x, mCtr.y),\r
+ distToSeg(Px.x, Px.y, a2.getX(40),a2.getY(40), mCtr.x, mCtr.y)) <rad*40?100:0); // clock\r
+\r
+// case 8: return color(0,0,c1c(.9+2*pRad.getValuef() - Px.distance(a1.x,a1.y)*.03) ); // sphere - radial\r