code for diagrams
uses arrow commands from the previous diagrams
>
putaball:=proc(pt,rad,txt,size) local dsk,text:
dsk:=plottools[disk](pt,rad,color=blue):
text:=plots[textplot]([pt[1],pt[2]-1.2*rad,txt],font=[TIMES,BOLD,size],align=BELOW):
plots[display]({dsk,text},scaling=constrained):end:
> putaball([0,0],.03,`100`,16):
> joe:=[seq(putaball([14*t/20,-16*(t/20)^2+14*t/20+5],.05,convert(t,string),8),t=0..20)]:
> sam:=[seq(putaball([14*t/20+sin(6*Pi*t/20),-16*(t/20)^2+14*t/20+5+cos(6*Pi*t/20)],.05,convert(t,string),8),t=0..20)]:
> tammy:=plot([14*x/20+sin(6*Pi*x/20),-16*(x/20)^2+14*x/20+5+cos(6*Pi*x/20),x=0..20],thickness=3):
> ginny:=plot([14*x/20,-16*(x/20)^2+14*x/20+5,x=0..20],thickness=3,linestyle=3):
>
refpts:=plot({[[0,0]],[[0,1]],[[1,0]]}):
dotarr:=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,style=line,linestyle=3):
txt:=plots[textplot]([cntr[1],cntr[2],text],
font=[TIMES,BOLD,size]):
plots[display]({tmp,txt},scaling=constrained);end:
numberstext:=dotarr([8,4],[10.38,6.1], `numbers are twentieths of a second `,[.5,-.3], 12, blue):
centerpathtext:=dotarr([2,4],[4,7.5], `path of center of
baton`,[.5,0], 12, blue):
toppathtext:=dotarr([1,10],[2.7,7.9], `path of top of
baton`,[-.4,-.3], 12, blue):
>
plots[display](refpts,numberstext,toppathtext,
centerpathtext,joe,sam,tammy,ginny,scaling=constrained,
title=`Dotted line = Path of center; Solid line = path of
top`,titlefont=[TIMES,BOLD,14]);