How to do special gestures on iPhone


I know it is no simple question, but I need some guidelines.. and I know others are curious.

Im making a little game where I want to do some different gestures which will result in some different actions..

e.g. I wanna draw the symbol/number 8 on the iPhone which will result in a kick.. Other gestures could be circle or just a line and so on..

I guess I have to cache the Touch and compare it with the formel of an circle or the number 8..

but how to get started?

Guess no one will answer, but I found a little myself:

Heres the basics in how to detect a circle:

So I guess theres nothing but hard work to solve this.

Texel has an example gesture program here:

It marks you on how closely you can draw the same shape by dragging the mouse. You can PM him for the specifics but the mouse positions are sampled while the button is held down. You can set a tolerance for different shapes to try and match the gesture being used. Obviously start with the easy ones like L shapes and straight lines.