FreeHand -> Perfect geometry

Miscellaneous Forums/General Discussion/FreeHand -> Perfect geometry

I'm fiddling around with a couple of ideas of a game and need your help guys.
Do anyone of you know how to calculate freehand drawings into simple 2d primitives?
What I mean is basically like in Flash, or these physics techdemos you've probably seen where someone is by freehand drawing a somewhat reasonable cube and then the application interprets it as a cube and makes a 2D vector cube out of it.

Even better, anyone have any great links about this?

Go on, even if you don't know, just comment below how you would approach the technique. It's getting tricky when it comes towards circle/cube and such.

"Mouse gesture" is what you're looking for ;)

Kind of like rotoscoping, or those `convert an image to polygons` type of thing.

here's an example that has shape recognition and physics.

http://www.youtube.com/watch?v=d7eGypGOlOc

As for how I would do it, I would look at mouse gesture stuff as mentioned above.

I think it would be start quite simply by creating a node/joint where the mouse touches down and another where the mouse (or whatever input device you're using) lifts up or changes direction. I'd probably put some sort of threshold in for the direction change so once the next point on the line deviates from the average slope of the line by a certain amount then drop in a new joint. If you use a physics lib it would be dead easy. Even if you don't you could use some basic physics principles to get nice results.