-
Undulation seamless loop
Hi! I’m using the Dan Ebbert’s expression for undulation (https://www.motionscript.com/expressions-lab-ae65/undulations.html), as I want my objects to look like they’re moving like a wave. I’m having trouble making a seamless loop. My composition has 5 objects using this expression, and is 3 seconds long. I’d appreciate any help you can muster, thanks!
—–
The undulation expression is:
Position:xAmp = 3; //height of undulations (pixels) xFreq = .3; //undulations per second xSpeed = 150; //speed of wave (pixels per second) wl = xSpeed/xFreq; //wavelength (pixels) phaseOffset = ((position[0]%wl)/wl)*2*Math.PI; y = xAmp*Math.sin(2*Math.PI*xFreq*time + phaseOffset); value + [0,y]Rotation:
xFreq = .3; //undulations per second xSpeed = 150; //speed of wave (pixels per second) damping = 15; //undulation damping factor wl = xSpeed/xFreq; //wavelength (pixels) phaseOffset = ((position[0]%wl)/wl)*2*Math.PI; theta = Math.atan(Math.cos(2*Math.PI*xFreq*time + phaseOffset)); radiansToDegrees(theta)/damping;