简体   繁体   中英

How to detect self-collision in Spline Curve?

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!

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM