*On 29/06/2014 at 18:10, ***xxxxxxxx** wrote:

Yes, computers are stupid. It is the human telling the computer what to do that makes them appear magical (or intelligent). You need to, as Denzel said in 'Philadelphia', talk to it like it's a two year old. Break down the problem into its most infinitesimal parts and work out each one in turn to form a system that systematically solves the problem.

In this case, you have to apply some mathematical and logical approaches. What information do you have (constants and known data) and what variables are there and how do you use them to solve your problem. You know the point (for simplicity) from which to start. Then you should have some vector or rotational vector/matrix to describe the direction. Now you have to determine what other information can be pooled or calculated to make the solution reasonable. For instance, I would surmise that, no matter which direction the vector points, the next level of selection would be in the scope of the point's nearest point neighbor. So, you must determine how to remove the n number of points directly surrounding the point in question to satisfy the direction condition best. For this simplistic example, it could be as easy as elimination first by half-plane, then by quadrant, then by some angular tolerance of the vector (+/-22.5 degrees) until you find the best candidate. Or it could come done to a simple distance of the next point to the selected one by minima. My thinking seems to be that there are multiple solutions and you either have to allow for differents ones or chose among them for the one that satisfies your expectations the best.