Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/britg/MultistrokeGestureRecognizer-iOS
A library for defining and detecting multi-stroke gestures created through touch-input on iOS devices
https://github.com/britg/MultistrokeGestureRecognizer-iOS
Last synced: 3 months ago
JSON representation
A library for defining and detecting multi-stroke gestures created through touch-input on iOS devices
- Host: GitHub
- URL: https://github.com/britg/MultistrokeGestureRecognizer-iOS
- Owner: britg
- License: mit
- Created: 2011-05-01T15:23:56.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2017-02-02T22:10:49.000Z (almost 8 years ago)
- Last Synced: 2023-10-20T18:32:05.698Z (over 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 6.79 MB
- Stars: 274
- Watchers: 24
- Forks: 57
- Open Issues: 3
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
- awesome - MultistrokeGestureRecognizer-iOS - A library for defining and detecting multi-stroke gestures created through touch-input on iOS devices (etc)
- awesome - MultistrokeGestureRecognizer-iOS - A library for defining and detecting multi-stroke gestures created through touch-input on iOS devices (etc)
README
# Overview
This is an iOS implementation of the [N Dollar Gesture Recognizer](http://depts.washington.edu/aimgroup/proj/dollar/ndollar.html).
More info:
- [The research](http://britg.com/2011/05/14/complex-gesture-recognition-in-ios-part-1-the-research/)
- [Explanation of this implementation](http://britg.com/2011/06/17/complex-gesture-recognition-in-ios-part-2-the-ios-implementation/)
- [Understanding the score that's returned](http://britg.com/2011/07/17/complex-gesture-recognition-understanding-the-score/)Tools:
- [Shape Editor](http://lucalaiho.altervista.org/joomla/shape-editor) - A java app for creating shapes and exporting them as JSON files
# N Dollar Recognizer
View the javascript implementation [here](http://depts.washington.edu/aimgroup/proj/dollar/ndollar.html)
Anthony, L. and Wobbrock, J.O. (2010). [A lightweight multistroke recognizer for user interface prototypes](http://faculty.washington.edu/wobbrock/pubs/gi-10.2.pdf). Proceedings of Graphics Interface (GI '10). Ottawa, Ontario (May 31-June 2, 2010). Toronto, Ontario: Canadian Information Processing Society, pp. 245-252.
# Detecting Glyphs
A Glyph is a user-defined set of Strokes, which are in turn just an array of points. When a Glyph is initialized, it first permutes through all the possible combinations of Stroke directions/order necessary to recreate itself. It also resamples and resizes itslef into a bounding box. Finally, a Glyph creates unistrokes (Templates) from all the calculated multistrokes.
The Detector collects user input (an array of points) and triggers a comparison of the input against all of the Glyph Templates. Each Template is given a score, and the Template with the highest score is considered the match. The Glyph that the Template belongs to is announced to the Delegate.
# Creating Glyphs
A Glyph can either be defined manually by defining its Strokes and initializing a Glyph with those Strokes. Or, a newly created Glyph can be fed user input and create itself when ready.
# License
Copyright (c) 2011 Brit Gardner
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.