+
+
+
+ // switch (cur) {
+
+ // case 1: t = map(.5*t ,0,.5, 0,1); bpm = .5*bpm; break;
+
+ // case 2: t = t; bpm = bpm; break;
+
+ // case 3: t = map(2*t,0,2,0,1); bpm = 2*bpm; break;
+
+ // default: t= t; bpm = bpm;
+ // }
+
+ //switch(sphery.colorscheme)
+
+ for ( Sphery s: spherys){
+
+ //s.vibration.setBasis(t);
+ s.setVibrationPeriod(vibrationrate.getValuef());
+
+
+ }
+
+
+ sinespin.reset()
+ // Translate so the center of the car is the origin, offset
+ .center()
+ // .scale(1.3,1.3,1.3)
+ // Rotate around the origin (now the center of the car) about an y-vector
+ .rotate(yrot.getValuef(), rotationx.getValuef(), rotationy.getValuef() , rotationz.getValuef())
+ .translate(model.cx, model.cy, model.cz);
+
+
+
+
+
+ for (LXVector p: sinespin)
+ // for (Point p: model.points)
+ {
+ P.set(p.x, p.y, p.z);
+ // PVector P = new PVector(p.x, p.y, p.z);
+ color c = #000000;
+ c = blendIfColor(c, spherys[1].spheryvalue(P), ADD);
+ c = blendIfColor(c, spherys[0].spheryvalue(P), ADD);
+ c = blendIfColor(c, spherys[2].spheryvalue(P),ADD);
+
+
+ colors[p.index] = c;
+
+
+ }
+ sinespin2.reset()
+ .center()
+ .rotate(yrot2.getValuef(), rotationx.getValuef(), rotationy.getValuef() , rotationz.getValuef())
+ .translate(model.cx,model.cy,model.cz);
+
+ for (LXVector p: sinespin2)
+ { color c = 0;
+ // PVector P = new PVector(p.x, p.y, p.z);
+ P.set(p.x, p.y, p.z);
+ c = blendIfColor(c, spherys[3].spheryvalue(P),ADD);
+
+ colors[p.index] = blendIfColor(colors[p.index], c , ADD);
+
+ }
+ sinespin3.reset()
+ .center()
+ .rotate(yrot3.getValuef(), -1 + rotationx.getValuef(), rotationy.getValuef(), rotationz.getValuef())
+ .translate(model.cx, model.cy, model.cz);
+ for (LXVector p: sinespin3)
+ { color c = 0;
+ // PVector P = new PVector(p.x, p.y, p.z);
+ P.set(p.x, p.y, p.z);
+ c = blendIfColor(c, spherys[4].spheryvalue(P),ADD);
+
+ colors[p.index] = blendIfColor(colors[p.index], c , ADD);
+
+ }
+