How to make Triangle to Triangle Intersection Algorithm ??

4 次查看(过去 30 天)
I see Ray-Triangle Intersection Source Code But I want Triangle-Triangle Intersection Code
I cant make that... Please help or Code Supplement
  2 个评论
KSSV
KSSV 2021-11-16
Your question is not clear. Any pictorial example? More information needed.
토즈 토즈
토즈 토즈 2021-11-17
Like this One. But This is Three time Ray Intersect in Ray-Triangle Intersection Algorithm
I want Triangle-Triangle intersection Algorithm and, I want know Ray-Triangle n Triangle-Triangle Algorithm have a difference?

请先登录,再进行评论。

回答(2 个)

Matt J
Matt J 2021-11-16
编辑:Matt J 2021-11-16
triangle1=polyshape([0 0 ; 1 0; 0 1]);
triangle2=polyshape([0 0 ; 1 0; 1 1]);
p=intersect([triangle1,triangle2]);
tiledlayout(1,2)
nexttile; plot([triangle1,triangle2],'FaceColor','r'); ylim([-0.2,1.2]);
nexttile; plot(p,'FaceColor','r'); ylim([-0.2,1.2]);

Matt J
Matt J 2021-11-17
But I want Intersection in 3D space Can U one more help for me??
You can use intersectionHull() in this File Exchange submission:

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by