You'll have to do some pretty advanced coding for that, but it is possible in my mind. I've thought of a similar system but have never actually created it.
Rough idea -
Create an array representing the width and height of your layout: more cells = higher resolution.
As you swipe, record where your swipe passed through by toggling values in the array.
Compare the array data with your accepted patterns to do actions <- This is the hard part.
You'll have to have a certain leeway for your comparisons - after all, everyone draws a different shaped/sized circle. Also they might start in different places, or even put their circle in different places on the screen.
To fudge it a bit I would actually check for a more specific pattern in the array, but have the user input cover more cells, and as long as the pattern is found anywhere in the array the action would fire.
A second method would involve recording the maximum values your swipe coordinates reach and when they reach them - basically record corners/vertices in your drawing, and compare the locations of those with each other to match patterns. This is how swype-style text input on smartphone keyboards work.
Either way is a pretty large task to undertake.