Given two curves by sets of waypoint (with direction). Is there any way to tell if one curve is on the left or right side of another? And if possible, make it fast.
red/green curves: waypoints to be judged. Green: reference line:
At first, for each waypoint in the curve, I found its nearest neighbor vector to the other vector. And then find its relative position (left or right). However, if the amount of waypoints is huge, it'll be quite slow. And there are many corner cases. Maybe some algorighms about semiplane will help.
Any idea is welcome, many thanks.