I’m not sure exactly what you’re trying to do, but in general, if you want to transition from one expression to another for the same property, you can use linear() like this:
transStart = 4; //start transition at 4 seconds
transDur = 2; // transition duration
// undulation expression
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));
result1 = radiansToDegrees(theta)/damping;
// pendulum expression
veloc = 7;
amplitude = 80;
decay = .7;
result2 = amplitude*Math.sin(veloc*time)/Math.exp(decay*time);
// transition
linear(time,transStart, transStart + transDur,result1,result2)
Is that what you’re after?
Dan