Force Of Attraction Without Bounce

89 Views Asked by At

When programming animations controlled by mouse / touch gestures, I like to add some smoothness to the interaction. usually I work with position $q$ and velocity $p$ for the animation, and there is an attractor $q_a$, which is directly controlled by the gestures, to which the position is drawn to with force $a(q_a-q)$. Now I wonder what functions $a$ work for this force of attraction, so that I have no bounce effect, given that there is some drag $d>0$ which reduces the velocity in each frame.

To put in terms of differential equations, I want to know for which functions (if any) $a:\mathbf{R}\to\mathbf{R}$ the solutions to $\dot{q} = p$; $\dot{p} = a(-q) - dp$ are monotonic and approach $0$ for any initial condition with $p(0)= 0$.