I think the answer to this depends on your definition of circular motion and how you intend to use it. For example, do you want to know how many degrees the userβs finger passes in a circle? Or, do you only care about completing the circle? What is the degree of accuracy you require? Do you want the movement to be interrupted, or should it be more than touching> drawing a circle> (for example, one movement)?
One approach would be to define a bundle of rectangular zones along a circle and detect if the user touches them sequentially. This can give you direction and a rough indication of the angle.
Another approach is to keep the points between touching and touching up, and also filter and fit the curve to find out which shape is approximated by the points. First low-pass filter using a basic FIR filter, and then look at dx and dy from point to point. A circle (like a series of arcs) must be within a certain range of changes in the slope from point to point, otherwise you have a different shape.
Another approach is to use a neural network to take points and tell you what the shape looks like.
source share