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

5 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

Bruno Luong
Bruno Luong am 22 Apr. 2022
Bearbeitet: Bruno Luong am 22 Apr. 2022
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.

Weitere Antworten (0)

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by