Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have an image which is positioned at (x=0, y=177, scaleW=1.0, scaleH=1.0) at say $t_0$, and I need it to be positioned at (x=35, y=110, scaleW=0.65, scaleH=0.65) at $t_1$. How do I find keyframes in between, what kind of interpolation should I choose?

scaleW and scaleH denote scaling of the image along the X and Y axis, respectively.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You can scale each parameter linearly. The linear interpolation between $f(t_0)=f_0$ and $f(t_1)=f_1$ is

$$f(t)=f_0+\frac{t-t_0}{t_1-t_0}(f_1-f_0)\;.$$

Thus, for example, the interpolation for $y$ would be

$$y(t)=177+\frac{t-t_0}{t_1-t_0}(110-177)\;.$$

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.