X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=AlexGreen.pde;h=aadf75fa3dcefe0238627ea055bb9d32c77f71ea;hb=5bc92bc2ee6237b6bcb0ac6dc24208d97d0dbfc7;hp=74033956cfc4ea3151e51dcca36935f853a8a833;hpb=7f782b991846bac5c4be6f4a8db012d4dd271e86;p=SugarCubes.git diff --git a/AlexGreen.pde b/AlexGreen.pde index 7403395..aadf75f 100755 --- a/AlexGreen.pde +++ b/AlexGreen.pde @@ -171,6 +171,58 @@ final Sphery[] spherys; } +class CubeCurl extends SCPattern{ + +private SinLFO curl = new SinLFO(0, Cube.EDGE_HEIGHT, 5000 ); + +private SinLFO bg = new SinLFO(180, 220, 3000); + +CubeCurl(GLucose glucose){ +super(glucose); +addModulator(curl).trigger(); +addModulator(bg).trigger(); + +} + +void run(double deltaMs){ +for (int i =0; i < model.cubes.size(); i++) { +Cube c = model.cubes.get(i); +float cfloor = c.y; + +if (i%3 == 0){ + +for (Point p : c.points ){ + // colors[p.index]=color(0,0,0); + //float dif = (p.y - c.y); + //colors[p.index] = color( bg.getValuef() , 80 , dif < curl.getValuef() ? 80 : 0, ADD); + } + } + +else if (i%3 == 1) { + + for (Point p: c.points){ + colors[p.index]=color(0,0,0); + float dif = (p.y - c.y); + // colors[p.index] = + // color(bg.getValuef(), + // map(curl.getValuef(), 0, Cube.EDGE_HEIGHT, 20, 100), + // 100 - 10*abs(dif - curl.getValuef()), ADD ); + } + } +else if (i%3 == 2){ + for (Point p: c.points) { + + + + } + + +} + + } + } + } + class HueTestHSB extends SCPattern{ BasicParameter HueT = new BasicParameter("Hue", .5); BasicParameter SatT = new BasicParameter("Sat", .5);