How to calculate the CW and CCW direction of finger touch?

Hi all.
the two group datas from my ILI9341 touch screen by finger draw on it, how to get which draw is toward which direction by what calculation please?
Thanks
Adam

Cw:

x1: 82     y1: 3333     
x2: 1527     y2: 1562

CCW:

x1: 3519     y1: 2834     
x2: 2830     y2: 3512

0.0

If 0,0 is top-left and MAXx,MAXy is bottom right:

In section A:
CW: X increases while Y decreases
CCW: X decreases while Y increases

In section B:
CW: X increases while Y remains constant
CCW: X decreases while Y remains constant

Secton C:
CW: X remains constant while Y increases
CCW: X remains constant while Y decreases

(repeat for sections D through I)

screen

1 Like

Seems to me that it would be best to capture 3 data points (say P0, P1, P2). Then convert them to polar coordinates -- with their average used as the center of your polar coordinate system. Then note if theta increases or decreases as you progress from P0 to P1 to P2.

EDIT:
Actually, given the three points, you can determine the center of the circle to use as the origin of the polar coordinate system.

2 Likes

Thanks.
I'll try it.

Thanks.
I'll test it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.