}
class CubeCurl extends SCPattern{
-
+float CH, CW;
private SinLFO curl = new SinLFO(0, Cube.EDGE_HEIGHT, 5000 );
private SinLFO bg = new SinLFO(180, 220, 3000);
super(glucose);
addModulator(curl).trigger();
addModulator(bg).trigger();
+ this.CH = Cube.EDGE_HEIGHT;
+ this.CW = Cube.EDGE_WIDTH;
+final float diag = sqrt(CH*CH + CW*CW + CW*CW);
+ArrayList<PVector> centerlist = new ArrayList<PVector>();
+
+for (int i = 0; i < model.cubes.size(); i++){
+ centerlist.add(centerofcube(i));
+ }
}
+//there is definitely a better way of doing this!
+PVector centerofcube(int i) {
+Cube c = model.cubes.get(i);
+PVector cubeorigin = new PVector(c.x, c.y, c.z);
+PVector cubecenter = new PVector(c.x+ CW/2, c.y + CH/2, c.z + CW/2);
+PVector cubeangle = new PVector(c.rx, c.ry, c.rz);
+cubeangle.normalize();
+println( cubeangle.x + cubeangle.y + cubeangle.z);
+PVector cubecenterf = new PVector(cubecenter.x + tan(c.rx)*CW/2, cubecenter.y + tan(c.ry)*CH/2, cubecenter.z + tan(c.rz)*CW/2);
+
+return cubecenterf;
+}
+
void run(double deltaMs){
for (int i =0; i < model.cubes.size(); i++) {
}
else if (i%3 == 2){
for (Point p: c.points) {
-
+
}
// Utility value if you need the height of a cube shorthand
final float CH = Cube.EDGE_HEIGHT;
final float CW = Cube.EDGE_WIDTH ;
+
+
// Positions for the bass box
final float BBY = BassBox.EDGE_HEIGHT + BoothFloor.PLEXI_WIDTH;
// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), // 30 J15 (unplugged)
// new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 53, 54, 55, 72 }), // 30 J16
// }),
- // new PandaMapping(
- // "10.200.1.29", new ChannelMapping[] {
- // new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), // 29 J3 (not connected)
- // new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), // 29 J4 (not connected)
- // new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 28, 29, 30, 2}), // 29 J7
- // new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 33, 34, 32, 31}), // 29 J8 //XXX
- // new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), // 29 J13 //XX //bassbox (not working)
- // new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { }), // 29 J14 (not working)
- // new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 12, 13, 14, 15 }), // 29 J15
- // new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 8, 9, 10, 11 }), // 29 J16
- // }),
+ new PandaMapping(
+ "10.200.1.29", new ChannelMapping[] {
+ new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,2,3,4}), // 29 J3 (not connected)
+ new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,2,3,4 }), // 29 J4 (not connected)
+ new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,2,3,4}), // 29 J7
+ new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 1,2,3,4}), // 29 J8 //XXX
+ new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 8,9,10}), // 29 J13 //XX //bassbox (not working)
+ new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 8,9,10 }), // 29 J14 (not working)
+ new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 14,15,16,17 }), // 29 J15
+ new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 14,15,16,17 }), // 29 J16
+ }),
new PandaMapping(
"10.200.1.28", new ChannelMapping[] {
/* new ChannelMapping(ChannelMapping.MODE_CUBES, new int[] { 60, 61, 62, 63 }), // 28 J3