function [loop] = get_El_Loop (face) % ------------------------------------------------------ % Get node loop to draw an element by closing to first node. % Draw any interior nodes at the first node. % ------------------------------------------------------ % loop = corners for face line polygon % Drawing connection order for 6 faces % f1 1 2 3 4 & 1 % f2 1 5 6 2 & 1 % f3 2 6 7 3 & 2 % f4 3 7 8 4 & 3 loop = [ 1:3, 1]; % default for face 1 if (face == 2 ) loop = [1, 2, 4, 1]; elseif (face == 3 ) loop = [2, 3, 4, 2]; elseif (face == 4 ) loop = [1, 3, 4, 1]; end % if % end function get_El_Loop for P4