Filling area between two planes in 3d plot
이전 댓글 표시
I'm trying to more or less plot an amorphous blob on a 3d plot. I know the top, and I know the bottom. Is there an easy way to fill the space between? For example, if I have
surf(peaks)
hold on
surf(peaks + 5)
hold off
How could I connect the two planes so it's like a volume?
Thank you so much for your time
채택된 답변
추가 답변 (1개)
Tim Jackman
2015년 9월 3일
One option would be to create an isosurface, but to do that you would need to convert your data into a 3-D gridded data. This link has some more information and a couple examples to follow:
Based on the example you provided, and quick way to fill the space in between the two surfaces would be to apply a patch. For example:
surf(peaks)
hold on
surf(peaks + 5)
hold off
Now place a polygon along one edge by supplying the X, Y, and Z coordinates along with the color you want:
patch([1;1;49;49],[1;1;1;1],[0;5;5;0],[1,0,0])
You can get more information on the patch objects here:
카테고리
도움말 센터 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

