If you have 3 or more points, mentioned in a specific order, you can make a polygon out of them and determine if it’s wound cw or ccw ( by calculating z component of a cross product). So [a, b, e] will be wound ccw and [a, e, b] - cw.
In here in the above image i already have a polygon and A and B are the points that divide the polygon into two polygons.
So here i need a way to collect all the points in clockwise direction from point A to point B than all the point in anticlock wise direction from point A to point B
So on the basis of these points i can draw polygon and here one more thing i need to keep the order same as in the picture in the array to keep the shape proper.
If you don’t know the order of points, then it’s hard to tell.
I’m not sure I understand, but if by “collect” you mean “while following the curve from A to B” then you need to follow the curve (mathematically). Basically, if you erase the curve from your picture, how do you know in which order to connect the points to make the polygon, there can be many combinations?
If you know the order, then you already can make two polygons between A and B, one cw and one ccw. Then you can check which one is which.