goes to show that we don't need a physics engine.<br><br><div><span class="gmail_quote">On 3/25/07, <b class="gmail_sendername">adrian cockcroft</b> <<a href="mailto:adrian.cockcroft@gmail.com">adrian.cockcroft@gmail.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The physics comes in if you give the slider "mass" and intertia. Then
<br>it accelerates and decelerates depending upon how hard you push it and<br>how much friction there is.<br><br>The acceleration is driven by the difference in position of the touch<br>point and the slider as you move the touch point and the slider lags
<br>the movement. Move the touch point slowly and the slider follows it,<br>flick it fast and the slider will get a bigger kick, accelerate more<br>then coast to a halt and have the overshoot that you want.<br><br>Adrian<br>
<br>On 3/24/07, Florent THIERY <<a href="mailto:fthiery@gmail.com">fthiery@gmail.com</a>> wrote:<br>> I'll add here sotg from an off-list msg;<br>><br>> In fact we have the position given by the touchscreen : [ x(t) ; y(t) ]
<br>> speed is: [ (x(t') - x(t)) / (t' -t) ; (y(t') - y(t)) / (t' -t) ] -<br>> friction_factor*(t' - t)<br>><br>> ... Where the friction_factor is in [0 ; 1]<br>><br>> If we want acceleration, then we have to integrate the equation once.
<br>><br>> Shit, i gotta look into my college courses, it's terrible how fast it<br>> fades away :-p<br>><br>> I'm not sure we really need to take acceleration into account.<br>><br>> The changes to bring to the standard gtk scrolling are:
<br>> - consider the list as scrollable (not just the scroll item)<br>> - change the scrolling "stop" behaviour (when the user stops touching<br>> the screen) like this: if (last_cursor_speed > 0),<br>
> continue_scrolling(last_cursor_speed)<br>> - when touching the moving list again, stop the scrolling immediately<br>> - addition of friction may be a plus, for a more<br>> "wheel-of-fortune"-like experience
<br>><br>> _______________________________________________<br>> OpenMoko community mailing list<br>> <a href="mailto:community@lists.openmoko.org">community@lists.openmoko.org</a><br>> <a href="http://lists.openmoko.org/mailman/listinfo/community">
http://lists.openmoko.org/mailman/listinfo/community</a><br>><br></blockquote></div><br>