Filling area between two planes in 3d plot
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (1)
Tim Jackman
le 3 Sep 2015
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:
Catégories
En savoir plus sur Surface and Mesh Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

