Sep 27 2007
Engineering Multi-Touch Interfaces
Michal Migurski at tecznote has created a demo (complete with source code) of the two-finger motion of multi-touch interfaces. Michal explains how the implementation isn’t as straight-forward as it seems.
“There are two main difficulties: figuring out how precisely the two contacts should act on an object, and then translating those into the appropriate placement, sizing, and rotation of the object. We start with two rules: the object can be moved and turned, but not skewed, squashed, or otherwise deformed, and the fingers should stay in contact with the same points on the object throughout their movement.
“Both troubles can be solved with the use of affine transformation matrices, the closest thing computer science has to a true, working hammer. I’ve described before how to derive a complete transformation from just three example points, so we need to figure out where to place a third point to complement the two fingers above. If we assume that the line between the two fingers is the hypotenuse of a right equilateral triangle, the we can guarantee a stable position for the invisible third finger by working out the two legs of the complete triangle. See it in action above when you drag.”
Source: tecznotes, September 27, 2007
Full story: gefingerpoken