简体   繁体   English

在图中搜索两个样条线的交点

[英]Searching intersection point of two splines in graph

I am stuck at this point. 我被困在这一点上。 I am trying to find where two lines in graph intersects. 我试图找到图形中的两条线相交的位置。 I have 10 points for each spline, but they intersects between this points. 每个样条线都有10个点,但是它们在这些点之间相交。

I am using c# graph. 我正在使用C#图形。 (System.Windows.Forms.DataVisualization.Charting.Chart chart2;) Do you have an idea how to solve this? (System.Windows.Forms.DataVisualization.Charting.Chart chart2;)您有解决此问题的想法吗?

Here is this situation. 这是这种情况。 Points are measured manually so there is minimum posibility that it will intersetcs on this given points. 点是手动测量的,因此在此给定点上相互交叉的可能性最小。

在此处输入图片说明

Refine the splines to the degree of precision you need and then intersect (straight) line pairs, as Matthew suggested. 按照Matthew的建议,将样条曲线精炼到所需的精度,然后相交(直线)线对。 This can be done quite efficient if you chose the right data structure to store the line segments, so that it supports fast range queries (kd-tree perhaps?). 如果选择正确的数据结构来存储线段,则可以非常有效地完成此操作,以便它支持快速范围查询(也许是kd-tree?)。

Doing it analytically is going to be really hard, I guess. 我想,分析性地做起来真的很困难。

I found the solution, I used least squares theory and polynomial function to represent equation of curve and after that solve the equation. 我找到了解决方案,我用最小二乘理论和多项式函数来表示曲线方程,然后求解方程。 If anybody needs solution just write me. 如果有人需要解决方案,请写信给我。

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

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