Sketch - 29 July 07
The idea is to measure the change in velocity and angle over time while you draw. The interesting thing is that the angle increases at a corner (doh)… but the velocity also decreases as you slow down.
Here is a really simple umajin script (sketch.u)which shows how you can simplify a hand drawn shape into a nice hard edged polygon by measuring the local velocity minima (the top of the curve in the blue graph below).
You can see here how 6 points were extracted, using the velocity graph (in blue) to draw the red polygon on top of the much more organic original pentagon I drew. I suspect using the maxima of the change in angle would work equally well, although it may need to be filtered (smoothed) a little.
|