Thank you. But it doesn’t work(
I understood that “sy” works, but not “sx”!
So I separated coorinates to see less code)
Still no guess what is vrong with divide by zero!
layer = "17";
S=100/comp("MapLayers").layer(layer).scale[0];
x1=640;
x2=x1+S*(comp("MapLayers").layer("1").position[0]-comp("MapLayers").layer(layer).position[0]);
t1=1;
t2=5;
if (time <= t1){
sx = x1;
}else if (time > t1 && time < t2){
t = time - t1;
T = t2 - t1;
kx = Math.log(x2/x1)/T;
sx = x1*Math.exp(kx*t);
}else{
sx = x2;
}
sx