Animation with Initial Velocity
Posted
by abustin
on Stack Overflow
See other posts from Stack Overflow
or by abustin
Published on 2010-04-01T00:43:23Z
Indexed on
2010/04/01
0:53 UTC
Read the original article
Hit count: 319
I've been trying to solve this problem for a number of days now but I must be missing something.
Known Variables:
vi = Initial Velocity
t = Animation Duration
d = Distance
The function I'm trying to create: D(t) = the current distance for a given time
Using this information I want to be able to create a smooth animation curve with varying velocity (ease-in/ease-out).
The animation must be able ease-in from an initial velocity.
The animation must be exactly t seconds and must be travel exactly d units.
The curve should lean towards the average velocity with acceleration occurring at the beginning and the end portions of the curve.
I'm open to extra configuration variables.
The best I've been able to come up with is something that doesn't factor in the initial velocity. I'm hoping someone smarter can help me out. ;)
Thank you!
p.s. I'm working with an ECMAScript variant
© Stack Overflow or respective owner