//addParameter(bounceamp = new BasicParameter("Amp", .5));
//addParameter(bouncerate = new BasicParameter("Rate", .5)); //ybounce.modulateDurationBy(bouncerate);
addParameter(widthparameter = new BasicParameter("Width", .1));
- addParameter(huespread = new BasicParameter("Hue", .2));
+ addParameter(huespread = new BasicParameter("Hue", .5, 10));
addModulator( vx = new SinLFO(-4000, 10000, 100000)).trigger() ;
//addModulator(xbounce = new SinLFO(model.xMax/3, 2*model.yMax/3, 2000)).trigger();
//void updatespherey(deltaMs, )
float quadrant(PVector q) {
- float qtheta = atan2( (q.x-f1xcenter) , (-q.y - f1ycenter) );
- return map(qtheta, -PI/2, PI/2, 120, 240);
+ float qtheta = atan2( (q.x-f1xcenter) , (q.z - f1zcenter) );
+ //println( "qtheta " + qtheta);
+
+ return map(qtheta, -PI/2, PI/2, 140, 240);
//if (q.x > f1xcenter ) {return 140 ;}
//else {return 250;}
- //if ()
-
-
-
}
color spheryvalue (PVector p, float f1xcenter, float f1ycenter, float f1zcenter)
{ circlecenter = new PVector(f1xcenter, f1ycenter, f1zcenter);
//switch(sShpape.cur() ) {}
return lx.hsb(constrain( huespread.getValuef()*5*quadrant(p), 0, 360) ,
- PVector.dist(p,circlecenter) ,
+ 80,
max(0, 100 - 100*widthparameter.getValuef()*abs(PVector.dist(p, circlecenter)
- vibration.getValuef() ) ) );
}
{ color c = 0;
PVector P = new PVector(p.x, p.y, p.z);
c = blendColor(c, spherys[3].spheryvalue(P, .3*model.xMax, .7*model.yMax, .6*model.zMax),ADD);
- colors[p.index] = lx.hsb(lx.h(c), lx.s(c), lx.b(c));
+
+ colors[p.index] = blendColor(colors[p.index], c , ADD);
}