How to find a cross section of a 'Boundary' plot with non planar data?

조회 수: 3 (최근 30일)
Hi MATLAB Community,
I have a boundary which I have plot to create a volume defined from a series of data points in 3D space, as shown by the red volume in the below image, and I am looking to find the area of this volume at the intersection with a plane, as visualised by the blue rectangle. Since the points defining the volume do not lie on distinct planes, I can't select values with a specific Y axis value and create a 2D plot of them. Can anyone point me in the right direction for a method that may be used to create this intersection and find its area?
Thanks,
Tim

채택된 답변

Bruno Luong
Bruno Luong 2022년 4월 22일
편집: Bruno Luong 2022년 4월 22일
Assuming the plane is z=0 (otherwise you should so a solid coordinates transformation to bring to this assumption)
You have to loop on the (triangular) faces and search for face that have 3 vertices with z change sign.
For those faces, pick the 2 edges (it must have 2) that have 2 vetices (x1,y1,z1) and (x2,y2,z2) with changing sign of z.
The intersection to the plane z=0 is :
(x,y) = ((x1,y1)*z2 - (x2,2)*z1)/(z2-z1)
Form a graph that links (x,y), you should get a polygon in 2D. Use polyarea to find the area.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by