Copy link to clipboard
Copied
The wiggle expression seems to have me stumped, so I'm not exactly sure how to integrate it into larger expressions, namely wiggling a wiggle.
Here's what I'd like to do:
I have an object in 3D space, and I wiggle its position: wiggle(.3,1000)
What I want to do after that is wiggle the result of that path at a much higher frequency but lower amplitude (2,30 is a good starting point).
Copy link to clipboard
Copied
Try this:
switchTime = 4; // switch at 4 seconds
if (time < switchTime)
wiggle(.3,1000)
else{
p1 = wiggle(.3,1000,1,.5,switchTime);
p2 = wiggle(2,30,1,.5,switchTime);
wiggle(2,30) - (p2-p1);
}
Dan
Copy link to clipboard
Copied
Oops! Apologies for my imprecise language. When I said "after" what I probably should have said as "in addition to".
Rather than hand off from one kind of wiggle to another, what I want to do is have two different wiggles operating simultaneously on different frequencies.
If I were using sine waves instead of pseudo-random wiggles, it might looks something like this formula:
y=sin(x)+(sin(10x)/10)
Copy link to clipboard
Copied
How about this then:
switchTime = 4; // switch at 4 seconds
switchDur = .3;
w = wiggle(.3,1000);
if (time < switchTime)
w
else{
w2 = wiggle(2,30) - value;
w + ease(time,switchTime,switchTime + switchDur,[0,0,0],w2)
}
Dan
Copy link to clipboard
Copied
The optional 3rd and 4th values in the wiggle method can be used to add extra layers of higher frequency noise to the initial wiggle. The 3rd value is octaves, or the number of levels of noise added together (default = 1) and the 4th value controls how the amplitude of noise is multiplied for each octave (default = 0.5). So for example you could try wiggle(0.3,1000,2,0.5) and experiment with the last two values.
But to add two specific wiggles together you could do this:
lowFreq = position.wiggle(0.3,1000) ;
highFreq = position.wiggle(2,30)-value;
highFreq + lowFreq;
Find more inspiration, events, and resources on the new Adobe Community
Explore Now