Sweetness! Two things --
Firstly, what's the rule for determining corners? It works great for right angles and smaller angles, but it started to fall apart when I drew a hexagon. I also notice it's possible for a shape to have no corners at all (eg a circle) and that would end suboptimally as I believe it would make the gesture detector break entirely.
Secondly, I think that the first and last points should be considered the same if close enough (in order to deal with closed shapes). Corner detection should happen here too, as a drawn triangle currently only has two corners.
Me likey so far though.
Firstly, what's the rule for determining corners? It works great for right angles and smaller angles, but it started to fall apart when I drew a hexagon. I also notice it's possible for a shape to have no corners at all (eg a circle) and that would end suboptimally as I believe it would make the gesture detector break entirely.
Secondly, I think that the first and last points should be considered the same if close enough (in order to deal with closed shapes). Corner detection should happen here too, as a drawn triangle currently only has two corners.
Me likey so far though.
<a href='http://www.mediafire.com/?ya93ndnqfewqp9a' class='bbc_url' title='External link' rel='nofollow external'>http://www.mediafire...ya93ndnqfewqp9a</a>
The next step is to group together consecutive corners and non-corners. A group of consecutive corners will be combined into a single point by averaging their locations. A group of consecutive non-corners will be treated as a line connecting two corners or endpoints, and will have a "curvature" value determined by averaging the distances of the points in the line from the actual line and dividing by the length of the line.