
%
% draw a frame sticks and joints
%

ax = [0 1 .75 1 .75];
ay = [0 0 .15 0 -.15];

figure(1)
fill([-1 6 6 -1],[0 0 -1 -1],0.9*[1 1 1])
hold on
plot([0 0],[0 5],'k.-','linewidth',2,'markersize',32)
text(.2,2.4,'k_1','fontsize',16)

plot(ax,ay+5.3,'k','linewidth',1); 
plot(ay,ax+5.3,'k','linewidth',1)
text(1.1,5.4,'f_1','fontsize',16)
text(.3,6,'f_2','fontsize',16)

plot([0 5],[5 5],'k.-','linewidth',2,'markersize',32)
text(2.4,4.5,'k_2','fontsize',16)

plot([5 5],[0 5],'k.-','linewidth',2,'markersize',32)
text(4.5,2.4,'k_3','fontsize',16)

plot(ax+5.,ay+5.3,'k','linewidth',1) 
plot(ay+5,ax+5.3,'k','linewidth',1)
text(1.1+5,5.5,'f_3','fontsize',16)
text(.3+5,6,'f_4','fontsize',16)

text(2,2.5,'(A)','fontsize',24)

axis equal
axis off
hold off

figure(2)
fill([-1 6 6 -1],[0 0 -1 -1],0.9*[1 1 1])
hold on
plot([0 0],[0 5],'k.-','linewidth',2,'markersize',32)
plot([0 1],[0 7],'k.--','linewidth',2,'markersize',32)

text(0.2,7,'x_1','fontsize',16)
text(-.1,6,'x_2','fontsize',16)

plot([0 5],[5 5],'k.-','linewidth',2,'markersize',32)
plot([1 4],[7 7],'k.--','linewidth',2,'markersize',32)

plot([5 5],[0 5],'k.-','linewidth',2,'markersize',32)
plot([5 4],[0 7],'k.--','linewidth',2,'markersize',32)

text(4.5,7,'x_3','fontsize',16)
text(4.9,6,'x_4','fontsize',16)

text(2,2.5,'(B)','fontsize',24)

axis equal
axis off
hold off
