1

in my app, I let user touch and move to draw an arc. After drawing, I got a set of points. Is there any way to determine that user draw the arc counterclockwise or reverse counter clock wise?

2 Answers2

1

If it is indeed a circle you need only find an expression in a form that defines an angle $\theta$ between the initial point and later points.

Once you've got that angle check if $\tan \frac{1}{4}\theta$ is increasing. If it is, it is moving counter clockwise.

Note this only works for angles between $0$ and $2 \pi$

kinbiko
  • 412
  • 5
  • 15
0

The set of points will obviously be stored in an order. Circular array/list or even a plain array. Just compare the coordinates of consecutive points.

Suzuka
  • 1