goes to show that we don&#39;t need a physics engine.<br><br><div><span class="gmail_quote">On 3/25/07, <b class="gmail_sendername">adrian cockcroft</b> &lt;<a href="mailto:adrian.cockcroft@gmail.com">adrian.cockcroft@gmail.com
</a>&gt; 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 &quot;mass&quot; 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 &lt;<a href="mailto:fthiery@gmail.com">fthiery@gmail.com</a>&gt; wrote:<br>&gt; I&#39;ll add here sotg from an off-list msg;<br>&gt;<br>&gt; In fact we have the position given by the touchscreen : [ x(t) ; y(t) ]
<br>&gt; speed is: [ (x(t&#39;) - x(t)) / (t&#39; -t) ; (y(t&#39;) - y(t)) / (t&#39; -t) ] -<br>&gt; friction_factor*(t&#39; - t)<br>&gt;<br>&gt; ... Where the friction_factor is in [0 ; 1]<br>&gt;<br>&gt; If we want acceleration, then we have to integrate the equation once.
<br>&gt;<br>&gt; Shit, i gotta look into my college courses, it&#39;s terrible how fast it<br>&gt; fades away :-p<br>&gt;<br>&gt; I&#39;m not sure we really need to take acceleration into account.<br>&gt;<br>&gt; The changes to bring to the standard gtk scrolling are:
<br>&gt; - consider the list as scrollable (not just the scroll item)<br>&gt; - change the scrolling &quot;stop&quot; behaviour (when the user stops touching<br>&gt; the screen) like this: if (last_cursor_speed &gt; 0),<br>
&gt; continue_scrolling(last_cursor_speed)<br>&gt; - when touching the moving list again, stop the scrolling immediately<br>&gt; - addition of friction may be a plus, for a more<br>&gt; &quot;wheel-of-fortune&quot;-like experience
<br>&gt;<br>&gt; _______________________________________________<br>&gt; OpenMoko community mailing list<br>&gt; <a href="mailto:community@lists.openmoko.org">community@lists.openmoko.org</a><br>&gt; <a href="http://lists.openmoko.org/mailman/listinfo/community">
http://lists.openmoko.org/mailman/listinfo/community</a><br>&gt;<br></blockquote></div><br>