+ case 3: t = 2*t; bpm = 2*bpm; break;
+
+ default: t= t; bpm = bpm;
+ }
+
+ for ( Sphery s: spherys){
+
+ s.setVibrationPeriod(480000/bpm);
+ s.vibration.setBasis(t);
+
+ }
+ 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, .75*model.xMax, model.yMax/2, model.zMax/2), ADD);
+ c = blendIfColor(c, spherys[0].spheryvalue(P, model.xMax/4, model.yMax/4, model.zMax/2), ADD);
+ c = blendIfColor(c, spherys[2].spheryvalue(P, model.xMax/2, model.yMax/2, model.zMax/2),ADD);
+
+
+ colors[p.index] = c;
+
+
+ }
+ sinespin2.reset()
+ .center()
+ .rotate(yrot.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, .3*model.xMax, .7*model.yMax, .6*model.zMax),ADD);
+
+ colors[p.index] = blendIfColor(colors[p.index], c , ADD);
+
+ }