function cantilever_beam_plot(values)
N = length(values)/2;
for k = 0:N-1
[X Y Z] = data_rect3(values(2*N-k),values(N-k),k);
plot3(X,Y,Z); hold on;
end
hold off;
xlabel('width')
ylabel('height')
zlabel('length')
return;
function [X, Y, Z] = data_rect3(w,h,d)
X = [-w/2 w/2 w/2 -w/2 -w/2];
Y = [-h/2 -h/2 h/2 h/2 -h/2];
Z = [d d d d d];
X = [X -w/2 -w/2 -w/2 -w/2 -w/2];
Y = [Y -h/2 -h/2 h/2 h/2 -h/2];
Z = [Z d d+1 d+1 d d];
X = [X -w/2 w/2 w/2 -w/2 -w/2];
Y = [Y -h/2 -h/2 h/2 h/2 -h/2];
Z = [Z d+1 d+1 d+1 d+1 d+1];
X = [X w/2 w/2 w/2 w/2 w/2];
Y = [Y -h/2 h/2 h/2 -h/2 -h/2];
Z = [Z d+1 d+1 d d d+1];