randomly
See his previous question :
If it is about this, then i see 4 big problems, an i dont really know how to solve them. I mean, i cant do better then you.
1. If the 'drawing' (that is basically creating sprites) happens in the same loop as the 'checking', then i cant see any easy solutions. Due the fact that you cant read from a newly created object till the next top level event.
2. The drawing happens in lines, segments. Not in dots, points. So, there are no coordinates to check.
3. The solutions for (y) when iterating x are floating numbers. No chance using a 'is the same as' comparison.
4. Iterating x by 1 is relatively still a big sample rate. Even if you clearly see 2 functions intersect, the sample rate will be to big to capture it.
Still assuming it is about the same thing in his previous questions.