% ppvol
x = [1;1/3];
y = [1/4; 5/4];
z = x + y;
plot([0 x(1)],[0 x(2)],'k','linewidth',2)
hold on
plot([0 y(1)],[0 y(2)],'k','linewidth',2)
plot([y(1) z(1)],[y(2) z(2)],'k','linewidth',2)
plot([x(1) z(1)],[x(2) z(2)],'k','linewidth',2)

text(-.05,-.05,'0','fontsize',14)
text(.05,.075,'\theta','fontsize',16)
text(x(1)+.05,x(2),'u','fontsize',14)
text(y(1)-.1,y(2),'v','fontsize',14)
text(z(1)+.05,z(2),'u+v','fontsize',14)
text(1/16,3/2,'(A)','fontsize',20)

plot([3/5 y(1)],[1/5 y(2)],'k--')
axis equal
axis off
hold off



% now play with [2 -1;-1 2]
figure(2)
x = [1;1/3;1/4];

y = [1/4; 5/4;1/5];

xcy = cross(x,y);

z = x + y;
plot3([0 x(1)],[0 x(2)],[0 x(3)],'k','linewidth',2)
hold on
text(x(1),x(2),x(3)+.1,'u','fontsize',14)
text(y(1),y(2),y(3)+.1,'v','fontsize',14)
plot3([0 y(1)],[0 y(2)],[0 y(3)],'k','linewidth',2)
plot3([y(1) z(1)],[y(2) z(2)],[y(3) z(3)],'k','linewidth',2)
plot3([x(1) z(1)],[x(2) z(2)],[x(3) z(3)],'k','linewidth',2)

plot3([0 xcy(1)],[0 xcy(2)],[0 xcy(3)],'k','linewidth',2)
text(xcy(1),xcy(2),xcy(3)+.1,'u\timesv','fontsize',14)

w = [1/4; 1/3; 1];
plot3([0 w(1)],[0 w(2)],[0 w(3)],'k','linewidth',2)
text(w(1),w(2),w(3)+.1,'w','fontsize',14)
plot3([x(1) x(1)+w(1)],[x(2) x(2)+w(2)],[x(3) x(3)+w(3)],'k','linewidth',2)
plot3([y(1) y(1)+w(1)],[y(2) y(2)+w(2)],[y(3) y(3)+w(3)],'k','linewidth',2)
plot3([z(1) z(1)+w(1)],[z(2) z(2)+w(2)],[z(3) z(3)+w(3)],'k','linewidth',2)
plot3([w(1) x(1)+w(1)],[w(2) x(2)+w(2)],[w(3) x(3)+w(3)],'k','linewidth',2)
plot3([w(1) y(1)+w(1)],[w(2) y(2)+w(2)],[w(3) y(3)+w(3)],'k','linewidth',2)
plot3([y(1)+w(1) z(1)+w(1)],[y(2)+w(2) z(2)+w(2)],[y(3)+w(3) z(3)+w(3)],'k','linewidth',2)
plot3([x(1)+w(1) z(1)+w(1)],[x(2)+w(2) z(2)+w(2)],[x(3)+w(3) z(3)+w(3)],'k','linewidth',2)

% text(-.05,-.05,'0','fontsize',14)
% text(.05,.075,'\theta','fontsize',16)
% text(x(1)+.05,x(2),'u','fontsize',14)
% text(y(1)-.1,y(2),'v','fontsize',14)
% text(z(1)+.05,z(2),'u+v','fontsize',14)
text(1/16,3/2,1,'(B)','fontsize',20)

%plot([3/5 y(1)],[1/5 y(2)],'k--')
axis equal
axis off
hold off
