Python Forum

Full Version: detect if two lines are crossing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey
My project is to compute a racing line using mathematical functions
I want to know if my trajectory is staying inside the track limits or not (as shown in the pic1)
[attachment=2495]
So a function that returns True for the red traj and False for the blue one (also pic 1)


I have no idea how to can do that, any suggestions ?
thanks
Numerically? Evaluate functions at X, Y (or f and g, or whatever are the variables for your function) and compare to some bounds.
You could perhaps find and try existing modules (which I don't know) such as fast-crossing in Pypi. This video looks impressive.