# Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Movement bounce expression inPoint,outPoint

• # Movement bounce expression inPoint,outPoint

May 3, 2020 at 1:39 pm

Can any one one help with expression for position makes object bounce inPoint and outpoint
I have one for scale but can’t edit it position
Thanks

• ### Dan Ebberts

May 3, 2020 at 11:13 pm

What do you have for scale?

Dan

May 3, 2020 at 11:26 pm

I have this, it’s your expression as usual
Want edit it for position , come from out of comp and land with bounce then go out with bounce as well.

rate = 500;
rampDur = value/rate;
freq = 3;
decay = 5;
w = freq*Math.PI*2;

if (time < (inPoint+outPoint)/2){
if (time < (inPoint + rampDur)){
s = linear(time,inPoint,inPoint+rampDur,0,value);
}else{
t = time – (inPoint+rampDur);
s = value + rate*Math.sin(t*w)/Math.exp(t*decay)/w;
}
}else{
if (time > (outPoint – rampDur)){
s = linear(time,outPoint-rampDur,outPoint,value,0);
}else{
t = (outPoint – rampDur) – time;
s = value + rate*Math.sin(t*w)/Math.exp(t*decay)/w;
}
}
[s,s]

• ### Dan Ebberts

May 3, 2020 at 11:35 pm

Something like this maybe:

``` rate = 500; rampDur = value/rate; freq = 3; decay = 5; w = freq*Math.PI*2;```

``` ```

```if (time < (inPoint+outPoint)/2){ if (time < (inPoint + rampDur)){ x = linear(time,inPoint,inPoint+rampDur,-width/2,value); }else{ t = time - (inPoint+rampDur); x = value + rate*Math.sin(t*w)/Math.exp(t*decay)/w; } }else{ if (time > (outPoint - rampDur)){ x = linear(time,outPoint-rampDur,outPoint,value,thisComp.width+width/2); }else{ t = (outPoint - rampDur) - time; x = value + rate*Math.sin(t*w)/Math.exp(t*decay)/w; } } [x,value] ```

Dan