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

2 次查看(过去 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