Plot projections on XY , XZ , YZ planes of 3D volume ( triangulated set of samples of 3D body's surface ) using contour function

6 views (last 30 days)
Hello,
I have 3 vectors x_ , y_ , z_ of surface samples of some 3D body that I succeed to approximately plot using matlab by following script sequence:
figure
tri = delaunay3(x_,y_,z_);
axis tight;
hold on;
grid on;
trisurf(tri,x_,y_,z_);hold on;
shading interp;
shadow(1);
...
shadow(6);
using shadowplot from :
I am trying to add necessary custom changes to shadowplot function in order to draw projections using contour as in : http://fileslap.com/94s/plot_
inside shadowplot function points for projections got using next commands:
a.get handle:
kidsp = findobj(hAx,'Type','patch');
b.get patch (graphics object):
for ii=1:length(kidsp)
hPat = kidsp(ii);
c.get patch data:
patdata = get(hPat,{'XData','YData','ZData'});
size of each patdata{1-3} is 4 on 1255 for the instance.
Inside the shadowplot function the shadows are drawn ok using next command:
hp(ii) = patch(patdata{1},patdata{2},patdata{3},[.1 .1 .1]);
Does anybody know what points and how to get them from patdata{..} structure should be passed to contour(...) function to draw the projections as in
? Thanks in advance.

Answers (0)

Categories

Find more on Contour Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!