I have a list L=[pt(0,0), pt(1,0), ecc..]
I have a predicate giveMeAngleBetween2Points/3 that gives me the angle between 2 points.
Now I need a predicate deleteSameAnglePoints/2that is like:
deleteSameAnglePoints(L, MinimumPoint)
where MinimumPoint is the point of the List L by my personal criteria, now I need to take my list L and delete all the points that have the same angle with MinimumPoint by calling predicate giveMeAngleBetween2Points(MinimumPoint, Point, Result), but taking the last one of them.
Example:
L = [(0,0), (0,1), (0,2), (0,5), (3,4), (5,6), (5,8), (8,9), (10,9)]
Now, if (0,0), (0,1), (0,2), (0,5) have the same angle with after calling predicate giveMeAngleBetween2Points(MinimumPoint, Point), and also
(5,6), (5,8) has the same angle between them, and also (8,9), (10,9) has the same angle between them, my result should be:
L = [(0,5), (3,4), (5,8), (10,9)].