How would you make a wiggle expression that radically reduced the time between values? Like Wiggle that uses Exponential interpolation as inbetween values? So even though the pace would be something like wiggle(1,50), it would take much less than the 1 second wiggle interval to change between values.
Kind of like how a hummingbird feeds? It hovers, hovers, hovers... then snap into a new position.... hover, hover, hover... snap into new position.
Any ideas about this?
(Also, is the Jagged/Smooth option of the ancient Wiggler available in expression form?)
Interesting idea. I think it might be easier to do it this way than to start with wiggle():
minVal = -100;
maxVal = 100;
minDuration = 0.5;
maxDuration = 1.5;
transRate = 400;
tEnd = 0;
n = 0;
seedRandom(n, true);
preRun = random(maxDuration);
while (time + preRun >= tEnd){
n++;
seedRandom(n, true);
dur = random(minDuration, maxDuration);
tEnd += dur;
}
t = time + preRun - (tEnd - dur);
n += 9973;
seedRandom(n, true);
endVal = random(minVal, maxVal);
seedRandom(n - 1, true);
startVal = random(minVal, maxVal);
delta = endVal-startVal;
transTime = Math.abs(delta/transRate);
ease(t, (dur-transTime)/2,(dur+transTime)/2, startVal, endVal);
You can make wiggle() more jagged by increasing the number of octaves (third parameter of wiggle()).
Dan
I guess 2D positon would be more like this:
minVal = [0,0];
maxVal = [thisComp.width,thisComp.height];
minDuration = 0.5;
maxDuration = 1.5;
transRate = 1000;
tEnd = 0;
n = 0;
seedRandom(n, true);
preRun = random(maxDuration);
while (time + preRun >= tEnd){
n++;
seedRandom(n, true);
dur = random(minDuration, maxDuration);
tEnd += dur;
}
t = time + preRun - (tEnd - dur);
n += 9973;
seedRandom(n, true);
endVal = random(minVal, maxVal);
seedRandom(n - 1, true);
startVal = random(minVal, maxVal);
delta = length(endVal,startVal);
transTime = Math.abs(delta/transRate);
ease(t, (dur-transTime)/2,(dur+transTime)/2, startVal, endVal);
Dan
North America
Europe, Middle East and Africa
Asia Pacific