joints = [0 0 0.5 1 1;0 1 2 1 0];
bars=[1 2 2 3 4; 2 3 4 4 5];
plot_truss(joints,bars)