Random scale with equal values for xScale and yScale
Hi there,
professional scripters might not think of this to be a problem, but I cannot solve it on my own after hours of trying.
I found a random script on www.motionscript.com (thank you so much Dan, for this great resource, you're awesome!).
The sample for "random motion - more chaotic" is exactly what I need, but for the scale property with same random values for xScale and yScale (so that the random scaling is proportionally). I cannot figure out how to do this. I know I need another variable, but I don't know where.
Actually, I want to have a matrix of dots, each scaling up and down again randomly and independently in size and timing...
This is what I got so far:
segMin = .3;
segMax = .7;
minValX = 100;
maxValX = 200;
minValY = minValX;
maxValY = maxValX;
minVal = [minValX, minValY];
maxVal = [maxValX, maxValY];
seedRandom (index, true);
segDur = random (segMin, segMax);
seed = Math.floor (time / segDur);
segStart = seed * segDur;
seedRandom (seed, true);
startVal = random (minVal, maxVal);
seedRandom (seed+1, true);
endVal = random (minVal, maxVal);
easeOut (time, segStart, segStart + segDur, startVal, endVal);
I'd appreciate someone's help without being to demanding 🙂
Thanks a lot for reading this.
Chris
