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
0 件のコメント
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Lighting, Transparency, and Shading についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!