How to make Triangle to Triangle Intersection Algorithm ??

조회 수: 4 (최근 30일)
토즈 토즈
토즈 토즈 2021년 11월 16일
답변: Matt J 2021년 11월 17일
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]);
  댓글 수: 1
토즈 토즈
토즈 토즈 2021년 11월 17일
Really thx But I want Intersection in 3D space Can U one more help for me??

댓글을 달려면 로그인하십시오.


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