{*mw2.0 Englishprojectsize[592 322]turtles-have[]globals[]globals-list[globals-vars] shapesprocedurestext{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fmodern\fprq1 Courier New;}{\f4\fmodern\fcharset1 Courier New;}{\f5\fmodern Courier New;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f5\fs20\cf0 Mr Wilson for Robotics and Intro Classes May 13, 2003 \par \par to showtime \par setup \par forever [bounce] \par end \par \par to setup \par make "xmax 295 \par make "xmin -296 \par make "ymax 161 \par make "ymin -160 \par make "diff 20 \par newturtle "redball border setpos[-150 0] seth random 360 setc 15 st \par \plain\f4\fs20\cf0 newturtle "bluball setpos[ 150 0] seth random 360 setc 105 st\plain\f5\fs20\cf0 \par end \par \par to border \par pu setpos se :xmin :ymax pd \par setpos se :xmax :ymax \par setpos se :xmax :ymin \par setpos se :xmin :ymin \par setpos se :xmin :ymax pu \par end \par \par to cleanup \par remove "redball \par remove "bluball \par end \par \par to bounce \par redball, fd 1 make "xr xcor make "yr ycor make "hr heading \par bluball, fd 1 make "xb xcor make "yb ycor make "hb heading \par \par if ((:xr - :xb) * (:xr - :xb) + (:yr - :yb) * (:yr - :yb)) < :diff * :diff \par [redball, seth :hb bluball, seth :hr] \par \par if ((abs (:ymax - :yr)) < :diff) [redball, seth(180 - :hr)] \par \plain\f4\fs20\cf0 if ((abs (:ymax - :yb)) < :diff) [bluball, seth(180 - :hb)] \par \par if ((abs (:xmax - :xr)) < :diff) [redball, seth(360 - :hr)] \par if ((abs (:xmax - :xb)) < :diff) [bluball, seth(360 - :hb)] \par \plain\f5\fs20\cf0 end \par \par to vlim :size \par pu home pd fd :size rt 90 fd 5 bk 10 \par end \par \par to hlim:size \par \plain\f4\fs20\cf0 pu home pd fd pd :size rt 90 fd 5 bk 10\plain\f5\fs20\cf0 \par end \par \plain\f3\fs20\cf0 \par \plain\f3\fs20 to save_shot \par savepict (word "shot 1 + count pictlist ".gif) \par end \par \par (NOTE: The save_shot procedure will only save pictures of the empty background unless the turtles are stamped onto the background before saving.) \par \par \plain\f5\fs20\cf0 \par \par } S!pagenamepage1curturtle||curtext||transition0Dturtle-deamons[[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []]Cmouse-deamons[[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []]bg0}bufferPBf$9Ncx  5J_t1F[p-BWl)>Sh}%:Ody !6K`u2G\q.CXm  * ? T i ~  & ; P e z " 7 L a v  3 H ] r   / D Y n +@Uj'<Qf{#8Mbw 4I^s0EZo,AVk(=Rg|$9Ncx  5J_t1F[p-BWl)>Sh}%:Oobjecttypebuttonnamebutton1rect[7 291 67 24]show-name?falselocked?falsefcn[showtime] kind1objecttypebuttonnamebutton2rect[88 291 60 25]show-name?falselocked?falsefcn[cleanup] kind1