Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to solve coordinate related problem.

I have a large set of X,Y coordinates (logged by the GPS device during circuit racing, the driver makes 10-20 laps during one racing session) and a vector (a line that marks start/finish of the circuit/lap).

I need to divide large set of coordinates into sub-sets using intersections with the start/finish vector.

How can I solve this problem?

Thank You

share|cite|improve this question
up vote 1 down vote accepted

Are the subsets supposed to be the those of each lap? Note that your coordinates are really (X,Y,t). If you list them in time order, you can just look for pairs where the segment from $(X_i,Y_i)$ to $(X_{i+1},Y_{i+1})$ crosses start/finish. Is that what you are after?

share|cite|improve this answer
Yes this is what I'm after. I have not thought about time aspect and yes each subset contains coordinates for 1 lap. Thank You! – Daniil Harik Feb 14 '11 at 17:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.