How to find intersection points of multiple line segments in 3D?

3 ビュー (過去 30 日間)
Niharika_dc
Niharika_dc 2022 年 6 月 26 日
編集済み: Matt J 2022 年 6 月 26 日
Hi! I wanted to randomly plot multiple line segments in 3D and find the intersection points of the line segments, if any

回答 (1 件)

Matt J
Matt J 2022 年 6 月 26 日
編集済み: Matt J 2022 年 6 月 26 日
If you generate them randomly, they will not intersect. However, generatig and plotting them is no problem,
numlines=5;
for i=1:numlines
line(rand(2,1),rand(2,1), rand(2,1)); hold on
end
hold off; view(3)
xlabel X, ylabel Y, zlabel Z

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by