%!PS-Adobe-2.0
%%Title: Blue Book Program 4, on page 141
%%Creator: Adobe Systems Incorporated 
%%CreationDate: Thu Dec 28 13:18:28 PST 1989
%%EndComments

/arrowdict 14 dict def
arrowdict begin
  /mtrx matrix def
end

/arrow
	{ arrowdict begin
	  /headlength exch def
	  /halfheadthickness exch 2 div def
	  /halfthickness exch 2 div def
	  /tipy exch def /tipx exch def
	  /taily exch def /tailx exch def
	  
	  /dx tipx tailx sub def
	  /dy tipy taily sub def
	  /arrowlength dx dx mul dy dy mul add sqrt def
	  /angle dy dx atan def
  	  /base arrowlength headlength sub def
  	  
	  /savematrix matrix currentmatrix def
	  
	  tailx taily translate
	  angle rotate
	  
	  0 halfthickness neg moveto
	  base halfthickness neg lineto
	  base halfheadthickness neg lineto
	  arrowlength 0 lineto
	  base halfheadthickness lineto
	  base halfthickness lineto
	  0 halfthickness lineto
	  closepath
	  savematrix setmatrix
	  end
	} def
	
newpath
  318 340 72 340 10 30 72 arrow
fill

newpath
  382 400 542 560 72 232 116 arrow
3 setlinewidth stroke

newpath
  400 300 400 90 90 200 200 3 sqrt mul 2 div
  arrow .65 setgray fill
showpage

% But what does it do?