
function ar=arrow(xxx1,xxx2,yyy1,yyy2,sw,m,sss)

x1=xxx1;
x2=xxx2;
y1=yyy1;
y2=yyy2;

dx = x2-x1; 
dy = y2-y1; 
mag=sqrt(dx*dx+dy*dy); 
dx=dx/mag; 
dy=dy/mag; 
xx = -dy; 
yy = dx;

  beta=pi/sss;
  M=m;

   for aa=1:2
	theta = 2*pi-beta;
	x = x2 + M*cos(theta)*dx + M*sin(theta)*xx;
	y = y2 + M*sin(theta)*yy + M*cos(theta)*dy;
        
        hold on
     if (sw==1)
      plot([x x1],[y y1]) 
     else
      plot([x,x2],[y y2])
     end

        beta=-beta;   
    end
return















