Created
July 10, 2013 19:42
-
-
Save seblavoie/5969544 to your computer and use it in GitHub Desktop.
Easy ease wiggle expression. Found here: http://forums.creativecow.net/readpost/227/10295
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
wig+value; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment