フィルターのクリア

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

3 ビュー (過去 30 日間)
Timothy Mountford-Lister
Timothy Mountford-Lister 2022 年 4 月 22 日
編集済み: Bruno Luong 2022 年 4 月 22 日
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 Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by