Intersection area polygon 3D

조회 수: 5 (최근 30일)
Leandro Bem
Leandro Bem 2021년 3월 30일
편집: Matt J 2021년 3월 31일
Hi!
I need to calculate the area of intersection of two polygons (rectangles) given by their 3D vertices (x, y, z).
- Polygon 1 has the vertices A (x1, y1, z1), B (x2, y2, z2), C (x3, y3, z3) and D (x4, y4, z4);
- Polygon 2 has the vertices P (x5, y5, z5), Q (x6, y6, z6), R (x7, y7, z7) and S (x8, y8, z8).
Is there a function that solves my problem?
Can someone help me?
  댓글 수: 7
Matt J
Matt J 2021년 3월 31일
편집: Matt J 2021년 3월 31일
Well, I think we need more elaboration on the projection process considered here. I don't see what kind of projection could be area preserving, unless Panel 1 is in fact rotated into the plane of Panel 2, but if that's the case, how is the axis of rotation chosen?
Adam Danz
Adam Danz 2021년 3월 31일
> I know all the coordinates (x, y, z) of the 4 vertices of Panel 1, Panel 2 and the Shadow.
So, you know the coordinates of the shadow and the shadow is on the same plane as one of the surfaces, is that correct? Isn't that a simple 2D problem of computing the overlap? What am I missing?

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

답변 (1개)

Matt J
Matt J 2021년 3월 30일
편집: Matt J 2021년 3월 31일
b1=(Q-P)/norm(Q-P);
b2=(S-P)/norm(S-P);
pgon1=polyshape( ([A;B;C;D]-P)*[b1;b2].' )
pgon2=polyshape( ([P;Q;R;S]-P)*[b1,b2].' );
Area = area(intersect(pgon1,pgon2))
  댓글 수: 2
Leandro Bem
Leandro Bem 2021년 3월 31일
Thanks for your help, but with this suggestion I am not getting the correct answer.
Matt J
Matt J 2021년 3월 31일
편집: Matt J 2021년 3월 31일
I know all the coordinates (x, y, z) of the 4 vertices of Panel 1, Panel 2 and the Shadow.
If you replace ABCD with the coordinates of the shadow vertices, it should work.

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

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by