Re: Wiggle with ease by Dan Ebberts on May 16, 2008 at 3:31:58 pm
Aharon,
What exactly are you trying to do? I mean wiggle() pretty much eases from one value to the next already, right? You must have something specific in mind.
Re: Wiggle with ease by Filip Vandueren on May 18, 2008 at 11:17:23 pm
Hey Aharon,
I guess you mean by 'easing' that as each wiggled value is reached, the velocity of change drops down to 0.
You can't do that via wiggle, but you can write your own wiggle-system, interpolating between random values.
this is a hack of one of Dan's old expressions that does that trick:
tMin = .25; //minimum segment duration
tMax = .5; //maximum segment duration
minVal = [-50,-50];
maxVal = [50,50];
start=0;
end = 0;
j = 0;
while (time >= end){
j ++;
seedRandom(j,true);
start = end;
end += random(tMin,tMax);
}
endVal = random(minVal,maxVal);
seedRandom(j-1,true);
dummy = random(); //this is a throw-away value
startVal = random(minVal,maxVal);
wig = ease(time,start,end,startVal,endVal);