function plotDisplacements_L1rect(x,e,u)

% plotDisplacements_L1rect(x,e,u)
%            displays vertical displacements over rectangulation.

ne = size(e,2);

for i=1:ne
    ei = e(:,i);
    ui = u(ei);

    xi1 = [x(:,ei(1));u(ei(1))];
    xi2 = [x(:,ei(2));u(ei(2))];
    xi3 = [x(:,ei(3));u(ei(3))];
    xi4 = [x(:,ei(4));u(ei(4))];
       
    plot3([xi1(1),xi2(1)],[xi1(2),xi2(2)],[xi1(3),xi2(3)]);
    hold on
    plot3([xi2(1),xi3(1)],[xi2(2),xi3(2)],[xi2(3),xi3(3)]);
    plot3([xi3(1),xi4(1)],[xi3(2),xi4(2)],[xi3(3),xi4(3)]);
    plot3([xi4(1),xi1(1)],[xi4(2),xi1(2)],[xi4(3),xi1(3)]);
end
hold off
