I have developed a spinner view for an Android application. It's like the spinner wheel on the Price Is Right with Bob Barker (If you're not familiar with that show watch this video).
I am looking to write a mathematical function that realistically computes the drag as the wheel spins around. I don't want the thing to go on forever of course.
When a user "flicks" the wheel up or down, depending on the speed of the flick, the widget will continue at the same rate. I need to add an element of drag as some sort of exponential function with respect to time.
I am thinking of two directions to go with this. Either by using an inverse exponential S(s, t)
where s
is the original speed and t
is time. Or, I can use a logarithmic function to compute drag, and subtract that from the original speed.
What would you do? Do you have any suggestions for implementing drag realistically?