0

Having UIBezierPath made of curves that connect between points A,B,C,D,E,F,G, and a single point X which is located on the path, how can one programatically check between which 2 points (A-G) the point X is located?

Many thanks!

its me
  • 231
  • 2
  • 7
  • Similar to this: http://stackoverflow.com/questions/13999249/uibezierpath-intersect – Nick Terry Aug 22 '13 at 18:33
  • 1
    @NickTerry: I don't think that question helps here (even if I wrote the answer :-) That question is only about intersection of Bezier curves. - Here you have to check if a given *point* is in the vicinity of a *curve* (within some precision). For a straight line segment that should be easy. For a quadratic Bezier curve I suggested an algorithm here: http://stackoverflow.com/a/17125493/1187415. For a cubic Bezier curve it might be more complicated. – Martin R Aug 22 '13 at 18:55
  • The question might not have a unique answer. If the path intersects itself, the intersection point could belong to two different path segments. – Martin R Aug 22 '13 at 19:04
  • can you add some images to explain what you mean? – Mike 'Pomax' Kamermans Aug 23 '13 at 00:59

0 Answers0