I feel like this is just as much a mathematics question as it is a programming question so I figured it couldn't hurt to cross post my question here.
Original Post: https://stackoverflow.com/questions/10000590/detect-kinks-in-parallel-lines-to-bezier-curves
I was hoping someone could help me figure out a computationally inexpensive method for detecting kinks in a line drawn parallel to a Bezier curve as you can see here

What I would like to do is be able to determine the intersection of the kink, the segment with a starting point before the intersection and the first segment with an ending point after the kink. This way I can simply remove any unnecessary segments and adjust the first and last segments to meet at the intersection.
Apologies if I'm using the incorrect terms. But as far as I understand it the way I'm positioning these segments is by determining the unit vector of the segments for the Bezier curve (yellow) and multiplying it by the offset and finding the normal vector to create two new start and end points for the offset segment (white).
Mathematics isn't my strong suit so I'm hoping someone can give me a push in the right direction.
EDIT: The image has actually been resized by HTML so if you're having a hard time seeing what I'm talking about here's the direct link: https://i.stack.imgur.com/xtils.png
If you can't find a better solution, here's a stopgap approach that might work adequately:
You might be able to adapt the RepRap offset() method source, or at least pick up some tips from the theoretical description of the RepRap offset() method.
You might think that we could directly nudge the resulting line segments, but there's a lot of fiddly work involved getting the ends of the line segments to match back up again -- especially in the case you pointed out, when line segments entirely disappear. It's apparently easier to:
Related: the "Offseting a Bezier curve" question.