简体   繁体   English

如何检测样条曲线中的自碰撞?

[英]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. 我正在通过首先生成控制点,然后用辣。splev进行插值来编程随机生成的样条曲线。 Here is an example. 是一个例子。

Now I want to check: 现在我要检查:

a) If the spline is colliding with it self. a)如果样条与其自身发生碰撞。 b) if a) I want to get the angle of intersection. b)如果a)我想获得相交角。

The points are stored in a numpy array like: 点存储在numpy数组中,例如:

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 看看这篇文章: https ://pdfs.semanticscholar.org/7901/adc2981df1f4f1857584da32ef86da9e0928.pdf以及http://web.mit.edu/hyperbook/Patrikalakis-Maekawa-Cho/node112.html中对Lasser的引用

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 另外: https ://math.stackexchange.com/questions/1080824/detection-of-self-intersection-point-of-curve(@Narasimham在其中引用): https ://math.stackexchange.com/questions/338480/find 点等式x-t2-t和y-t3-3t-1-自身交叉吗?rq = 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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