clear unit 100.0 snap off gridstyle grid off axes off unit 1.0 1 style label off coord off filled off font 14 color 0 0 0 fillcolor 128 128 128 let t=0.0 let base=[polygon [[-0.5, 2] [-0.5, 2.1] [0.5, 2.1] [0.5, 2] ] ] Style base visible on unit 2 fillcolor 0 200 200 filled on let top=[halfplane [ [col 1 base] [col 2 base] ] ] Style top visible on fillcolor 128 64 0 filled on let A=[point [0.0, 2.0]] Style A visible off font 12 let P=[point [0.0, 6.0]] Style P visible off let circle1=[circle [A P] ] Style circle1 visible off let B=[pton circle1 0.85] label B "Bob" Style B visible on label on font 12 color 255 0 0 let AB=[seg [A B] ] Style AB visible off let Bob=[circle [B [translate B [0 .5] ] ] ] Style Bob visible on font 12 filled on let String=[seg [A [intersection AB Bob] ] ] Style String visible on font 12 program animatebob AnimateBob end program AnimateBob repeat 50 [ let t=t+1 let B=[pton circle1 0.75+0.1*[cos t*3.14/10]] paint pause 100] end