function [bav] = aviao_oct() %colordef('white') %colordef('none') warning off % whitebg('k') % figure x = [[0,1]',[0,0]',[0,0]']; y = [[0,0]',[0,1]',[0,0]']; z = [[0,0]',[0,0]',[0,1]']; plot3(x(:,1), x(:,2), x(:,3),'r--') plot3(y(:,1), y(:,2), y(:,3),'g--') plot3(z(:,1), z(:,2), z(:,3),'b--') xlabel('x [flex/ext]') ylabel('y [abd/aduc]') zlabel('z [rotext/rotint]') bav = eye(3); p1 = (bav(:,1)*.5)*-1; p2 = bav(:,1)*.5; p3 = bav(:,2)*.95; p4 = [0 0 0]'; p5 = bav(:,3)*.2; p6 = bav(:,2)*.5; % ############## Desenho do aviao #################### aviao = [p1';p2';p3';p1']; cauda = [p4';p5';p6';p4';p5';p4']; plot3(aviao(:,1),aviao(:,2),aviao(:,3),'r'); hold on plot3(aviao(:,1),aviao(:,2),aviao(:,3),'r','linewidth',1.5); plot3(cauda(:,1),cauda(:,2),cauda(:,3),'g','linewidth',1.5); plot3(cauda(:,1),cauda(:,2),cauda(:,3),'g'); %material metal % camlight right %light('position',[0 0 2]) hold on axis([-1.1 1.1 -1.1 1.1 -1.1 1.1]) daspect([1 1 1]) %axis vis3d view([135 35]); box on %colordef('white') aviaores = [aviao;cauda]; %rotate3d