I am programming a random generated spline curve by first generating control points and then interpolate with spicy.splev. Here is an example.
Now I want to check:
a) If the spline is colliding with it self. b) if a) I want to get the angle of intersection.
The points are stored in a numpy array like:
np.array =[[ 1.00000000e+01 -4.65000000e+02]
[ 1.78319153e+01 -4.60252579e+02]
...]
Any idea how to approach this? Would it be an option to check for each line segment if it collides with any other from the spline? Thanks in advance!
Take a look at this article: https://pdfs.semanticscholar.org/7901/adc2981df1f4f1857584da32ef86da9e0928.pdf and also the reference to Lasser in http://web.mit.edu/hyperbook/Patrikalakis-Maekawa-Cho/node112.html
Also: https://math.stackexchange.com/questions/1080824/detection-of-self-intersection-point-of-curve in which @Narasimham cites: https://math.stackexchange.com/questions/338480/find-the-point-where-equations-x-t2-t-and-y-t3-3t-1-cross-itself?rq=1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.