code for scissors diagram
>
circarr:=proc(center,start, angle,text,textsize,
textoffset,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:=-dir: fi:
dir:=evalc(dir):
v1:=evalc(dir*(I-1)):v2:=evalc(dir*(-I-1)):v3:=0:
V1:=2*[Re(v1),Im(v1)]:
V2:=2*[Re(v2),Im(v2)]:
V3:=2*[Re(v3),Im(v3)]:
arccenter:=center+(rad/2)*[cos(angle/2+shift)
,sin(angle/2+shift)]:
txt:=plots[textplot]([arccenter[1]+textoffset[1],
arccenter[2]+textoffset[2],text],
font=[TIMES,BOLD,textsize]):
head:=plots[polygonplot]([V1+HEAD,V2+HEAD,V3+HEAD],
color=colr):
plots[display]({arc,head,txt},scaling=constrained):
end:
>
sis:=plottools[ellipse]([0,0],2,4,filled=true,
color=red):
sisin:=
plottools[ellipse]([0,0],1,3,filled=true,color=white):
blade:=plots[polygonplot]([[-1,-3.5],[2,-14],[1.75,-2]],
style=patch,color=red):
>
top:=plots[display]([blade,sisin,sis],scaling=constrained):
top:=plottools[translate](top,-.75,5.75):
>
top:=plottools[rotate](top,-Pi/3,[0,0]):
bottom:=plottools[reflect](top,[[0,-2],[0,2]]):
axis:=plot([[-3,0],[10,0]],thickness=3,linestyle=3,
color=black):
>
srs:=plots[display](top,bottom,axes=none):
txt:=plots[textplot]({[5.6, 6.53,`B`], [
5.6, .53,`C`],[-.5,.5,`A`]},
font=[TIMES,BOLD,16],color=black):
>
reflines:=plot({[[ 5.16, 6.53],[5.16, 0]],
[[ 5.16,6.53],[0,
0]]},linestyle=3,thickness=3,color=black):
srs2:=plots[display](plottools[rotate](srs,
Pi/2,[0,0]),style=patchnogrid):
circarrowtheta:=circarr([0,0],[3,0],
arctan(6.53/5.16),`theta`,16, [2.2,1],blue):
circarrowbeta:=circarr([ 5.16, 6.53],[2.39, 3.05],
Pi/18,`beta`,16, [0,-1.5],blue):
>
plots[display]([circarrowtheta,circarrowbeta,axis,
srs2,reflines,txt],scaling=constrained);