From a41f334c045811daef7e319214da557b5e48143a Mon Sep 17 00:00:00 2001 From: Mark Slee Date: Sun, 13 Oct 2013 21:02:20 -0700 Subject: [PATCH] Change code to use new thread-safe lx color functions --- AlexGreen.pde | 12 +- ArjunBanker.pde | 10 +- BenMorrow.pde | 4 +- DanHorwitz.pde | 1142 ++++++++++++++++++++++----------------------- DanKaminsky.pde | 2 +- DanUtil.pde | 16 +- GranimPattern.pde | 8 +- JR.pde | 14 +- JackStahl.pde | 6 +- MarkSlee.pde | 52 ++- SamMorrow.pde | 2 +- ShaheenGandhi.pde | 14 +- TimBavaro.pde | 26 +- TobySegaran.pde | 14 +- _Internals.pde | 12 +- _UIFramework.pde | 2 +- code/HeronLX.jar | Bin 67510 -> 67726 bytes 17 files changed, 668 insertions(+), 668 deletions(-) mode change 100755 => 100644 AlexGreen.pde mode change 100755 => 100644 DanHorwitz.pde diff --git a/AlexGreen.pde b/AlexGreen.pde old mode 100755 new mode 100644 index 7403395..6ee9a39 --- a/AlexGreen.pde +++ b/AlexGreen.pde @@ -72,14 +72,14 @@ float distfromcirclecenter(float px, float py, float pz, float f1x, float f1y, f color spheryvalue (float px, float py, float pz , float f1xc, float f1yc, float f1zc) { //switch(sShpape.cur() ) {} - return color(constrain(huespread.getValuef()*5*px, 0, 360) , dist(px, py, pz, f1xc, f1yc, f1zc) , + return lx.hsb(constrain(huespread.getValuef()*5*px, 0, 360) , dist(px, py, pz, f1xc, f1yc, f1zc) , max(0, 100 - 100*widthparameter.getValuef()*abs(dist(px, py, pz, f1xcenter, ybounce.getValuef(), f1zcenter) - vibration.getValuef() ) ) ); } color ellipsevalue(float px, float py, float pz , float f1xc, float f1yc, float f1zc, float f2xc, float f2yc, float f2zc) { //switch(sShpape.cur() ) {} - return color(huespread.getValuef()*5*px, dist(model.xMax-px, model.yMax-py, model.zMax-pz, f1xc, f1yc, f1zc) , + return lx.hsb(huespread.getValuef()*5*px, dist(model.xMax-px, model.yMax-py, model.zMax-pz, f1xc, f1yc, f1zc) , max(0, 100 - 100*widthparameter.getValuef() * abs( (dist(px, py, pz, f1xc, ybounce.getValuef(), f1zc) + (dist(px, py , pz, f2xc, ybounce.getValuef(), f2zc) ) )/2 @@ -159,10 +159,10 @@ final Sphery[] spherys; // c = blendColor(c, spherys[3].ellipsevalue(Px.x, Px.y, Px.z, model.xMax/4, model.yMax/4, model.zMax/4, 3*model.xMax/4, 3*model.yMax/4, 3*model.zMax/4),ADD); // return c; // } - // return color(0,0,0); + // return lx.hsb(0,0,0); // // else if(spheremode ==2) // { color c = 0; - // return color(CalcCone( (xyz by = new xyz(0,spherys[2].ybounce.getValuef(),0) ), Px, mid) ); + // return lx.hsb(CalcCone( (xyz by = new xyz(0,spherys[2].ybounce.getValuef(),0) ), Px, mid) ); // } @@ -186,7 +186,7 @@ HueTestHSB(GLucose glucose) { for (Point p : model.points) { color c = 0; - c = blendColor(c, color(360*HueT.getValuef(), 100*SatT.getValuef(), 100*BriT.getValuef()), ADD); + c = blendColor(c, lx.hsb(360*HueT.getValuef(), 100*SatT.getValuef(), 100*BriT.getValuef()), ADD); colors[p.index]= c; } int now= millis(); @@ -196,4 +196,4 @@ HueTestHSB(GLucose glucose) { } } - } \ No newline at end of file + } diff --git a/ArjunBanker.pde b/ArjunBanker.pde index 12ce5b6..c8fe1a6 100644 --- a/ArjunBanker.pde +++ b/ArjunBanker.pde @@ -16,7 +16,7 @@ class TelevisionStatic extends SCPattern { void run(double deltaMs) { boolean d = direction.getValuef() > 5.0; for (Point p : model.points) { - colors[p.index] = color((lx.getBaseHuef() + random(hueParameter.getValuef() * 360))%360, random(saturationParameter.getValuef() * 100), random(brightParameter.getValuef() * 100)); + colors[p.index] = lx.hsb((lx.getBaseHuef() + random(hueParameter.getValuef() * 360))%360, random(saturationParameter.getValuef() * 100), random(brightParameter.getValuef() * 100)); } } } @@ -40,7 +40,7 @@ class AbstractPainting extends SCPattern { void run(double deltaMs) { for (Point p : model.points) { color c = img.get((int)((p.x / model.xMax) * img.width), img.height - (int)((p.y / model.yMax) * img.height)); - colors[p.index] = color(hue(c) + colorMod.getValuef()%360, saturation(c), brightness(c) - ((p.z - brightMod.getValuef())/p.z)); + colors[p.index] = lx.hsb(hue(c) + colorMod.getValuef()%360, saturation(c), brightness(c) - ((p.z - brightMod.getValuef())/p.z)); } } } @@ -56,7 +56,7 @@ class Spirality extends SCPattern { super(glucose); addParameter(r); for (Point p : model.points) { - colors[p.index] = color(0, 0, 0); + colors[p.index] = lx.hsb(0, 0, 0); } } @@ -70,12 +70,12 @@ class Spirality extends SCPattern { if (b < 90) { colors[p.index] = blendColor( colors[p.index], - color(lx.getBaseHuef() + 25, 10, map(b, 0, 10, 100, 0)), + lx.hsb(lx.getBaseHuef() + 25, 10, map(b, 0, 10, 100, 0)), ADD); } else { colors[p.index] = blendColor( colors[p.index], - color(25, 10, map(b, 0, 10, 0, 15)), + lx.hsb(25, 10, map(b, 0, 10, 0, 15)), SUBTRACT); } } diff --git a/BenMorrow.pde b/BenMorrow.pde index 1eb8ae1..afd6807 100644 --- a/BenMorrow.pde +++ b/BenMorrow.pde @@ -64,7 +64,7 @@ class TowerParams extends SCPattern { if(p.y mMax.x/2) P.x = mMax.x-P.x; - if (iSymm == YSym && P.y > mMax.y/2) P.y = mMax.y-P.y; - - for (int i=0;i<_ND; i++) if (N[i].Active()) { - NDat n = N[i]; - float zx = zTime * n.speed * n.sinAngle, - zy = zTime * n.speed * n.cosAngle; - - float b = (iSymm==RadSym ? noise(zTime*n.speed+n.xoff-Dist(P,mCtr)/n.xz) - : noise(P.x/n.xz+zx+n.xoff,P.y/n.yz+zy+n.yoff,P.z/n.zz+n.zoff)) - *1.8; - - b += n.den/100 -.4 + pDensity.Val() -1; - b += transAdd; - c = blendColor(c,color(n.hue,100*n.sat,c1c(b)),ADD); - } - return c; - } -} -//---------------------------------------------------------------------------------------------------------------------------------- -public class Play extends DPat -{ - public class rAngle { - float prvA, dstA, c; - float prvR, dstR, r; - float _cos, _sin, x, y; - float fixAngle (float a, float b) { return a abs(a+2*PI-b) ? a : a+2*PI) : - (abs(a-b) > abs(a-2*PI-b) ? a : a-2*PI) ; } - float getX(float r) { return mCtr.x + _cos*r; } - float getY(float r) { return mCtr.y + _sin*r; } - void move() { c = interp(t,prvA,dstA); - r = interp(t,prvR,dstR); - _cos = cos(c); _sin = sin(c); - x = getX(r); y = getY(r); } - void set() { prvA = dstA; dstA = random(2*PI); prvA = fixAngle(prvA, dstA); - prvR = dstR; dstR = random(mCtr.y); } - } - - int nBeats = 0; - DParam pAmp, pRadius, pBounce; - - float t,amp,rad,bnc; - float zTheta=0; - ArrayList waves = new ArrayList(10); - - rAngle a1 = new rAngle(), a2 = new rAngle(), - a3 = new rAngle(), a4 = new rAngle(); - xyz cPrev = new xyz(), cRand = new xyz(), - cMid = new xyz(), V = new xyz(), - Theta = new xyz(), TSin = new xyz(), - TCos = new xyz(), cMidNorm = new xyz(), - Pn = new xyz(); - float LastBeat=3, LastMeasure=3; - int CurRandTempo = 1, CurRandTPat = 1; - - Pick pTimePattern, pTempoMult, pShape; - int RandCube; - - Play(GLucose glucose) { - super(glucose); - pRadius = addParam("Rad" , .1 ); - pBounce = addParam("Bnc" , .2 ); - pAmp = addParam("Amp" , .2 ); - pTempoMult = addPick ("TMult" , 0 , 5 , new String[] {"1x", "2x", "4x", "8x", "16x", "Rand" } ); - pTimePattern= addPick ("TPat" , 6 , 7 , new String[] {"Bounce", "Sin", "Roll", "Quant", "Accel", "Deccel", "Slide", "Rand"} ); - pShape = addPick ("Shape" , 3 , 15 , new String[] {"Line", "Tap", "V", "RandV", - "Pyramid", "Wings", "W2", "Clock", - "Triangle", "Quad", "Sphere", "Cone", - "Noise", "Wave", "?", "?"} ); - } - - public class rWave { - float v0, a0, x0, t,damp,a; - boolean bDone=false; - final float len=8; - rWave(float _x0, float _a0, float _v0, float _damp) { x0=_x0*len; a0=_a0; v0=_v0; t=0; damp = _damp; } - void move(double deltaMs) { - t += deltaMs*.001; - if (t>4) bDone=true; - } - float val(float _x) { - _x*=len; - float dist = t*v0 - abs(_x-x0); - if (dist<0) { a=1; return 0; } - a = a0*exp(-dist*damp) * exp(-abs(_x-x0)/(.2*len)); // * max(0,1-t/dur) - return -a*sin(dist); - } - } - - void StartPattern() { zTheta=0; } - void StartRun(double deltaMs) { - t = lx.tempo.rampf(); - amp = pAmp.Val(); - rad = pRadius.getValuef(); - bnc = pBounce.getValuef(); - zTheta += deltaMs*(pSpin .Val()-.5)*.01; - - Theta .set(pRotX.Val()*PI*2, pRotY.Val()*PI*2, pRotZ.Val()*PI*2 + zTheta); - TSin .set(sin(Theta.x), sin(Theta.y), sin(Theta.z)); - TCos .set(cos(Theta.x), cos(Theta.y), cos(Theta.z)); - - if (t 6 ? 2+int(random(5)) : int(random(7)); } - } LastMeasure = t; - - int nTempo = pTempoMult .Cur(); if (nTempo == 5) nTempo = CurRandTempo; - int nTPat = pTimePattern.Cur(); if (nTPat == 7) nTPat = CurRandTPat ; - - switch (nTempo) { - case 0: t = t; break; - case 1: t = (t*2. )%1.; break; - case 2: t = (t*4. )%1.; break; - case 3: t = (t*8. )%1.; break; - case 4: t = (t*16.)%1.; break; - } - - int i=0; while (i< waves.size()) { - rWave w = waves.get(i); - w.move(deltaMs); if (w.bDone) waves.remove(i); else i++; - } - - if ((t-1) { - waves.add(new rWave( - pKey.b ? map(DG.KeyPressed,0,7,0,1) : random(1), // location - bnc*10, // bounciness - 7, // velocity - 2*(1-amp))); // dampiness - DG.KeyPressed=-1; - if (waves.size() > 5) waves.remove(0); - } - - if (t .5?1:0)); // cone - - case 12: return color(100 + noise(Pn.x,Pn.y,Pn.z + (NoiseMove+50000)/1000.)*200, - 85,c1c(Pn.y < noise(Pn.x + NoiseMove/2000.,Pn.z)*(1+amp)-amp/2.-.1 ? 1 : 0)); // noise - - case 13: float y=0; for (rWave w : waves) y += .5*w.val(Pn.x); - V.set(Pn.x, .7+y, Pn.z); - break; - - default: return color(0,0,0); - } - - return color(0, - 150-c1c(1 - V.distance(Pn)/rad), - c1c(1 - V.distance(Pn)/rad)); - } -} -//---------------------------------------------------------------------------------------------------------------------------------- -// 0 - TLB, L (b), BLB, B (l) // Fwd , Down, Back, Up -// 4 - TLF, F (l), BLF, L (f) // Fwd , Down, Back, Up -// 8 - TRF, R (f), BRF, F (r) // Back, Down, Fwd , Up -// 12- TRB, B (r), BRB, R (b) // Back, Down, Fwd , Up -// 1->7, 15->9 - -class dBolt { - dStrip v, h; - int vpos, hpos; - dBolt(dStrip _v, dStrip _h, int _vpos, int _hpos) { - v=_v; h=_h; vpos=_vpos; hpos=_hpos; - if (v.b0 == null) { v.b0=this; h.b0=this; } - else { v.b1=this; h.b1=this; } - } -} - -class dVertex { - dStrip s1 , s2 ; - int dir1, dir2 ; - dVertex(dStrip s, int d) { - int _a = (s.iS%4==1)? (d==1? 5: 3) : - (s.iS%4==3)? (d==1? 9:11) : - (d==1) ? (s.Top()?4:12) : (s.Top()?12:4); - dir1 = d * (s.isVert() ? -1 : 1); - dir2 = d; - s1 = DL_.DS[s.iCube() + ((s.iS+_a) % 16)]; - s2 = DL_.DS[d == 1 ? (s.idx == s.iFace()+3 ? s.idx-3 : s.idx+1): - (s.idx == s.iFace() ? s.idx+3 : s.idx-1)]; - swapout(1 , 6); - swapout(15,-6); - } - void swapout(int a, int b) { - if (s1.iS == a) { s1 = DL_.DS[s1.idx + b]; dir1 = -dir1; } - if (s2.iS == a) { s2 = DL_.DS[s2.idx + b]; dir2 = -dir2; } - } - -} - -class dStrip { // THIS WAS SUCH A PAIN! - int row, col, ci, idx, iS, axis; // 1-y, 2-left, 3-right - Strip s; - boolean bTop; // direction: top ccw, bottom cw. - - boolean Top (){ return axis!=1 && bTop ; } - boolean Bottom(){ return axis!=1 && !bTop; } - boolean isVert(){ return axis==1; } - boolean isHorz(){ return axis!=1; } - int iCube (){ return 16*floor(idx/16); } - int iFace (){ return iCube() + 4*floor(iS/4); } - - void init(Strip _s, int _i, int _row, int _col) { - idx = _i; row = _row; col = _col; s = _s; - iS = idx%16; bTop = (iS%4==0); - ci = s.points.get(0).index; - DL_.DQ[col][row] = iCube(); - switch (iS) { - case 4: case 6 : case 12: case 14: axis=2; break; - case 0: case 2 : case 8 : case 10: axis=3; break; - default: axis=1; break; - } - } - - void addBolts() { - v0 = new dVertex(this, 1); - v1 = new dVertex(this,-1); - - - if (iS == 7 && col != 0 && row != 0) // left bottom - new dBolt(this, DL_.GetStrip(row-1,col-1,(col % 2 == 1) ? 8 : 12), - 4, (col % 2 == 1) ? 6 : 9); - - if (iS == 7 && col != 0 && row < MaxCubeHeight*2-2) // left top - new dBolt(this, DL_.GetStrip(row+1,col-1,(col % 2 == 1) ? 10 : 14), - 11, (col % 2 == 1) ? 9 : 6); - - if (iS == 9 && col < NumBackTowers-1 && row < MaxCubeHeight*2-2) // right top - new dBolt(this, DL_.GetStrip(row+1,col+1,(col % 2 == 1) ? 6 : 2), - 4, (col % 2 == 1) ? 6 : 9); - - if (iS == 9 && col < NumBackTowers-1 && row != 0) // right bottom - new dBolt(this, DL_.GetStrip(row-1,col+1,(col % 2 == 1) ? 4 : 0), - 11, (col % 2 == 1) ? 9 : 6); - } - - dBolt b0, b1; - dVertex v0, v1; -} - -class dCursor { - dStrip s, sNext; - int nLast,pos,posNext,end; // 0 - 65535 - int dir; // 1 or -1 - color clr; - - dCursor(color _c) { clr=_c;} - - boolean isDone() { return pos==end; } - void set(dStrip _s, int _dir) { - s=_s; dir=_dir; pos = 0; end=65536; nLast=-1; sNext=null; - } - - boolean MakeTurn(dBolt b) { - int nEnd= (s.isVert() ? b.vpos : b.hpos) <<12; - nEnd= (dir==1 ? nEnd : 65536-nEnd); - if (nEnd < pos) return false; - if (s.isVert()) { sNext = b.h; posNext = b.hpos<<12; end = nEnd; } - else { sNext = b.v; posNext = b.vpos<<12; end = nEnd; } - return true; - } - - void PickNext() { - if (sNext != null) { - if (end == 65536) exit(); - end = 65536; - pos = posNext; - dir = randDir(); - if (dir<0) pos = end-pos; - s = sNext; sNext = null; - nLast = -1; - return;// could switch again!! - } else { - dVertex v = (dir == 1 ? s.v0 : s.v1); - int r = floor(random(2)); - set(r==0 ? v.s1 : v.s2,r==0 ? v.dir1 : v.dir2); - } - - // plan to turn the corner - if (random(6)<1 && s.b0 != null && MakeTurn(s.b0)) return; - if (random(6)<1 && s.b1 != null && MakeTurn(s.b1)) return; - } -} - -int randDir() { return round(random(1))*2-1; } - -class dLattice { - int iTowerStrips=-1; - dStrip[] DS = new dStrip[glucose.model.strips.size()]; - int[][] DQ = new int[NumBackTowers][MaxCubeHeight*2]; - - int nStrips() { return iTowerStrips; } - dStrip GetStrip (int row, int col, int off) { return DS[DQ[col][row]+off]; } - dLattice() { - DL_=this; - int col = 0, row = -2, i=-1; - for (Strip strip : glucose.model.strips ) { i++; - if (i % 16 == 0) row+=2; - if (row >= MaxCubeHeight*2-1) { col++; row = (col%2==1)?1:0; } - if (col >= NumBackTowers) continue; - iTowerStrips++ ; - dStrip s = DS[iTowerStrips] = new dStrip(); - s.init(strip, iTowerStrips, row, col); - } - - for (int j=0; j> 12); - int nTo = min(15,(c.pos+nAmount) >> 12); c.nLast=nTo; - int nMv = min(nAmount, c.end-c.pos); - c.pos += nMv; - for (int i = nFrom; i <= nTo; i++) { - int n = c.s.ci + (c.dir>0 ? i : 15-i); - colors[n] = c.clr; - } - return nAmount - nMv; - } - - float StripsPerSec = 6; - float TrailTime = 1500; - int Cursors = 40; - dCursor cur[] = new dCursor[Cursors]; - - Worms(GLucose glucose) { - super(glucose); - if (DL_ == null) DL_ = new dLattice(); - for (int i=0; i= d.vpos) colors[d.v.ci+i] = color(0,0,30); - if (s == d.h && i >= d.hpos) colors[d.h.ci+i] = color(0,0,30); - }} - } - } else { - for (int i=0; i 0) { - nLeft = draw(cur[i], nLeft); - if (cur[i].isDone()) cur[i].PickNext(); - } - } - - for (int i=0,s=model.points.size(); i0) colors[i] = color(hue(c), saturation(c), - (float)(b-100*deltaMs/TrailTime)); - } - } - } -} -//---------------------------------------------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------------------------------------------------- +public class Pong extends DPat { + SinLFO x,y,z,dx,dy,dz; + float cRad; DParam pSize; + Pick pChoose; + xyz v = new xyz(), vMir = new xyz(); + + Pong(GLucose glucose) { + super(glucose); + cRad = mMax.x/10; + addModulator(dx = new SinLFO(6000, 500, 30000 )).trigger(); + addModulator(dy = new SinLFO(3000, 500, 22472 )).trigger(); + addModulator(dz = new SinLFO(1000, 500, 18420 )).trigger(); + addModulator(x = new SinLFO(cRad, mMax.x - cRad, 0)).trigger(); x.modulateDurationBy(dx); + addModulator(y = new SinLFO(cRad, mMax.y - cRad, 0)).trigger(); y.modulateDurationBy(dy); + addModulator(z = new SinLFO(cRad, mMax.z - cRad, 0)).trigger(); z.modulateDurationBy(dz); + pSize = addParam ("Size" , 0.4 ); + pChoose = addPick ("Animiation" , 0, 2, new String[] {"Pong", "Ball", "Cone"} ); + } + + void StartRun(double deltaMs) { cRad = mMax.x*pSize.Val()/6; } + color CalcPoint(xyz p) { + v.set(x.getValuef(), y.getValuef(), z.getValuef()); + v.z=0;p.z=0;// ignore z dimension + switch(pChoose.Cur()) { + case 0: vMir.set(mMax); vMir.subtract(p); + return lx.hsb(0,0,c1c(1 - min(v.distance(p), v.distance(vMir))*.5/cRad)); // balls + case 1: return lx.hsb(0,0,c1c(1 - v.distance(p)*.5/cRad)); // ball + case 2: vMir.set(mMax.x/2,0,mMax.z/2); + return lx.hsb(0,0,c1c(1 - CalcCone(p,v,vMir) * max(.02,.45-pSize.Val()))); // spot + } + return lx.hsb(0,0,0); + } +} +//---------------------------------------------------------------------------------------------------------------------------------- +public class NDat { + float xz, yz, zz, hue, sat, speed, angle, den; + float xoff,yoff,zoff; + float sinAngle, cosAngle; + boolean isActive; + NDat () { isActive=false; } + boolean Active() { return isActive; } + void set (float _hue, float _sat, float _xz, float _yz, float _zz, float _den, float _speed, float _angle) { + isActive = true; + hue=_hue; sat=_sat; xz=_xz; yz=_yz; zz =_zz; den=_den; speed=_speed; angle=_angle; + xoff = random(100e3); yoff = random(100e3); zoff = random(100e3); + } +} + +public class Noise extends DPat +{ + int CurAnim, iSymm; + int XSym=1,YSym=2,RadSym=3; + float zTime , zTheta=0, zSin, zCos, rtime, ttime, transAdd; + DParam pSpeed , pDensity; + Pick pChoose, pSymm; + int _ND = 4; + NDat N[] = new NDat[_ND]; + + Noise(GLucose glucose) { + super(glucose); + pSpeed = addParam("Fast" , .55); + pDensity = addParam("Dens" , .5); + pSymm = addPick("Symmetry" , 0, 3, new String[] {"None", "X", "Y", "Radial"} ); + pChoose = addPick("Animation", 6, 7, new String[] {"Drip", "Cloud", "Rain", "Fire", "Machine", "Spark","VWave", "Wave"} ); + for (int i=0; i<_ND; i++) N[i] = new NDat(); + } + + void StartPattern() { zTime = random(500); zTheta=0; rtime = 0; ttime = 0; transAdd=0; } + void StartRun(double deltaMs) { + zTime += deltaMs*(pSpeed.Val()-.5)*.002 ; + zTheta += deltaMs*(pSpin .Val()-.5)*.01 ; + rtime += deltaMs; + iSymm = pSymm.Cur(); + transAdd = 1*(1 - constrain(rtime - ttime,0,1000)/1000); + zSin = sin(zTheta); + zCos = cos(zTheta); + + if (pChoose.Cur() != CurAnim) { + CurAnim = pChoose.Cur(); ttime = rtime; + pSpin .reset(); zTheta = 0; + pDensity .reset(); pSpeed .reset(); + for (int i=0; i<_ND; i++) { N[i].isActive = false; } + + switch(CurAnim) { + // hue sat xz yz zz den mph angle + case 0: N[0].set(0 ,0 ,75 ,75 ,150,45 ,3 ,0 ); pSharp.set(1 ); break; // drip + case 1: N[0].set(0 ,0 ,100,100,200,45 ,3 ,180); pSharp.set(0 ); break; // clouds + case 2: N[0].set(0 ,0 ,2 ,400,2 ,20 ,3 ,0 ); pSharp.set(.5); break; // rain + case 3: N[0].set(40 ,1 ,100,100,200,10 ,1 ,180); + N[1].set(0 ,1 ,100,100,200,10 ,5 ,180); pSharp.set(0 ); break; // fire 1 + case 4: N[0].set(0 ,1 ,40 ,40 ,40 ,15 ,2.5,180); + N[1].set(20 ,1 ,40 ,40 ,40 ,15 ,4 ,0 ); + N[2].set(40 ,1 ,40 ,40 ,40 ,15 ,2 ,90 ); + N[3].set(60 ,1 ,40 ,40 ,40 ,15 ,3 ,-90); pSharp.set(.5); break; // machine + case 5: N[0].set(0 ,1 ,400,100,2 ,15 ,3 ,90 ); + N[1].set(20 ,1 ,400,100,2 ,15 ,2.5,0 ); + N[2].set(40 ,1 ,100,100,2 ,15 ,2 ,180); + N[3].set(60 ,1 ,100,100,2 ,15 ,1.5,270); pSharp.set(.5); break; // spark + } + + DG.UpdateLights(); + } + + for (int i=0; i<_ND; i++) if (N[i].Active()) { + N[i].sinAngle = sin(radians(N[i].angle)); + N[i].cosAngle = cos(radians(N[i].angle)); + } + } + + color CalcPoint(xyz P) { + color c = 0; + P.RotateZ(mCtr, zSin, zCos); + + if (CurAnim == 6 || CurAnim == 7) { + P.setNorm(); + return lx.hsb(0,0, 100 * ( + constrain(1-50*(1-pDensity.Val())*abs(P.y-sin(zTime*10 + P.x*(300))*.5 - .5),0,1) + + (CurAnim == 7 ? constrain(1-50*(1-pDensity.Val())*abs(P.x-sin(zTime*10 + P.y*(300))*.5 - .5),0,1) : 0)) + ); + } + + if (iSymm == XSym && P.x > mMax.x/2) P.x = mMax.x-P.x; + if (iSymm == YSym && P.y > mMax.y/2) P.y = mMax.y-P.y; + + for (int i=0;i<_ND; i++) if (N[i].Active()) { + NDat n = N[i]; + float zx = zTime * n.speed * n.sinAngle, + zy = zTime * n.speed * n.cosAngle; + + float b = (iSymm==RadSym ? noise(zTime*n.speed+n.xoff-Dist(P,mCtr)/n.xz) + : noise(P.x/n.xz+zx+n.xoff,P.y/n.yz+zy+n.yoff,P.z/n.zz+n.zoff)) + *1.8; + + b += n.den/100 -.4 + pDensity.Val() -1; + b += transAdd; + c = blendColor(c,lx.hsb(n.hue,100*n.sat,c1c(b)),ADD); + } + return c; + } +} +//---------------------------------------------------------------------------------------------------------------------------------- +public class Play extends DPat +{ + public class rAngle { + float prvA, dstA, c; + float prvR, dstR, r; + float _cos, _sin, x, y; + float fixAngle (float a, float b) { return a abs(a+2*PI-b) ? a : a+2*PI) : + (abs(a-b) > abs(a-2*PI-b) ? a : a-2*PI) ; } + float getX(float r) { return mCtr.x + _cos*r; } + float getY(float r) { return mCtr.y + _sin*r; } + void move() { c = interp(t,prvA,dstA); + r = interp(t,prvR,dstR); + _cos = cos(c); _sin = sin(c); + x = getX(r); y = getY(r); } + void set() { prvA = dstA; dstA = random(2*PI); prvA = fixAngle(prvA, dstA); + prvR = dstR; dstR = random(mCtr.y); } + } + + int nBeats = 0; + DParam pAmp, pRadius, pBounce; + + float t,amp,rad,bnc; + float zTheta=0; + ArrayList waves = new ArrayList(10); + + rAngle a1 = new rAngle(), a2 = new rAngle(), + a3 = new rAngle(), a4 = new rAngle(); + xyz cPrev = new xyz(), cRand = new xyz(), + cMid = new xyz(), V = new xyz(), + Theta = new xyz(), TSin = new xyz(), + TCos = new xyz(), cMidNorm = new xyz(), + Pn = new xyz(); + float LastBeat=3, LastMeasure=3; + int CurRandTempo = 1, CurRandTPat = 1; + + Pick pTimePattern, pTempoMult, pShape; + int RandCube; + + Play(GLucose glucose) { + super(glucose); + pRadius = addParam("Rad" , .1 ); + pBounce = addParam("Bnc" , .2 ); + pAmp = addParam("Amp" , .2 ); + pTempoMult = addPick ("TMult" , 0 , 5 , new String[] {"1x", "2x", "4x", "8x", "16x", "Rand" } ); + pTimePattern= addPick ("TPat" , 6 , 7 , new String[] {"Bounce", "Sin", "Roll", "Quant", "Accel", "Deccel", "Slide", "Rand"} ); + pShape = addPick ("Shape" , 3 , 15 , new String[] {"Line", "Tap", "V", "RandV", + "Pyramid", "Wings", "W2", "Clock", + "Triangle", "Quad", "Sphere", "Cone", + "Noise", "Wave", "?", "?"} ); + } + + public class rWave { + float v0, a0, x0, t,damp,a; + boolean bDone=false; + final float len=8; + rWave(float _x0, float _a0, float _v0, float _damp) { x0=_x0*len; a0=_a0; v0=_v0; t=0; damp = _damp; } + void move(double deltaMs) { + t += deltaMs*.001; + if (t>4) bDone=true; + } + float val(float _x) { + _x*=len; + float dist = t*v0 - abs(_x-x0); + if (dist<0) { a=1; return 0; } + a = a0*exp(-dist*damp) * exp(-abs(_x-x0)/(.2*len)); // * max(0,1-t/dur) + return -a*sin(dist); + } + } + + void StartPattern() { zTheta=0; } + void StartRun(double deltaMs) { + t = lx.tempo.rampf(); + amp = pAmp.Val(); + rad = pRadius.getValuef(); + bnc = pBounce.getValuef(); + zTheta += deltaMs*(pSpin .Val()-.5)*.01; + + Theta .set(pRotX.Val()*PI*2, pRotY.Val()*PI*2, pRotZ.Val()*PI*2 + zTheta); + TSin .set(sin(Theta.x), sin(Theta.y), sin(Theta.z)); + TCos .set(cos(Theta.x), cos(Theta.y), cos(Theta.z)); + + if (t 6 ? 2+int(random(5)) : int(random(7)); } + } LastMeasure = t; + + int nTempo = pTempoMult .Cur(); if (nTempo == 5) nTempo = CurRandTempo; + int nTPat = pTimePattern.Cur(); if (nTPat == 7) nTPat = CurRandTPat ; + + switch (nTempo) { + case 0: t = t; break; + case 1: t = (t*2. )%1.; break; + case 2: t = (t*4. )%1.; break; + case 3: t = (t*8. )%1.; break; + case 4: t = (t*16.)%1.; break; + } + + int i=0; while (i< waves.size()) { + rWave w = waves.get(i); + w.move(deltaMs); if (w.bDone) waves.remove(i); else i++; + } + + if ((t-1) { + waves.add(new rWave( + pKey.b ? map(DG.KeyPressed,0,7,0,1) : random(1), // location + bnc*10, // bounciness + 7, // velocity + 2*(1-amp))); // dampiness + DG.KeyPressed=-1; + if (waves.size() > 5) waves.remove(0); + } + + if (t .5?1:0)); // cone + + case 12: return lx.hsb(100 + noise(Pn.x,Pn.y,Pn.z + (NoiseMove+50000)/1000.)*200, + 85,c1c(Pn.y < noise(Pn.x + NoiseMove/2000.,Pn.z)*(1+amp)-amp/2.-.1 ? 1 : 0)); // noise + + case 13: float y=0; for (rWave w : waves) y += .5*w.val(Pn.x); + V.set(Pn.x, .7+y, Pn.z); + break; + + default: return lx.hsb(0,0,0); + } + + return lx.hsb(0, + 150-c1c(1 - V.distance(Pn)/rad), + c1c(1 - V.distance(Pn)/rad)); + } +} +//---------------------------------------------------------------------------------------------------------------------------------- +// 0 - TLB, L (b), BLB, B (l) // Fwd , Down, Back, Up +// 4 - TLF, F (l), BLF, L (f) // Fwd , Down, Back, Up +// 8 - TRF, R (f), BRF, F (r) // Back, Down, Fwd , Up +// 12- TRB, B (r), BRB, R (b) // Back, Down, Fwd , Up +// 1->7, 15->9 + +class dBolt { + dStrip v, h; + int vpos, hpos; + dBolt(dStrip _v, dStrip _h, int _vpos, int _hpos) { + v=_v; h=_h; vpos=_vpos; hpos=_hpos; + if (v.b0 == null) { v.b0=this; h.b0=this; } + else { v.b1=this; h.b1=this; } + } +} + +class dVertex { + dStrip s1 , s2 ; + int dir1, dir2 ; + dVertex(dStrip s, int d) { + int _a = (s.iS%4==1)? (d==1? 5: 3) : + (s.iS%4==3)? (d==1? 9:11) : + (d==1) ? (s.Top()?4:12) : (s.Top()?12:4); + dir1 = d * (s.isVert() ? -1 : 1); + dir2 = d; + s1 = DL_.DS[s.iCube() + ((s.iS+_a) % 16)]; + s2 = DL_.DS[d == 1 ? (s.idx == s.iFace()+3 ? s.idx-3 : s.idx+1): + (s.idx == s.iFace() ? s.idx+3 : s.idx-1)]; + swapout(1 , 6); + swapout(15,-6); + } + void swapout(int a, int b) { + if (s1.iS == a) { s1 = DL_.DS[s1.idx + b]; dir1 = -dir1; } + if (s2.iS == a) { s2 = DL_.DS[s2.idx + b]; dir2 = -dir2; } + } + +} + +class dStrip { // THIS WAS SUCH A PAIN! + int row, col, ci, idx, iS, axis; // 1-y, 2-left, 3-right + Strip s; + boolean bTop; // direction: top ccw, bottom cw. + + boolean Top (){ return axis!=1 && bTop ; } + boolean Bottom(){ return axis!=1 && !bTop; } + boolean isVert(){ return axis==1; } + boolean isHorz(){ return axis!=1; } + int iCube (){ return 16*floor(idx/16); } + int iFace (){ return iCube() + 4*floor(iS/4); } + + void init(Strip _s, int _i, int _row, int _col) { + idx = _i; row = _row; col = _col; s = _s; + iS = idx%16; bTop = (iS%4==0); + ci = s.points.get(0).index; + DL_.DQ[col][row] = iCube(); + switch (iS) { + case 4: case 6 : case 12: case 14: axis=2; break; + case 0: case 2 : case 8 : case 10: axis=3; break; + default: axis=1; break; + } + } + + void addBolts() { + v0 = new dVertex(this, 1); + v1 = new dVertex(this,-1); + + + if (iS == 7 && col != 0 && row != 0) // left bottom + new dBolt(this, DL_.GetStrip(row-1,col-1,(col % 2 == 1) ? 8 : 12), + 4, (col % 2 == 1) ? 6 : 9); + + if (iS == 7 && col != 0 && row < MaxCubeHeight*2-2) // left top + new dBolt(this, DL_.GetStrip(row+1,col-1,(col % 2 == 1) ? 10 : 14), + 11, (col % 2 == 1) ? 9 : 6); + + if (iS == 9 && col < NumBackTowers-1 && row < MaxCubeHeight*2-2) // right top + new dBolt(this, DL_.GetStrip(row+1,col+1,(col % 2 == 1) ? 6 : 2), + 4, (col % 2 == 1) ? 6 : 9); + + if (iS == 9 && col < NumBackTowers-1 && row != 0) // right bottom + new dBolt(this, DL_.GetStrip(row-1,col+1,(col % 2 == 1) ? 4 : 0), + 11, (col % 2 == 1) ? 9 : 6); + } + + dBolt b0, b1; + dVertex v0, v1; +} + +class dCursor { + dStrip s, sNext; + int nLast,pos,posNext,end; // 0 - 65535 + int dir; // 1 or -1 + color clr; + + dCursor(color _c) { clr=_c;} + + boolean isDone() { return pos==end; } + void set(dStrip _s, int _dir) { + s=_s; dir=_dir; pos = 0; end=65536; nLast=-1; sNext=null; + } + + boolean MakeTurn(dBolt b) { + int nEnd= (s.isVert() ? b.vpos : b.hpos) <<12; + nEnd= (dir==1 ? nEnd : 65536-nEnd); + if (nEnd < pos) return false; + if (s.isVert()) { sNext = b.h; posNext = b.hpos<<12; end = nEnd; } + else { sNext = b.v; posNext = b.vpos<<12; end = nEnd; } + return true; + } + + void PickNext() { + if (sNext != null) { + if (end == 65536) exit(); + end = 65536; + pos = posNext; + dir = randDir(); + if (dir<0) pos = end-pos; + s = sNext; sNext = null; + nLast = -1; + return;// could switch again!! + } else { + dVertex v = (dir == 1 ? s.v0 : s.v1); + int r = floor(random(2)); + set(r==0 ? v.s1 : v.s2,r==0 ? v.dir1 : v.dir2); + } + + // plan to turn the corner + if (random(6)<1 && s.b0 != null && MakeTurn(s.b0)) return; + if (random(6)<1 && s.b1 != null && MakeTurn(s.b1)) return; + } +} + +int randDir() { return round(random(1))*2-1; } + +class dLattice { + int iTowerStrips=-1; + dStrip[] DS = new dStrip[glucose.model.strips.size()]; + int[][] DQ = new int[NumBackTowers][MaxCubeHeight*2]; + + int nStrips() { return iTowerStrips; } + dStrip GetStrip (int row, int col, int off) { return DS[DQ[col][row]+off]; } + dLattice() { + DL_=this; + int col = 0, row = -2, i=-1; + for (Strip strip : glucose.model.strips ) { i++; + if (i % 16 == 0) row+=2; + if (row >= MaxCubeHeight*2-1) { col++; row = (col%2==1)?1:0; } + if (col >= NumBackTowers) continue; + iTowerStrips++ ; + dStrip s = DS[iTowerStrips] = new dStrip(); + s.init(strip, iTowerStrips, row, col); + } + + for (int j=0; j> 12); + int nTo = min(15,(c.pos+nAmount) >> 12); c.nLast=nTo; + int nMv = min(nAmount, c.end-c.pos); + c.pos += nMv; + for (int i = nFrom; i <= nTo; i++) { + int n = c.s.ci + (c.dir>0 ? i : 15-i); + colors[n] = c.clr; + } + return nAmount - nMv; + } + + float StripsPerSec = 6; + float TrailTime = 1500; + int Cursors = 40; + dCursor cur[] = new dCursor[Cursors]; + + Worms(GLucose glucose) { + super(glucose); + if (DL_ == null) DL_ = new dLattice(); + for (int i=0; i= d.vpos) colors[d.v.ci+i] = lx.hsb(0,0,30); + if (s == d.h && i >= d.hpos) colors[d.h.ci+i] = lx.hsb(0,0,30); + }} + } + } else { + for (int i=0; i 0) { + nLeft = draw(cur[i], nLeft); + if (cur[i].isDone()) cur[i].PickNext(); + } + } + + for (int i=0,s=model.points.size(); i0) colors[i] = lx.hsb(lx.h(c), lx.s(c), + max(0, (float)(b-100*deltaMs/TrailTime))); + } + } + } +} +//---------------------------------------------------------------------------------------------------------------------------------- diff --git a/DanKaminsky.pde b/DanKaminsky.pde index 3dd9d14..5364669 100644 --- a/DanKaminsky.pde +++ b/DanKaminsky.pde @@ -84,7 +84,7 @@ class ObjectMuckerEffect extends SCEffect { for(int i=0; i0) b = b < .5 ? pow(b,fSharp) : 1-pow(1-b,fSharp); - if (DG._Trails()>0 && fQuant == 0) b = max(b, (float) (brightness(cOld)/100. - (1-DG._Trails()) * deltaMs/200.)); - if (DG.bSustain == true) b = max(b, (float) (brightness(cOld)/100.)); + if (DG._Trails()>0 && fQuant == 0) b = max(b, (float) (lx.b(cOld)/100. - (1-DG._Trails()) * deltaMs/200.)); + if (DG.bSustain == true) b = max(b, (float) (lx.b(cOld)/100.)); if (pInvert.b) { b = 1-b; s = 1-s; } - colors[p.index] = color( - (hue(cNew) + zSpinHue) % 360, + colors[p.index] = lx.hsb( + (lx.h(cNew) + zSpinHue) % 360, s, 100 * b * DG._Level() ); -// colors[p.index] = color(0,0, p.x >= modmin.x && p.y >= modmin.y && p.z >= modmin.z && +// colors[p.index] = lx.hsb(0,0, p.x >= modmin.x && p.y >= modmin.y && p.z >= modmin.z && // p.x <= modmin.x+mMax.x && p.y <= modmin.y+mMax.y && p.z <= modmin.z+mMax.z ? 100 : 0); } } diff --git a/GranimPattern.pde b/GranimPattern.pde index abe2237..450c17e 100644 --- a/GranimPattern.pde +++ b/GranimPattern.pde @@ -27,7 +27,7 @@ class Granim extends Graphic { while(width()< g.position+1) { - graphicBuffer.add(color(0,0,0)); + graphicBuffer.add(lx.hsb(0,0,0)); } drawAll(); displayList.put(name , g); @@ -55,7 +55,7 @@ class Granim extends Graphic { while(width()< g.position + g.width()) { - graphicBuffer.add(color(0,0,0)); + graphicBuffer.add(lx.hsb(0,0,0)); } if(g.changed) { @@ -141,7 +141,7 @@ class RedsGraphic extends Graphic { for(int i = 0; i < len ;i++) { - graphicBuffer.add(color(0,255,255)); + graphicBuffer.add(lx.hsb(0,255,255)); } } }; @@ -229,7 +229,7 @@ class ColorDotsGraphic extends Graphic super(); for (int colorVal : colorSequence) { - graphicBuffer.add(color(colorVal, 255, 255)); + graphicBuffer.add(lx.hsb(colorVal, 255, 255)); } changed = true; } diff --git a/JR.pde b/JR.pde index cd494fa..6692baa 100644 --- a/JR.pde +++ b/JR.pde @@ -1,4 +1,4 @@ -color BLACK = color(0, 0, 0); +color BLACK = #000000; class Gimbal extends SCPattern { @@ -121,7 +121,7 @@ class Gimbal extends SCPattern { + pow(nearest_circle_z - c.z * ringExtendParam.getValuef(), 2)); float xy_distance = sqrt(c.x*c.x + c.y*c.y); - return color(this.hue, 100, (1 - distance_to_circle / girth * fadeFromCoreParam.getValuef()) * 100); + return lx.hsb(this.hue, 100, (1 - distance_to_circle / girth * fadeFromCoreParam.getValuef()) * 100); } } @@ -166,18 +166,18 @@ class Zebra extends SCPattern { int stripe_count = 12; float stripe_width = model.xMax / (float)stripe_count; if (Math.floor((c.x) / stripe_width) % 2 == 0) { - return color(hue, 100, 100); + return lx.hsb(hue, 100, 100); } else { - return color((hue + 90) % 360, 100, 100); + return lx.hsb((hue + 90) % 360, 100, 100); } /* OCTANTS if ((isPositiveBit(c.x) + isPositiveBit(c.y) + isPositiveBit(c.z)) % 2 == 0) { - return color(lx.getBaseHuef(), 100, 100); + return lx.hsb(lx.getBaseHuef(), 100, 100); } else { - return color(0, 0, 0); + return lx.hsb(0, 0, 0); } */ } @@ -271,7 +271,7 @@ color specialBlend(color c1, color c2, color c3) { float relative_b2 = b2 / (b1 + b2 + b3); float relative_b3 = b3 / (b1 + b2 + b3); - return color( + return lx.hsb( (h1 * relative_b1 + h2 * relative_b1 + h3 * relative_b3) % 360, s1 * relative_b1 + s2 * relative_b2 + s3 * relative_b3, max(max(b1, b2), b3) diff --git a/JackStahl.pde b/JackStahl.pde index a840882..081ea40 100644 --- a/JackStahl.pde +++ b/JackStahl.pde @@ -64,7 +64,7 @@ class Swim extends SCPattern { float v1 = sin_x > y_in_range ? (100 + 100*(y_in_range - sin_x)) : 0; float hue_color = (lx.getBaseHuef() + hueScale.getValuef() * (abs(p.x-model.xMax/2.)*.3 + abs(p.y-model.yMax/2)*.9 + abs(p.z - model.zMax/2.))) % 360; - colors[p.index] = color(hue_color, 70, v1); + colors[p.index] = lx.hsb(hue_color, 70, v1); } } } @@ -172,7 +172,7 @@ class Balance extends SCPattern { float v1 = max(0, 100 * (1 - 4*abs(sin_x - y_in_range))); float hue_color = (lx.getBaseHuef() + hueScale.getValuef() * (abs(p.x-model.xMax/2.) + abs(p.y-model.yMax/2)*.2 + abs(p.z - model.zMax/2.)*.5)) % 360; - color c = color(hue_color, 80, v1); + color c = lx.hsb(hue_color, 80, v1); // Now draw the spheres for (Sphere s : spheres) { @@ -197,7 +197,7 @@ class Balance extends SCPattern { float sphere_color = (lx.getBaseHuef() - (1 - hueScale.getValuef()) * d/r * 45) % 360; - c = blendColor(c, color((sphere_color + 270) % 360, 60, min(1, value) * 100), ADD); + c = blendColor(c, lx.hsb((sphere_color + 270) % 360, 60, min(1, value) * 100), ADD); } colors[p.index] = c; } diff --git a/MarkSlee.pde b/MarkSlee.pde index 0eb12ac..b90a822 100644 --- a/MarkSlee.pde +++ b/MarkSlee.pde @@ -106,7 +106,7 @@ class Pulley extends SCPattern { private boolean isRising = false; private BasicParameter sz = new BasicParameter("SIZE", 0.5); - private BasicParameter beatAmount = new BasicParameter("BEAT", 0.1); + private BasicParameter beatAmount = new BasicParameter("BEAT", 0); Pulley(GLucose glucose) { super(glucose); @@ -125,7 +125,7 @@ class Pulley extends SCPattern { int i = 0; for (Accelerator g : gravity) { if (isRising) { - g.setSpeed(random(40, 50), 0).start(); + g.setSpeed(random(20, 33), 0).start(); } else { g.setVelocity(0).setAcceleration(-420); delays[i].setDuration(random(0, 500)).trigger(); @@ -138,27 +138,31 @@ class Pulley extends SCPattern { if (reset.click()) { trigger(); } - int j = 0; - for (Click d : delays) { - if (d.click()) { - gravity[j].start(); - d.stop(); - } - ++j; - } - - for (Accelerator g : gravity) { - if (isRising) { - if (g.getValuef() > model.yMax) { - g.stop(); - } else if (g.getValuef() > model.yMax*.55) { - if (g.getVelocityf() > 10) { - g.setAcceleration(-16); - } else { - g.setAcceleration(0); - } + if (isRising) { + // Fucking A, had to comment this all out because of that bizarre + // Processing bug where some simple loop takes an absurd amount of + // time, must be some pre-processor bug +// for (Accelerator g : gravity) { +// if (g.getValuef() > model.yMax) { +// g.stop(); +// } else if (g.getValuef() > model.yMax*.55) { +// if (g.getVelocityf() > 10) { +// g.setAcceleration(-16); +// } else { +// g.setAcceleration(0); +// } +// } +// } + } else { + int j = 0; + for (Click d : delays) { + if (d.click()) { + gravity[j].start(); + d.stop(); } - } else { + ++j; + } + for (Accelerator g : gravity) { if (g.getValuef() < 0) { g.setValue(-g.getValuef()); g.setVelocity(-g.getVelocityf() * random(0.74, 0.84)); @@ -172,11 +176,11 @@ class Pulley extends SCPattern { } float falloff = 100. / (3 + sz.getValuef() * 36 + fPos * beatAmount.getValuef()*48); for (Point p : model.points) { - int g = (int) constrain((p.x - model.xMin) * NUM_DIVISIONS / (model.xMax - model.xMin), 0, NUM_DIVISIONS-1); + int gi = (int) constrain((p.x - model.xMin) * NUM_DIVISIONS / (model.xMax - model.xMin), 0, NUM_DIVISIONS-1); colors[p.index] = lx.hsb( (lx.getBaseHuef() + abs(p.x - model.cx)*.8 + p.y*.4) % 360, constrain(130 - p.y*.8, 0, 100), - max(0, 100 - abs(p.y - gravity[g].getValuef())*falloff) + max(0, 100 - abs(p.y - gravity[gi].getValuef())*falloff) ); } } diff --git a/SamMorrow.pde b/SamMorrow.pde index 0b70698..350615d 100644 --- a/SamMorrow.pde +++ b/SamMorrow.pde @@ -18,7 +18,7 @@ class JazzRainbow extends SamPattern { float a = hv%250; if (i%2 == 0) { for (int b = 0; b < 70; b++) { - colors[(i+b)%colors.length] = color(a+i%250, 100, b*a%100); + colors[(i+b)%colors.length] = lx.hsb(a+i%250, 100, b*a%100); } } } diff --git a/ShaheenGandhi.pde b/ShaheenGandhi.pde index a9428aa..d718e36 100644 --- a/ShaheenGandhi.pde +++ b/ShaheenGandhi.pde @@ -130,7 +130,7 @@ class HelixPattern extends SCPattern { // For performance reasons, cut out points that are outside of // the tube where the toroidal coil lives. if (abs(myDist(p, axisPoint) - radius) > girth*.5f) { - return color(0,0,0); + return lx.hsb(0,0,0); } // Find the appropriate point for the current rotation @@ -146,7 +146,7 @@ class HelixPattern extends SCPattern { // Soften edges by fading brightness. float b = constrain(100*(1 - ((d-.5*girth)/(girth*.5))), 0, 100); - return color((lx.getBaseHuef() + (360*(phase / TWO_PI)))%360, 80, b); + return lx.hsb((lx.getBaseHuef() + (360*(phase / TWO_PI)))%360, 80, b); } } @@ -232,7 +232,7 @@ class HelixPattern extends SCPattern { float t = axis.getTValue(pt) + spokePhase; int spokeIndex = (int)floor((t - tMin + spokePeriod/2) / spokePeriod); if (spokeIndex < 0 || spokeIndex >= basePairs.length) { - return color(0,0,0); + return lx.hsb(0,0,0); } BasePairInfo basePair = basePairs[spokeIndex]; Line spokeLine = basePair.line; @@ -240,7 +240,7 @@ class HelixPattern extends SCPattern { float d = PVector.dist(pt, pointOnSpoke); float b = (PVector.dist(pointOnSpoke, spokeLine.getPoint()) < spokeRadius) ? constrain(100*(1 - ((d-.5*spokeGirth)/(spokeGirth*.5))), 0, 100) : 0.f; float phase = spokeLine.getTValue(pointOnSpoke) < 0 ? basePair.colorPhase1 : basePair.colorPhase2; - return color((lx.getBaseHuef() + (360*(phase / TWO_PI)))%360, 80.f, b); + return lx.hsb((lx.getBaseHuef() + (360*(phase / TWO_PI)))%360, 80.f, b); } void run(double deltaMs) { @@ -259,15 +259,15 @@ class HelixPattern extends SCPattern { color spokeColor = calculateSpokeColor(pt); if (!h1on) { - h1c = color(0,0,0); + h1c = lx.hsb(0,0,0); } if (!h2on) { - h2c = color(0,0,0); + h2c = lx.hsb(0,0,0); } if (!spokesOn) { - spokeColor = color(0,0,0); + spokeColor = lx.hsb(0,0,0); } // The helices are positioned to not overlap. If that changes, diff --git a/TimBavaro.pde b/TimBavaro.pde index bbbaac3..a10e89e 100644 --- a/TimBavaro.pde +++ b/TimBavaro.pde @@ -56,13 +56,13 @@ class TimSpheres extends SCPattern { for (Point p : model.points) { float value = 0; - color c = color(0, 0, 0); + color c = lx.hsb(0, 0, 0); for (Sphere s : spheres) { float d = sqrt(pow(p.x - s.x, 2) + pow(p.y - s.y, 2) + pow(p.z - s.z, 2)); float r = (s.radius); // * (sinLfoValue + 0.5)); value = max(0, 1 - max(0, d - r) / 10); - c = blendColor(c, color(((s.hue + lfoValue) % 1) * 360, 100, min(1, value) * 100), ADD); + c = blendColor(c, lx.hsb(((s.hue + lfoValue) % 1) * 360, 100, min(1, value) * 100), ADD); } colors[p.index] = c; @@ -249,8 +249,8 @@ class TimRaindrops extends SCPattern { for (Point p : model.points) { color c = blendColor( - color(210, 20, (float)Math.max(0, 1 - Math.pow((model.yMax - p.y) / 10, 2)) * 50), - color(220, 60, (float)Math.max(0, 1 - Math.pow((p.y - model.yMin) / 10, 2)) * 100), + lx.hsb(210, 20, (float)Math.max(0, 1 - Math.pow((model.yMax - p.y) / 10, 2)) * 50), + lx.hsb(220, 60, (float)Math.max(0, 1 - Math.pow((p.y - model.yMin) / 10, 2)) * 100), ADD); for (Raindrop raindrop : raindrops) { if (p.x >= (raindrop.p.x - raindrop.radius) && p.x <= (raindrop.p.x + raindrop.radius) && @@ -258,7 +258,7 @@ class TimRaindrops extends SCPattern { float d = raindrop.p.distanceTo(p) / raindrop.radius; // float value = (float)Math.max(0, 1 - Math.pow(Math.min(0, d - raindrop.radius) / 5, 2)); if (d < 1) { - c = blendColor(c, color(raindrop.hue, 80, (float)Math.pow(1 - d, 0.01) * 100), ADD); + c = blendColor(c, lx.hsb(raindrop.hue, 80, (float)Math.pow(1 - d, 0.01) * 100), ADD); } } } @@ -343,7 +343,7 @@ class TimCubes extends SCPattern { for (CubeFlash flash : flashes) { float hue = (hueParameter.getValuef() + (hueVarianceParameter.getValuef() * flash.hue)) % 1.0; - color c = color(hue * 360, saturationParameter.getValuef() * 100, (flash.value) * 100); + color c = lx.hsb(hue * 360, saturationParameter.getValuef() * 100, (flash.value) * 100); for (Point p : flash.c.points) { colors[p.index] = c; } @@ -473,10 +473,10 @@ class TimPlanes extends SCPattern { final color planeColor; if (d <= thickness) { - planeColor = color(plane.hue, saturation, 100); + planeColor = lx.hsb(plane.hue, saturation, 100); } else if (d <= thickness * 2) { float value = 1 - ((d - thickness) / thickness); - planeColor = color(plane.hue, saturation, value * 100); + planeColor = lx.hsb(plane.hue, saturation, value * 100); } else { planeColor = 0; } @@ -640,16 +640,16 @@ class TimPinwheels extends SCPattern { } if (value == 1) { values[i] = 1; -// colors[p.index] = color(120, 0, 100); +// colors[p.index] = lx.hsb(120, 0, 100); } else { values[i] = max(0, values[i] - fadeAmount); //color c = colors[p.index]; - //colors[p.index] = color(max(0, hue(c) - 10), min(100, saturation(c) + 10), brightness(c) - 5 ); + //colors[p.index] = lx.hsb(max(0, lx.h(c) - 10), min(100, lx.s(c) + 10), lx.b(c) - 5 ); } if (random(1.0) >= derez) { float v = values[i]; - colors[p.index] = color((360 + hue + pow(v, 2) * hueSpread) % 360, 30 + pow(1 - v, 0.25) * 60, v * 100); + colors[p.index] = lx.hsb((360 + hue + pow(v, 2) * hueSpread) % 360, 30 + pow(1 - v, 0.25) * 60, v * 100); } } } @@ -819,12 +819,12 @@ class TimTrace extends SCPattern { public void run(double deltaMs) { for (Point p : model.points) { color c = colors[p.index]; - colors[p.index] = color(hue(c), saturation(c), brightness(c) - 3); + colors[p.index] = lx.hsb(lx.h(c), lx.s(c), lx.b(c) - 3); } for (MovingPoint mp : movingPoints) { mp.step(); - colors[mp.currentPoint.index] = blendColor(colors[mp.currentPoint.index], color(mp.hue, 10, 100), ADD); + colors[mp.currentPoint.index] = blendColor(colors[mp.currentPoint.index], lx.hsb(mp.hue, 10, 100), ADD); } } } diff --git a/TobySegaran.pde b/TobySegaran.pde index 0523129..82ad4d2 100644 --- a/TobySegaran.pde +++ b/TobySegaran.pde @@ -30,7 +30,7 @@ class GlitchPlasma extends SCPattern { + sin(dist(p.x, p.y + pos / 7, 192.0, 64.0) / 7.0) + sin(dist(p.x, p.z + pos, 192.0, 100.0) / 8.0); float bv = 100; - colors[p.index] = color((hv+2)*50, satu, bv); + colors[p.index] = lx.hsb((hv+2)*50, satu, bv); } if (random(1.0)bright[p.index]) { - colors[p.index] = color(hv,sat[i].getValuef(),br); + colors[p.index] = lx.hsb(hv,sat[i].getValuef(),br); bright[p.index] = br; } } @@ -187,7 +187,7 @@ class SoundRain extends SCPattern { for (Point p : s.points) { int seq = int(p.y*avgSize/model.yMax+pos.getValuef()+sin(p.x+p.z)*2)%avgSize; seq=min(abs(seq-(avgSize/2)),avgSize-1); - colors[p.index] = color(200,max(0,100-abs(p.x-col1.getValuef())/2),lightVals[seq]); + colors[p.index] = lx.hsb(200,max(0,100-abs(p.x-col1.getValuef())/2),lightVals[seq]); } } } @@ -229,7 +229,7 @@ class FaceSync extends SCPattern { float a2=max(0,100-abs(p.x-col2.getValuef())); float sat = max(a1,a2); float h = (359*a1+200*a2) / (a1+a2); - colors[p.index] = color(h,sat,100-abs(dx*5)-abs(dz*5)); + colors[p.index] = lx.hsb(h,sat,100-abs(dx*5)-abs(dz*5)); } } } @@ -292,7 +292,7 @@ class SoundSpikes extends SCPattern { if (seq>avgSize) seq=avgSize-seq; seq=constrain(seq,0,avgSize-1); float br=max(0, lightVals[seq]-p.y); - colors[p.index] = color((dis*avgSize*65)/model.xMax,90,br); + colors[p.index] = lx.hsb((dis*avgSize*65)/model.xMax,90,br); } } } diff --git a/_Internals.pde b/_Internals.pde index d616264..e568c4e 100644 --- a/_Internals.pde +++ b/_Internals.pde @@ -52,7 +52,6 @@ LXPattern[] patterns; MappingTool mappingTool; PandaDriver[] pandaBoards; MidiEngine midiEngine; -color[] threadColors; // Display configuration mode boolean mappingMode = false; @@ -61,6 +60,7 @@ DebugUI debugUI; boolean uiOn = true; LXPattern restoreToPattern = null; PImage logo; +float[] hsb = new float[3]; // Handles to UI objects UIContext[] overlays; @@ -121,7 +121,6 @@ void setup() { glucose = new GLucose(this, buildModel()); lx = glucose.lx; lx.enableKeyboardTempo(); - threadColors = new color[lx.total]; logTime("Built GLucose engine"); // Set the patterns @@ -267,12 +266,9 @@ void draw() { // Gamma correction here. Apply a cubic to the brightness // for better representation of dynamic range for (int i = 0; i < sendColors.length; ++i) { - float b = brightness(sendColors[i]) / 100.f; - sendColors[i] = color( - hue(sendColors[i]), - saturation(sendColors[i]), - (b*b*b) * 100. - ); + lx.RGBtoHSB(sendColors[i], hsb); + float b = hsb[2]; + sendColors[i] = lx.hsb(360.*hsb[0], 100.*hsb[1], 100.*(b*b*b)); } // TODO(mcslee): move into GLucose engine diff --git a/_UIFramework.pde b/_UIFramework.pde index ec590fe..f4a0a40 100644 --- a/_UIFramework.pde +++ b/_UIFramework.pde @@ -718,7 +718,7 @@ public class UIScrollList extends UIObject { } if (hasScroll) { pg.noStroke(); - pg.fill(color(0, 0, 100, 15)); + pg.fill(0x26ffffff); pg.rect(w-12, 0, 12, h); pg.fill(#333333); pg.rect(w-12, scrollYStart, 12, scrollYHeight); diff --git a/code/HeronLX.jar b/code/HeronLX.jar index 336c147944128b00d9986e734b6c29e9bf4d878f..6069116fa5100282693f58bbf58e7c6134982384 100755 GIT binary patch delta 7615 zcmZWtcRZEv`#vg=J`+Z&4`?{|CzMkigyD14jF$JI8SPu`M6b2)P!9q(@$ORA~r77o= zaR2)_5eEqvK?8&JoP)twV8GBO18{?v7)26fJ~FcS_Lm!~3h~pj4jA7gTH`wX*DFp`oXeUa<>*BI2XJrhXW4O#U zhcXo#-@HM&`r<1211aln$6`Y9-Sf= zy}HcqhNaFu;71QI@so>Q^CdthNwlPPTj+=J)@*pNMPzrg5sr!PMKh}0%k!&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