imw2.0 Englishprojectsize[744 426]turtles-have[]globals[]globals-list[globals-vars]shapes[12 check_off]  "-8CNYdoBB!YkB!YkB!YkB!YkB!YkB!YkB!YkB!YkB!YkB!YkBYk[13 check_on]  &6J`pBB!YkB!YkB!YkB!YkB!YkB!YkB!YkB!YkB!YkB!YkBYkF[14 ||]((. !$'*-0369BOX[^adgjmpsvy|[28 radio_off] )8CNYdsBB!BB!!B!YkB!YkB!YkB!YkB!YkB!YkBYkYkYk[29 radio_on] )8IZk|BB!BB!!B!YkB!YkB!YkB!YkB!YkB!YkBYkYkYkdproceduresUtext{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fswiss Arial;}{\f4\fmodern\fprq1 Courier New;}} {\colortbl\red0\green0\blue0;\red0\green128\blue128;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs20\cf1 ; Author: Rupert Russell \par ; Created: November 6, 2003 \par ; Updated: January 24, 2005 \par ; e-mail: r.russell@ballarat.edu.au \par ; URL: http://velorum.ballarat.edu.au/~rrussell/microworlds \par ; \par ; This program is free software; you can redistribute it and/or modify \par ; it under the terms of the GNU General Public License as published by \par ; the Free Software Foundation; either version 2 of the License, or \par ; (at your option) any later version. \par ; \par ; This program is distributed in the hope that it will be useful, \par ; but WITHOUT ANY WARRANTY; without even the implied warranty of \par ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \par ; GNU General Public License for more details. \par ; \par ; You should have received a copy of the GNU General Public License \par ; along with this program; if not, write to the Free Software \par ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. \par ; ---------------------------------------------------------------------- \par ; \par \plain\lang3081\f4\fs20\cf1 ; Inspired by the online essay going in circles \par ; http://llk.media.mit.edu/projects/circles/ \par \plain\f4\fs20\cf1\b ; \par \plain\f4\fs20\cf1 ; This project is based on the example One good turn produced by MIT ; online at: \par \plain\lang3081\f4\fs20\cf1 ; http://llk.media.mit.edu/projects/circles/\plain\f4\fs20\cf1 onegoodturn.html\plain\f4\fs20\cf0 \par \par \plain\f4\fs20\cf2\b to startup\plain\f4\fs20\cf0 \par \plain\f4\fs20\cf1 ; note this procedure runs automatically when the project opens\plain\f4\fs20\cf2 \par \plain\f4\fs20\cf0 set_up_radio_buttons \par radio1_true\tab \tab \tab \tab \plain\f4\fs20\cf1 ; select the top radio box\plain\f4\fs20\cf2 \par \plain\f4\fs20\cf0 set "button1 "on? "false\tab \tab \plain\f4\fs20\cf1 ; turn off the go button\plain\f4\fs20\cf0 \par \par setbg 83\tab \tab \tab \plain\f4\fs20\cf1 \tab ; set the background colour\plain\f4\fs20\cf0 \par \par \plain\f4\fs20\cf1 ; position the buttons on the screen this is one way \par ; to align and distribute buttons evenly on the screen.\plain\f4\fs20\cf2 \par \plain\f4\fs20\cf0 set "button1 "pos [-360 -175] \par set "button2 "pos [-298 -175] \par set "button4 "pos [-236 -175] \par \par \plain\f4\fs20\cf1 ; freeze the position of the buttons \par ; stops the user moving them by mistake\plain\f4\fs20\cf0 \par freeze "button1 \par freeze "button2 \par freeze "button4 \par \par \plain\f4\fs20\cf1 ; set the size of all text boxes \plain\f4\fs20\cf0 \par set "text1 "size [145 47] \par set "text2 "size [145 47] \par set "text3 "size [145 47] \par set "text4 "size [145 47] \par set "text5 "size [145 47] \par \par \plain\f4\fs20\cf1 ; set the positions of all text boxes\plain\f4\fs20\cf0 \par set "text1 "pos [195 195] \par set "text2 "pos [195 139] \par set "text3 "pos [195 83] \par set "text4 "pos [195 27] \par set "text5 "pos [195 -29] \par \par \plain\f4\fs20\cf1 ; set the position of all radio buttons\plain\f4\fs20\cf0 \par talkto "tr_radio1 setpos [180 160] \par talkto "tr_radio2 setpos [180 104] \par talkto "tr_radio3 setpos [180 48] \par talkto "tr_radio4 setpos [180 -8] \par talkto "tr_radio5 setpos [180 -64] \par \plain\f4\fs20\cf2\b end \par \par to go\plain\f4\fs20\cf0 \par \plain\f4\fs20\cf1 ; this procedure runs the text in whichever text box is selected. \par ; Users can edit the text in the text boxes to change the result.\plain\f4\fs20\cf0 \par if :radio1 = "true [ talkto "t1 pd run text1]\tab \par if :radio2 = "true [ talkto "t1 pd run text2] \par if :radio3 = "true [ talkto "t1 pd run text3] \par if :radio4 = "true [ talkto "t1 pd run text4] \par if :radio5 = "true [ talkto "t1 pd run text5] \par \plain\f4\fs20\cf2\b end \par \par to reset\plain\f4\fs20\cf0 \par \plain\f4\fs20\cf1 ; Note the " before the word "button1 is a single double \par ; quote character eg. " it is not two single quotes \par ; one after the other eg. '' this can be confusing as they look \par ; identical in Arial font. \par ; This is one good reason to use a courier font in source code.\plain\f4\fs20\cf2 \par \par \plain\f4\fs20\cf0 talkto "t1 \par set "button1 "on? "false \par pu \par setpos [-130 -5 ] \par seth 0 \par \plain\f4\fs20\cf2\b end \par \par to turn :num \par \plain\f4\fs20\cf1 ; turn 1 will turn a full 360 degrees\plain\f4\fs20\cf0 \par rt 360 * :num \par \plain\f4\fs20\cf2\b end \par \par to clear\plain\f4\fs20\cf0 \par talkto "t1 \par pu \par cg \par cc \par setpos [-130 -5 ] \par seth 0 \par \plain\f4\fs20\cf2\b end \par \par to set_up_radio_buttons\plain\f4\fs20\cf0 \par set_all_radio_buttons_off \par set_all_radio_buttons_false \par \plain\f4\fs20\cf2\b end \par \par to set_all_radio_buttons_off\plain\f4\fs20\cf0 \par ask [tr_radio1 tr_radio2 tr_radio3 tr_radio4 tr_radio5] [ setsh "radio_off ] \par set_all_radio_buttons_false \par \plain\f4\fs20\cf2\b end \par \par to set_all_radio_buttons_false\plain\f4\fs20\cf0 \par \plain\f4\fs20\cf1 ; Note the " before the word "button1 is a single double \par ; quote character eg. " it is not two single quotes \par ; one after the other eg. '' this can be confusing as they look \par ; identical in Arial font. \par ; This is one good reason to use a courier font in source code. \par \par ; this procedure sets all radio buttons to "false\plain\f4\fs20\cf0 \par make "radio1 "false \par make "radio2 "false \par make "radio3 "false \par make "radio4 "false \par make "radio5 "false \par \plain\f4\fs20\cf2\b end \par \par to radio1_true\plain\f4\fs20\cf0 \par reset\tab \tab \tab \plain\f4\fs20\cf1 \tab ; stop the turtle \par \plain\f4\fs20\cf0 clear\tab \tab \par talkto "tr_radio1 \tab \plain\f4\fs20\cf1 \tab ; talk to the turtle called "tr_radio1 \plain\f4\fs20\cf2 \par \plain\f4\fs20\cf0 set_all_radio_buttons_off \tab \plain\f4\fs20\cf1 ; unselect all radio buttons\plain\f4\fs20\cf2 \par \plain\f4\fs20\cf0 setsh "radio_on \tab \tab \plain\f4\fs20\cf1 ; select "tr_radio1 \plain\f4\fs20\cf0 \par make "radio1 "true\tab \par set "button1 "on? "true\tab \plain\f4\fs20\cf1 ; start the turtle going again\plain\f4\fs20\cf0 \par \plain\f4\fs20\cf2\b end \par \par to radio2_true \plain\f4\fs20\cf0 \par reset \par clear \par talkto "tr_radio2 \par set_all_radio_buttons_off \par setsh "radio_on \par make "radio2 "true \par set "button1 "on? "true \par \plain\f4\fs20\cf2\b end \par \par to radio3_true\plain\f4\fs20\cf0 \par reset \par clear \par talkto "tr_radio3 \par set_all_radio_buttons_off \par setsh "radio_on \par make "radio3 "true \par set "button1 "on? "true \par \plain\f4\fs20\cf2\b end \par \par to radio4_true\plain\f4\fs20\cf0 \par reset \par clear \par talkto "tr_radio4 \par set_all_radio_buttons_off \par setsh "radio_on \par make "radio4 "true \par set "button1 "on? "true \par \plain\f4\fs20\cf2\b end \par \par to radio5_true\plain\f4\fs20\cf0 \par reset \par clear \par talkto "tr_radio5 \par set_all_radio_buttons_off \par setsh "radio_on \par make "radio5 "true \par set "button1 "on? "true \par \plain\f4\fs20\cf2\b end\plain\f4\fs20\cf0 \par \par \par \par } 9Epagenamepage1curturtlet1curtexttext1transition0Dturtle-deamons[[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []]Cmouse-deamons[[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []] bg831buffer1$6HZl~ 2DYn#>Yt1Lg $?Zu2Pn.U|?f)Pw 3 Z  D k  " I p 3 Z  D k .Uz5\Fm 0W~5\Fm 0Qw:a$Kr5\4Oj 'B]x5Pk (C^y+=Oas'9K]o#5GYk} 1CUgy  - ? Q c u !!)!;!M!_!q!!!!!!!!""%"7"I"["m"""""""""#!#3#E#W#i#{######## $$/$A$S$e$w$$$$$$$$%%+%=%O%a%s%%%%%%%%&&'&9&K&]&o&&&&&&&&&'#'5'G'Y'k'}'''''''' ((1(C(U(g(y(((((((( ))-)?)Q)c)u))))))))**)*;*M*////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////object typet namet1locked?falsexpos169.345747199 ypos118 shape0penstate1 size40pencolor0heading72 pensize1shown?true fcn[] kind1shapeinturtlehave-list[has] colorin9{objecttypebuttonnamebutton1rect[12 388 60 25]show-name?falselocked?true fcn[go] kind0~objecttypebuttonnamebutton2rect[74 388 60 25]show-name?falselocked?truefcn[reset] kind1object typetextnametext1rect[567 18 145 47]show-name?falselocked?falsevisible?truesnaped?falseXtext{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fswiss Arial;}{\f4\fmodern\fprq1 Courier New;}} {\colortbl\red0\green0\blue0;\red0\green128\blue128;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs20 forward 100 \par turn 1 / 5\plain\f3\fs20 \par } object typetextnametext2rect[567 74 145 47]show-name?falselocked?falsevisible?truesnaped?falseXtext{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fswiss Arial;}{\f4\fmodern\fprq1 Courier New;}} {\colortbl\red0\green0\blue0;\red0\green128\blue128;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs20 forward 200 \par turn 2 / 5\plain\f3\fs20 \par } object typetextnametext3rect[567 130 145 47]show-name?falselocked?falsevisible?truesnaped?falseYtext{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fswiss Arial;}{\f4\fmodern\fprq1 Courier New;}} {\colortbl\red0\green0\blue0;\red0\green128\blue128;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs20 forward 100 \par turn 3 / 14\plain\f3\fs20 \par } object typetnametr_radio1locked?false xpos552 ypos53 shape29penstate0 size40pencolor0 heading0 pensize1shown?truefcn[radio1_true] kind1shapeinradio_offhave-list[has] colorin9object typetnametr_radio2locked?false xpos552 ypos109 shape30penstate0 size40pencolor0 heading0 pensize1shown?truefcn[radio2_true] kind1shapeinradio_onhave-list[has] colorin9object typetnametr_radio3locked?false xpos552 ypos165 shape29penstate0 size40pencolor0 heading0 pensize1shown?truefcn[radio3_true] kind1shapeinradio_offhave-list[has] colorin9object typetnametr_radio4locked?false xpos552 ypos221 shape29penstate0 size40pencolor0 heading0 pensize1shown?truefcn[radio4_true] kind1shapeinradio_offhave-list[has] colorin9object typetnametr_radio5locked?false xpos552 ypos277 shape29penstate0 size40pencolor0 heading0 pensize1shown?truefcn[radio5_true] kind1shapeinradio_offhave-list[has] colorin9objecttypebuttonnamebutton4rect[136 388 60 25]show-name?falselocked?truefcn[clear] kind1object typetextnametext4rect[567 186 145 47]show-name?falselocked?falsevisible?truesnaped?falseXtext{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fswiss Arial;}{\f4\fmodern\fprq1 Courier New;}} {\colortbl\red0\green0\blue0;\red0\green128\blue128;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs20 forward 50 \par turn 1 / 10\plain\f3\fs20 \par } object typetextnametext5rect[567 242 145 47]show-name?falselocked?falsevisible?truesnaped?falseXtext{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fswiss Arial;}{\f4\fmodern\fprq1 Courier New;}} {\colortbl\red0\green0\blue0;\red0\green128\blue128;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs20 forward 1 \par turn 1 / 360\plain\f3\fs20 \par } object typetextnametext6rect[247 332 506 115]show-name?falselocked?falsevisible?truesnaped?truetext{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fswiss Arial;}{\f4\fmodern\fprq1 Courier New;}} {\colortbl\red0\green0\blue0;\red0\green128\blue128;\red0\green0\blue255;} \deflang3081\pard\plain\f4\fs20\b turn 1 / n\plain\f4\fs20 makes a polygon with \plain\f4\fs20\b n\plain\f4\fs20 sides. \par \par Edit the text in the above text boxes to change the shape that the turtle draws.\plain\lang1033\f3\fs20 \par }