code for diagram
>
arr:=proc(tail,head, text,txtshift, size, colr) local txt,tmp,nrm,dir,cntr:
dir:=head-tail:
cntr:=.5*(head+tail):
cntr:=cntr+txtshift[1]*[dir[2],-dir[1]] +txtshift[2]*dir:
nrm:=sqrt( dir[1]^2+dir[2]^2):
tmp:=plottools[arrow](tail, head, .01*nrm,.05*nrm,.07,color=colr):
txt:=plots[textplot]([cntr[1],cntr[2],text],font=[TIMES,BOLD,size]): plots[display]({tmp,txt},scaling=constrained);end;
dbarr:=proc(tail,head, text,txtshift, size, colr) local txt,tmp1,tmp2,nrm,dir,cntr:
dir:=head-tail:
cntr:=.5*(tail+head)+txtshift[1]*[dir[2],
-dir[1]]+txtshift[2]*dir:
nrm:=sqrt( dir[1]^2+dir[2]^2):
tmp1:=plottools[arrow](tail,head, .01*nrm,.05*nrm,.05,color=colr):
tmp2:=plottools[arrow](head,tail, .01*nrm,.05*nrm,.05,color=colr):
txt:=plots[textplot]([cntr[1],cntr[2],text],
font=[TIMES,BOLD,size]): plots[display]({tmp1,tmp2,txt},scaling=constrained);end:
circarr:=proc(center,start,angle,text,textsize,textshift,colr)
local arc,dir, HEAD, V1,V2,V3,v1,v2,v3,arccenter,
txt,tmp,rad,shift,head:
tmp:=evalf(start-center):
rad:=sqrt(tmp[1]^2+tmp[2]^2):
shift:=argument(tmp[1]+tmp[2]*I):
if evalf(shift) < 0 then shift:=shift+2*Pi: fi:
arc:=plot({[start],[center],[center[1]+rad*cos(shift+t),
center[2]+rad*sin(shift+t),t=0..angle]},thickness=3,
color=colr):
dir:=.05*rad*(-sin(angle+shift)+I*cos(angle+shift)):HEAD:=rad*[cos(angle+shift),sin(angle+shift)]+center:
if evalf(angle)>=0 then dir:=evalc(dir) else dir:=-evalc(dir): fi:
v1:=evalc(dir*(I-1)):v2:=evalc(dir*(-I-1)):v3:=0:
V1:=[Re(v1),Im(v1)]:
V2:=[Re(v2),Im(v2)]:
V3:=[Re(v3),Im(v3)]:
arccenter:=center+(rad/2)*[cos(angle/2+shift),
sin(angle/2+shift)]:
txt:=plots[textplot]([textshift*arccenter[1],
textshift*arccenter[2],text],font=[TIMES,BOLD,textsize]):
head:=plots[polygonplot]([1.5*V1+HEAD,1.5*V2+HEAD,1.5*V3+HEAD],color=colr):
plots[display]({arc,head,txt},scaling=constrained):
end:
topend:=[ sqrt(2.)/2, sqrt(2.)/2]:
bottomend:=[-sqrt(2.)/2, -sqrt(2.)/2]:
> batonends:=plottools[disk](topend,.03,color=blue), plottools[disk](bottomend,.03,color=blue):
>
baton:=plot({[[-sqrt(2.)/2, -sqrt(2.)/2] , [ sqrt(2.)/2, sqrt(2.)/2]]},thickness=2, style=line, thickness=3);:
txt:=plots[textplot]([-.5,.5, `(x_cent,y_cent)`],font=[TIMES,BOLD,14],align=ABOVE):
arrowshift:=.05*[1,-1]:
bottomarrow:=dbarr(bottomend+arrowshift,[0,0]+arrowshift,
`1 ft`,[.1,.1], 16, tan):
toparrow:=dbarr(topend+arrowshift,[0,0]+arrowshift,
`1 ft`,[-.1,-.07], 16, tan):
locatecenter:=arr([-.6,.4],[0,0],
`(x_cent, y_cent)`,[-.1,-.6],14,black):
circarrow:=circarr([0,0],[.35,.35], Pi/4,`theta`,14,1.5,green):
xrefline:=plot([topend,[0,topend[2]]],linestyle=3,
thickness=2,color=grey):
yrefline:=plot([[0,0],[0,1.5*topend[2]]],linestyle=3,
thickness=2,color=grey):
>
plots[display]({baton,batonends,locatecenter,bottomarrow,
toparrow,circarrow,xrefline,yrefline},axes=none);