how to calculate a negative acceleration?

后端 未结 15 1774
既然无缘
既然无缘 2021-02-08 12:11

I\'m implementing the scrolling behaviour of a touch screen UI but I\'m too tired in the moment to wrap my mind around some supposedly trivial piece of math:

y (         


        
15条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-08 12:32

    Acceleration is the first order derivative of velocity and second order derivative of distance. Your graph looks like a second order parabola something like C-k*x^2 for some constants C and k. If y is really distance you need a=-2k, if y is velocity you need a=-2kx. In either case velocity v(x) = V0 + a(x)*x. (Where x is actually time. I am following your convention and not using t.)

提交回复
热议问题