I've done that before by finding the previous and current distances between the two fingers, and the angle between the previous and current lines. Then I picked some empirical thresholds for that distance delta and angle theta, and that has worked out pretty well for me If the distance was greater than my threshold, and the angle was less than my threshold, I scaled the image. Otherwise I rotated it.2 finger scroll seems easy to distinguish BTW in case you are actually storing the values, the touches have previous point values already stored CGPoint previousPoint1 = self scalePoint:touch1 previousLocationInView:nil; CGPoint previousPoint2 = self scalePoint:touch2 previousLocationInView:nil; CGPoint currentPoint1 = self scalePoint:touch1 locationInView:nil; CGPoint currentPoint2 = self scalePoint:touch2 locationInView:nil.
I've done that before by finding the previous and current distances between the two fingers, and the angle between the previous and current lines. Then I picked some empirical thresholds for that distance delta and angle theta, and that has worked out pretty well for me. If the distance was greater than my threshold, and the angle was less than my threshold, I scaled the image.
Otherwise I rotated it. 2 finger scroll seems easy to distinguish. BTW in case you are actually storing the values, the touches have previous point values already stored.
CGPoint previousPoint1 = self scalePoint:touch1 previousLocationInView:nil; CGPoint previousPoint2 = self scalePoint:touch2 previousLocationInView:nil; CGPoint currentPoint1 = self scalePoint:touch1 locationInView:nil; CGPoint currentPoint2 = self scalePoint:touch2 locationInView:nil.
Ah, distance is the missing link. I can't believe I didn't think about that. I was only focusing on angles and direction of vector, but distance really is I think the biggest difference.
And I already knew about previous touch (used for zooming), but thanks for pointing it out. – Eli Aug 20 '09 at 15:07.
Two fingers, both moving, opposit(ish) directions. What gesture conflicts with this? Pinch/zoom I guess comes close, but whereas pinch/zoom will start off moving away from a center point (if you trace backwards from each line, your lines will be parallel and close), rotate will initially have parallel lines (tracing backwards) that will be far away from each other and those lines will constantly change slope (while retaining distance).
Edit: You know--both of these could be solved with the same algorithm. Rather than calculating lines, calculate the pixel under each finger. If the fingers move, translate the image so that the two initial pixels are still under the two fingers.
This solves all two-finger actions including scroll. Two-finger scroll or Zoom might look a little wobbly at times since it will do other operations as well, but this is how the map app seems to work (excluding the rotate which it doesn't have).
I like your pixel idea, that would work great with image manipulation. I'm making a game, though, and the rotation gesture rotates the level to a different perspective, which requires some resource loading and the like so it can't be a direct distinction. +1 for the good idea in image cases, though.
– Eli Aug 27 '09 at 0:27.
Some of Apple's allegations, as it wages a patent court battle against Samsung, involve the iPhone's pinch-and-zoom technology. Apple says this technology was new in 2007 when the iPhone debuted. Yesterday, Samsung showed the jury lots of examples of technology that it says predates Apple's.
Last year, Apple accused Samsung in a lawsuit of ripping off some of the technology behind the iPhone and iPad to launch numerous clone devices. Samsung entered into evidence the above photos. The caption read: "In our lightbox application, users can not only move photographs around each with both of their hands, but can also use a simple two-point operation to simultaneously pan, zoom, and rotate the object in one natural and intuitive motion.
A similar interface is offered in a geospatial browsing application, but along with additional gestures to handle navigation in the 3rd dimension.".
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.