How to calculate the point of intersection of two lines in 3D space?
50 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2019 年 4 月 24 日
回答済み: MathWorks Support Team
2019 年 4 月 24 日
How can I calculate the intersection of two 3-dimensional lines?
採用された回答
MathWorks Support Team
2019 年 4 月 25 日
First of all, in 3D space, note that two non-identical lines would not have an intersection point unless they are coplanar. If they are not coplanar, then a "best intersection point" can be estimated, e.g. in a least-squares sense.
For example, either of the following File Exchange functions can be used to perform this calculation:
a) https://www.mathworks.com/matlabcentral/fileexchange/37192-intersection-point-of-lines-in-3d-space
b) https://www.mathworks.com/matlabcentral/fileexchange/59805-line-line-intersection-n-lines-d-space
Please note that these were not authored by MathWorks. In case you have questions specifically about the above 3rd-party File Exchange packages, we would recommend to contact the respective authors.
As an aside, for the 2D case, two non-identical lines will have an intersection unless they are parallel. On approach to calculate the intersection of two 2D lines is to utilize the "polyxpoly" function from the Mapping Toolbox:
Here is another helpful reference page from the Mapping Toolbox documentation:
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!