I have an NSBezierPath. I would like to interpolate along in a way that
interpolate (0) = starting point
interpolate (1) = end point
interpolate (0.5) = middlePoint.
I would like as well a function that provides a normal vector at the point.
I saw a lot of puzzle pieces during my search but nobody offering a full solution in swift. Key problems are:
- how can I ensure that interpolate(0.5) is really in the middle of the path? Do I need to consider the length of the overall path? Will it always be the middle point of the middle path segment? I doubt that. However, good approximations are welcome!
- how do I retrieve the normal vector on such a point?
Many thanks in advance!