{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "Text Output" -1 6 1 {CSTYLE "" -1 -1 "Cour ier" 1 10 0 0 255 1 2 2 2 2 2 1 2 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "Title" -1 18 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 1 2 2 2 1 1 1 1 }3 1 0 0 12 12 1 0 1 0 2 2 19 1 }{PSTYLE "Author" -1 19 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 8 8 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 22 "Turtle Graphics Maplet" } }{PARA 19 "" 0 "" {TEXT -1 50 "By Sylvain Muise, smuise@student.math.u waterloo.ca" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 140 "This maplet creat es turtle graphics using inputs from the user. The user can enter ind ividual commands, or entire programs of instructions." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 256 96 "To run this m aplet, click the \"Execute-Worksheet\" button in the tool-bar menu (t he !!! button)\n" }{TEXT -1 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 4 "Code" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27774 "restart: with( Maplets): with(Maplets[Elements]):\n\nrunTurtleMaplet := proc()\n loc al tempPlot, turtleMaplet:\n reset():\n tempPlot := draw():\n turtl eMaplet := Maplet(\n Window('title' = \"Turtle\", menubar=MB1, 'lay out' = BL1),\n MenuBar[MB1](Menu(\"File\", MenuItem(\"Close\", Shut down()))),\n BoxLayout[BL1](inset=0,\n BoxColumn(inset=1,\n \+ BoxRow(inset=0,\n \"Max X:\", \n TextField[MaxX TF](3,value=maxX), \n \"Max Y:\", \n TextField[MaxYT F](3,value=maxY)\n ),\n Plotter[P1](tempPlot),\n \+ Button[ClearPlotB](\"Reset\",onclick=clearPlotA),\n TextField[n um](\"0\",visible=false)\n ),\n BoxColumn(inset=1,\n \+ BoxRow(inset=0,\n \"Length:\", \n TextField[LengthTF ](4,value=Length), \n \"Angle:\", \n TextField[Angle TF](4,value=Angle) \n ),\n BoxRow(inset=0,\n Bu tton[ForwardB](\"Forward\",onclick=ForwardA),\n Button[LeftB] (\"Left\",onclick=LeftA),\n Button[RightB](\"Right\",onclick= RightA)\n ),\n BoxRow(inset=0,\n Button[LiftPen B](\"Lift Pen\",onclick=LiftPenA),\n Button[LowerPenB](\"Lowe r Pen\",onclick=LowerPenA)\n ),\n BoxRow(inset=0,\n \+ \"Write:\", TextField[WriteTF](12), Button[WriteB](\"Enter\",oncl ick=WriteA)\n ),\n BoxRow(inset=0,\n TextBox[Co deTB](15..30)\n ),\n BoxRow(inset=0,\n Button[G oB](\"Go!\",onclick=GoA)\n )\n )\n ),\n Action[clear PlotA](Evaluate(P1 = 'clearPlot(MaxXTF,MaxYTF)')),\n Action[Forward A](Evaluate(P1 = 'ForwardF(LengthTF)')),\n Action[LeftA](Evaluate(P 1 = 'LeftF(AngleTF)')),\n Action[RightA](Evaluate(P1 = 'RightF(Angl eTF)')),\n Action[LiftPenA](Evaluate(P1 = 'LiftPenF()')),\n Acti on[LowerPenA](Evaluate(P1 = 'LowerPenF()')),\n Action[WriteA](Evalu ate(P1 = 'turtleWrite()')),\n Action[GoA](Evaluate(P1 = 'Go()'))\n \+ ):\n Display(turtleMaplet);\nend proc:\n\nGo := proc()\n local comm ands, i, com, num, text:\n text := Maplets:-Tools:-Get( CodeTB):\n\n \+ use StringTools in\n\n commands := Split(text,\"\\n\"):\n for i fro m 1 to nops(commands) do\n com := LowerCase(commands[i]):\n if I sPrefix(\"forward\",com) or IsPrefix(\"left\",com) or IsPrefix(\"right \",com) then\n num := parse(Remove((not IsDigit),com)):\n if IsPrefix(\"forward\",com) then\n forward(num):\n elif IsP refix(\"left\",com) then\n left(num):\n elif IsPrefix(\"ri ght\",com) then\n right(num):\n end if:\n elif IsPrefix (\"liftpen\",com) then\n liftPen():\n elif IsPrefix(\"lowerpen \", com) then\n lowerPen():\n end if\n end do:\n\n end use: \n\n draw();\nend proc:\n\nForwardF := proc(l)\n forward(l);\n draw ();\nend proc:\n\nWriteF := proc(mes)\n local text;\n text := op(mes ):\n turtleWrite(text);\nend proc:\n\nLeftF := proc(a)\n left(a);\n \+ draw();\nend proc:\n\nRightF := proc(a)\n right(a);\n draw();\nend \+ proc:\n\nLiftPenF := proc()\n liftPen():\n draw();\nend proc:\n\nLow erPenF := proc()\n lowerPen():\n draw();\nend proc:\n\nclearPlot := \+ proc(newMaxX, newMaxY)\n global maxX, maxY:\n reset():\n maxX := ne wMaxX:\n maxY:= newMaxY:\n draw();\nend proc:\n\nX := 0.0:\nY := 0.0 :\nAngle := 0.0:\nLength := 10.0:\ndAngle := 0.0:\ndLength := 0.0:\nma xX := 120: maxY := 120:\nturtleSize := 7:\nlines := []:\npenDown := tr ue:\n\ndrawTurtle := proc()\n global X, Y, Angle, maxX, maxY, turtleS ize;\n if penDown then\n plots[display](plottools[rotate](plottool s[polygon]([[X+turtleSize,Y], [X,Y+turtleSize], [X,Y-turtleSize] ], color=magenta), Angle*Pi/180, [X,Y]), view=[-maxX..maxX,-maxY..maxY ], scaling=constrained);\n else\n plots[display](plottools[r otate](plottools[polygon]([[X+turtleSize,Y], [X,Y+turtleSize], [ X,Y-turtleSize]], color=cyan), Angle*Pi/180, [X,Y]), view=[-maxX..maxX ,-maxY..maxY], scaling=constrained);\n end if;\nend:\n\nreset : = proc()\n global X, Y, Angle, Length, dAngle, dLength, lowRandom, hi ghRandom, maxX, maxY, turtleSize, lines, penDown:\n X := 0.0:\n Y := 0.0:\n Angle := 0.0:\n Length := 10.0:\n dAngle := 0.0:\n dLength := 0.0:\n maxX := 120:\n maxY := 120:\n turtleSize := 7:\n lines \+ := []:\n penDown := true:\nend:\n\nturtle := proc(newX, newY, newAngl e)\n global X, Y, Angle:\n X := newX: Y := newY:\n setAngle(newAngl e):\nend:\n\ndrawLine := proc(r)\n global X, Y, Angle, maxX, maxY;\n \+ plots[display](plottools[line]([X,Y],[X + r * cos(Angle * Pi / 180), \+ Y + r * sin(Angle * Pi / 180)], color=blue, thickness=3), view=[-maxX. .maxX,-maxY..maxY], scaling=constrained)\nend:\n\nforward := proc()\n \+ global Length, X, Y, Angle, dAngle, dLength, maxX, maxY, lines, penDo wn;\n local r, newX, newY, refX, refY, distance, eq, Yy, Xx;\n if na rgs = 1 then\n r := args[1];\n else\n r := Length;\n end if:\n newX := evalf(X + r * cos(Angle * Pi / 180)):\n newY := evalf(Y + r * sin(Angle * Pi / 180)):\n if evalf(abs(newX)) > evalf(abs(maxX)) o r evalf(abs(newY)) > evalf(abs(maxY)) then\n eq := Yy - Y = ((newY \+ - Y)/(newX - X))*(Xx - X):\n if evalf(sin(Angle * Pi / 180)) >= 0 t hen\n refX := solve(subs(Yy = maxY, eq), Xx):\n elif evalf(sin (Angle * Pi / 180)) < 0 then\n refX := solve(subs(Yy = -maxY, eq) , Xx):\n end if:\n if evalf(cos(Angle * Pi / 180)) >= 0 then\n \+ refY := solve(subs(Xx = maxX, eq), Yy):\n elif evalf(cos(Angle \+ * Pi / 180)) < 0 then\n refY := solve(subs(Xx = -maxX, eq), Yy): \n end if:\n if evalf(sin(Angle * Pi / 180)) = 0 then\n dis tance := evalf(abs((maxX * cos(Angle * Pi / 180)) - X)):\n if pen Down then\n lines := [op(lines), drawLine(distance)]:\n en d if:\n X := evalf(X + distance * cos(Angle * Pi / 180)):\n \+ Y := evalf(Y + distance * sin(Angle * Pi / 180)):\n setAngle(180 \+ - Angle):\n elif evalf(cos(Angle * Pi / 180)) = 0 then\n dista nce := evalf(abs((maxY * sin(Angle*Pi/180)) - Y)):\n if penDown t hen\n lines := [op(lines), drawLine(distance)]:\n end if: \n X := evalf(X + distance * cos(Angle * Pi / 180)):\n Y := \+ evalf(Y + distance * sin(Angle * Pi / 180)):\n setAngle(360 - Ang le):\n elif evalf(abs(refX)) > evalf(abs(maxX)) then\n distanc e := sqrt(((maxX * (evalf(abs(refX)))/(evalf(refX))) - X)^2 + (refY - \+ Y)^2):\n if penDown then\n lines := [op(lines), drawLine(d istance)]:\n end if:\n X := evalf(X + distance * cos(Angle * Pi / 180)):\n Y := evalf(Y + distance * sin(Angle * Pi / 180)): \n setAngle(180 - Angle):\n elif evalf(abs(refY)) > evalf(abs( maxY)) then\n distance := sqrt((refX - X)^2 + ((maxY * (evalf(abs (refY)))/(evalf(refY))) - Y)^2):\n if penDown then\n lines := [op(lines), drawLine(distance)]:\n end if:\n X := evalf( X + distance * cos(Angle * Pi / 180)):\n Y := evalf(Y + distance \+ * sin(Angle * Pi / 180)):\n setAngle(360 - Angle): \n end if:\n r := r - distance:\n else\n if penDown then\n lines := [op(lines), drawLine(r)]:\n end if:\n X := X + r * cos(Angle * Pi / 180):\n Y := Y + r * sin(Angle * Pi / 180):\n r := 0:\n \+ Length := Length + dLength:\n if dAngle <> 0 then\n setAngl e(Angle + dAngle):\n end if:\n end if:\n if r <> 0 then\n forw ard(r):\n end if:\nend:\n\ndraw := proc()\n global lines, maxX, maxY ;\n local a;\n plots[display](seq(lines[i],i=1..nops(lines)), drawTu rtle(), view=[-maxX..maxX,-maxY..maxY], scaling=constrained, axes=boxe d)\nend:\n\nsetAngle := proc(newAngle)\n global Angle, maxX, maxY, li nes;\n Angle := newAngle;\nend:\n\nleft := proc(degrees)\n setAngle( Angle + degrees);\nend:\n\nright := proc(degrees)\n setAngle(Angle - \+ degrees);\nend:\n\nliftPen := proc()\n global penDown;\n penDown := \+ false;\nend:\n\nlowerPen := proc()\n global penDown;\n penDown := tr ue;\nend:\n\nturtleWrite := proc()\n global maxX, maxY:\n local text , numLines, maxOnLine, numLetters, i, j, message:\n message := Maplet s:-Tools:-Get( WriteTF );\n reset():\n liftPen():\n numLines := 1: \+ maxOnLine := 0: numLetters := 0:\n text := StringTools[LowerCase](mes sage):\n text := convert(text,bytes):\n for i from 1 to nops(text) d o\n if text[i] = 126 then\n numLines := numLines + 1:\n m axOnLine := max(maxOnLine, numLetters):\n numLetters := 0:\n e lse\n numLetters := numLetters + 1:\n end if:\n end do:\n ma xOnLine := max(maxOnLine, numLetters):\n maxX := (maxOnLine * 45) / 2 + 5:\n maxY := (numLines * 65) / 2 + 6:\n turtle(-(maxOnLine * 45) \+ / 2,maxY - 65,0):\n numLetters := 0:\n for i from 1 to nops(text) do \n if text[i] = 126 then\n right(180):\n for j from 1 to \+ numLetters do\n forward(45):\n end do:\n left(90):\n \+ forward(65):\n left(90):\n numLetters := 0:\n else\n letter||(text[i])():\n numLetters := numLetters + 1:\n e nd if:\n end do:\n Maplets:-Tools:-Set(MaxXTF::anything = maxX):\n \+ Maplets:-Tools:-Set(MaxYTF::anything = maxY):\n draw();\nend proc:\n \nletter97 := proc()\nlocal theta:\ntheta := arctan(60/15)*180/Pi:\nle ft(theta):\nlowerPen():\nforward(evalf(sqrt(3825))):\nright(2*theta): \nforward(evalf(sqrt(3825))):\nleft(180):\nforward(evalf(sqrt(3825)/2. 5)):\nleft(theta):\nforward(18):\nliftPen():\nleft(180):\nforward(18): \nright(theta):\nforward(evalf(sqrt(3825)/2.5)):\nleft(theta):\nforwar d(15):\nend proc:\n\nletter98 := proc()\nleft(90):\nlowerPen():\nforwa rd(60):\nright(90):\nforward(15):\nright(45):\nforward(evalf(sqrt(450) )):\nright(90):\nforward(evalf(sqrt(450))):\nright(45):\nforward(15): \nleft(180):\nforward(15):\nright(45):\nforward(evalf(sqrt(450))):\nri ght(90):\nforward(evalf(sqrt(450))):\nright(45):\nforward(15):\nliftPe n():\nright(180):\nforward(45):\nend proc:\n\nletter99 := proc()\nloca l theta:\ntheta := arctan(1/2) * 180 / Pi:\nliftPen():\nforward(30):\n left(90):\nforward(60):\nleft(90):\nlowerPen():\nleft(theta):\nforward (evalf(sqrt(1125))):\nleft(90 - theta):\nforward(30):\nleft(90 - theta ):\nforward(evalf(sqrt(1125))):\nleft(theta):\nliftPen():\nforward(15) :\nend proc:\n\nletter100 := proc()\nlocal theta:\ntheta := arctan(1/2 ) * 180 / Pi:\nleft(90):\nlowerPen():\nforward(60):\nright(90):\nright (theta):\nforward(evalf(sqrt(1125))):\nright(90 - theta):\nforward(30) :\nright(90 - theta):\nforward(evalf(sqrt(1125))):\nright(theta):\nlif tPen():\nright(180):\nforward(45):\nend proc:\n\nletter101 := proc()\n left(90):\nlowerPen():\nforward(60):\nright(90):\nforward(30):\nliftPe n():\nright(90):\nforward(30):\nright(90):\nforward(10):\nlowerPen(): \nforward(20):\nleft(90):\nforward(30):\nleft(90):\nforward(30):\nlift Pen():\nforward(15):\nend proc:\n\nletter102 := proc()\nleft(90):\nlow erPen():\nforward(60):\nright(90):\nforward(30):\nright(90):\nliftPen( ):\nforward(30):\nright(90):\nforward(10):\nlowerPen():\nforward(20): \nliftPen():\nleft(90):\nforward(30):\nleft(90):\nforward(45):\nend pr oc:\n\nletter103 := proc()\nlocal theta:\ntheta := arctan(1/2) * 180 / Pi:\nliftPen():\nforward(30):\nleft(90):\nforward(60):\nleft(90):\nlo werPen():\nleft(theta):\nforward(evalf(sqrt(1125))):\nleft(90 - theta) :\nforward(30):\nleft(90 - theta):\nforward(evalf(sqrt(1125))):\nleft( theta):\nleft(90):\nforward(25):\nleft(90):\nforward(20):\nliftPen(): \nright(180):\nforward(35):\nright(90):\nforward(25):\nleft(90):\nend \+ proc:\n\nletter104 := proc()\nleft(90):\nlowerPen():\nforward(60):\nri ght(180):\nforward(30):\nleft(90):\nforward(30):\nleft(90):\nforward(3 0):\nright(180):\nforward(60):\nliftPen():\nleft(90):\nforward(15):\ne nd proc:\n\nletter105 := proc()\nlowerPen():\nforward(30):\nliftPen(): \nleft(90):\nforward(60):\nleft(90):\nlowerPen():\nforward(30):\nright (180):\nforward(15):\nright(90):\nforward(60):\nleft(90):\nliftPen(): \nforward(30):\nend proc:\n\nletter106 := proc()\nliftPen():\nleft(90) :\nforward(7.5):\nright(180):\nlowerPen():\nleft(45):\nforward(evalf(s qrt(112.5))):\nleft(90):\nforward(evalf(sqrt(112.5))):\nleft(45):\nfor ward(52.5):\nleft(90):\nforward(15):\nright(180):\nforward(30):\nliftP en():\nright(90):\nforward(60):\nleft(90):\nforward(15):\nend proc:\n \nletter107 := proc()\nlowerPen():\nleft(90):\nforward(60):\nright(180 ):\nforward(30):\nleft(135):\nforward(evalf(sqrt(1800))):\nright(180): \nforward(evalf(sqrt(1800))):\nleft(90):\nforward(evalf(sqrt(1800))): \nleft(45):\nliftPen():\nforward(15):\nend proc:\n\nletter108 := proc( )\nliftPen():\nleft(90):\nforward(60):\nright(180):\nlowerPen():\nforw ard(60):\nleft(90):\nforward(30):\nliftPen():\nforward(15):\nend proc: \n\nletter109 := proc()\nlocal theta:\ntheta := arctan(2) * 180 / Pi: \nlowerPen():\nleft(90):\nforward(60):\nright(90 + theta):\nforward(ev alf(sqrt(1125))):\nleft(2 * theta):\nforward(evalf(sqrt(1125))):\nrigh t(90 + theta):\nforward(60):\nliftPen():\nleft(90):\nforward(15):\nend proc:\n\nletter110 := proc()\nlocal theta:\ntheta := arctan(2) * 180 \+ / Pi:\nlowerPen():\nleft(90):\nforward(60):\nright(90 + theta):\nforwa rd(evalf(sqrt(4500))):\nleft(90 + theta):\nforward(60):\nliftPen():\nr ight(90):\nforward(15):\nright(90):\nforward(60):\nleft(90):\nend proc :\n\nletter111 := proc()\nlowerPen():\nforward(30):\nleft(90):\nforwar d(60):\nleft(90):\nforward(30):\nleft(90):\nforward(60):\nleft(90):\nl iftPen():\nforward(45):\nend proc:\n\nletter112 := proc()\nlowerPen(): \nleft(90):\nforward(60):\nright(90):\nforward(15):\nright(45):\nforwa rd(evalf(sqrt(450))):\nright(90):\nforward(evalf(sqrt(450))):\nright(4 5):\nforward(15):\nleft(90):\nliftPen():\nforward(30):\nleft(90):\nfor ward(45):\nend proc:\n\nletter113 := proc()\nlowerPen():\nforward(30): \nleft(90):\nforward(60):\nleft(90):\nforward(30):\nleft(90):\nforward (60):\nleft(90):\nliftPen():\nforward(15):\nleft(90):\nforward(15):\nr ight(135):\nlowerPen():\nforward(evalf(sqrt(450))):\nliftPen():\nleft( 45):\nforward(15):\nend proc:\n\nletter114 := proc()\nlowerPen():\nlef t(90):\nforward(60):\nright(90):\nforward(15):\nright(45):\nforward(ev alf(sqrt(450))):\nright(90):\nforward(evalf(sqrt(450))):\nright(45):\n forward(15):\nleft(135):\nforward(evalf(sqrt(1800))):\nleft(45):\nlift Pen():\nforward(15):\nend proc:\n\nletter115 := proc()\nlowerPen():\nf orward(15):\nleft(45):\nforward(evalf(sqrt(450))):\nleft(90):\nforward (evalf(sqrt(1800))):\nright(90):\nforward(evalf(sqrt(450))):\nright(45 ):\nforward(15):\nliftPen():\nforward(15):\nright(90):\nforward(60):\n left(90):\nend proc:\n\nletter116 := proc()\nliftPen():\nleft(90):\nfo rward(60):\nright(90):\nlowerPen():\nforward(30):\nright(180):\nforwar d(15):\nleft(90):\nforward(60):\nliftPen():\nleft(90):\nforward(30):\n end proc:\n\nletter117 := proc()\nliftPen():\nleft(90):\nforward(60): \nright(180):\nlowerPen():\nforward(45):\nleft(45):\nforward(evalf(sqr t(450))):\nleft(90):\nforward(evalf(sqrt(450))):\nleft(45):\nforward(4 5):\nliftPen():\nright(90):\nforward(15):\nright(90):\nforward(60):\nl eft(90):\nend proc:\n\nletter118 := proc()\nlocal theta:\ntheta := arc tan(60/15) * 180/Pi:\nliftPen():\nleft(90):\nforward(60):\nright(90 + \+ theta):\nlowerPen():\nforward(evalf(sqrt(3825))):\nleft(2 * theta):\nf orward(evalf(sqrt(3825))):\nright(theta):\nliftPen():\nforward(15):\nr ight(90):\nforward(60):\nleft(90):\nend proc:\n\nletter119 := proc()\n liftPen():\nleft(90):\nforward(60):\nright(180):\nlowerPen():\nforward (60):\nleft(135):\nforward(evalf(sqrt(450))):\nright(90):\nforward(eva lf(sqrt(450))):\nleft(135):\nforward(60):\nliftPen():\nright(90):\nfor ward(15):\nright(90):\nforward(60):\nleft(90):\nend proc:\n\nletter120 := proc()\nlocal theta:\ntheta := arctan(2) * 180 / Pi:\nlowerPen(): \nleft(theta):\nforward(evalf(sqrt(4500))):\nliftPen():\nleft(180 - th eta):\nforward(30):\nleft(180 - theta):\nlowerPen():\nforward(evalf(sq rt(4500))):\nleft(theta):\nliftPen():\nforward(15):\nend proc:\n\nlett er121 := proc()\nlocal theta:\ntheta := arctan(2) * 180 / Pi:\nlowerPe n():\nleft(theta):\nforward(evalf(sqrt(4500))):\nliftPen():\nleft(180 \+ - theta):\nforward(30):\nleft(180 - theta):\nlowerPen():\nforward(eval f(sqrt(1125))):\nliftPen():\nforward(evalf(sqrt(1125))):\nleft(theta): \nforward(15):\nend proc:\n\nletter122 := proc()\nlocal theta:\ntheta \+ := arctan(2) * 180 / Pi:\nliftPen():\nleft(90):\nforward(60):\nright(9 0):\nlowerPen():\nforward(30):\nright(180 - theta):\nforward(evalf(sqr t(4500))):\nleft(180 - theta):\nforward(30):\nliftPen():\nforward(15): \nend proc:\n\nletter32 := proc()\nliftPen():\nforward(45):\nend proc: \n\nletter43 := proc()\nliftPen():\nleft(90):\nforward(30):\nright(90) :\nlowerPen():\nforward(30):\nleft(90):\nliftPen():\nforward(30):\nlef t(90):\nforward(15):\nleft(90):\nforward(15):\nlowerPen():\nforward(30 ):\nliftPen():\nforward(15):\nleft(90):\nforward(30):\nend proc:\n\nle tter48 := proc()\nlocal theta:\ntheta := arctan(2) * 180 / Pi:\nlowerP en():\nforward(30):\nleft(90):\nforward(60):\nleft(90):\nforward(30): \nleft(90):\nforward(60):\nleft(90 + theta):\nforward(evalf(sqrt(4500) )):\nright(theta):\nliftPen():\nforward(15):\nright(90):\nforward(60): \nleft(90):\nend proc:\n\nletter49 := proc()\nliftPen():\nleft(90):\nf orward(45):\nright(45):\nlowerPen():\nforward(evalf(sqrt(450))):\nrigh t(135):\nforward(60):\nright(90):\nforward(15):\nright(180):\nforward( 30):\nliftPen():\nforward(15):\nend proc:\n\nletter50 := proc()\nliftP en():\nleft(90):\nforward(60):\nright(90):\nlowerPen():\nforward(15): \nright(45):\nforward(evalf(sqrt(450))):\nright(45):\nforward(15):\nri ght(45):\nforward(evalf(sqrt(1800))):\nleft(135):\nforward(30):\nliftP en():\nforward(15):\nend proc:\n\nletter51 := proc()\nlocal theta:\nth eta := arctan(2) * 180 / Pi:\nliftPen():\nleft(90):\nforward(60):\nlow erPen():\nright(90):\nforward(30):\nright(180 - theta):\nforward(evalf (sqrt(1125))):\nleft(135 - theta):\nforward(evalf(sqrt(450))):\nright( 90):\nforward(evalf(sqrt(450))):\nright(45):\nforward(15):\nliftPen(): \nright(180):\nforward(45):\nend proc:\n\nletter52 := proc()\nliftPen( ):\nleft(90):\nforward(60):\nright(180):\nlowerPen():\nforward(30):\nl eft(90):\nforward(30):\nliftPen():\nleft(90):\nforward(30):\nleft(90): \nforward(10):\nleft(90):\nlowerPen():\nforward(60):\nleft(90):\nliftP en():\nforward(25):\nend proc:\n\nletter53 := proc()\nlowerPen():\nfor ward(15):\nleft(45):\nforward(evalf(sqrt(450))):\nleft(90):\nforward(e valf(sqrt(450))):\nleft(45):\nforward(15):\nright(90):\nforward(30):\n right(90):\nforward(30):\nliftPen():\nforward(15):\nright(90):\nforwar d(60):\nleft(90):\nend proc:\n\nletter54 := proc()\nliftPen():\nleft(9 0):\nforward(15):\nright(45):\nlowerPen():\nforward(evalf(sqrt(450))): \nright(90):\nforward(evalf(sqrt(450))):\nright(90):\nforward(evalf(sq rt(450))):\nright(90):\nforward(evalf(sqrt(450))):\nright(45):\nforwar d(30):\nright(45):\nforward(evalf(sqrt(450))):\nright(45):\nforward(15 ):\nliftPen():\nforward(15):\nright(90):\nforward(60):\nleft(90):\nend proc:\n\nletter55 := proc()\nlocal theta:\ntheta := arctan(1/3) * 180 / Pi:\nliftPen():\nleft(90):\nforward(45):\nlowerPen():\nforward(15): \nright(90):\nforward(30):\nright(90):\nforward(15):\nright(theta):\nf orward(evalf(sqrt(2250))):\nleft(90 + theta):\nliftPen():\nforward(30) :\nend proc:\n\nletter56 := proc()\nliftPen():\nforward(15):\nleft(45) :\nlowerPen():\nforward(evalf(sqrt(450))):\nleft(90):\nforward(evalf(s qrt(1800))):\nright(90):\nforward(evalf(sqrt(450))):\nright(90):\nforw ard(evalf(sqrt(450))):\nright(90):\nforward(evalf(sqrt(1800))):\nleft( 90):\nforward(evalf(sqrt(450))):\nleft(45):\nliftPen():\nforward(30): \nend proc:\n\nletter57 := proc()\nliftPen():\nforward(15):\nleft(45): \nlowerPen():\nforward(evalf(sqrt(450))):\nleft(45):\nforward(30):\nle ft(45):\nforward(evalf(sqrt(450))):\nleft(90):\nforward(evalf(sqrt(450 ))):\nleft(90):\nforward(evalf(sqrt(450))):\nleft(90):\nforward(evalf( sqrt(450))):\nright(45):\nliftPen():\nforward(15):\nright(90):\nforwar d(45):\nleft(90):\nend proc:\n\nletter33 := proc()\nlocal theta:\nthet a := arctan(1/8) * 180 / Pi:\nliftPen():\nleft(90):\nforward(60):\nrig ht(90):\nforward(10):\nlowerPen():\nforward(10):\nright(90 + theta):\n forward(evalf(sqrt(1625))):\nright(2*(90 - theta)):\nforward(evalf(sqr t(1625))):\nliftPen():\nleft(180 - theta):\nforward(60):\nleft(90):\nl owerPen():\nforward(10):\nleft(90):\nforward(10):\nleft(90):\nforward( 10):\nleft(90):\nforward(10):\nleft(90):\nliftPen():\nforward(35):\nen d proc:\n\nletter64 := proc()\nlocal theta1:\ntheta1 := arctan(2) * 18 0 / Pi:\nliftPen():\nleft(90):\nforward(25):\nright(90):\nforward(20): \nleft(90):\nlowerPen():\nforward(15):\nleft(90):\nforward(10):\nleft( 45):\nforward(evalf(sqrt(50))):\nleft(45):\nforward(10):\nleft(theta1) :\nforward(evalf(sqrt(125))):\nleft(90 - theta1):\nleft(45):\nforward( evalf(sqrt(50))):\nright(45):\nright(90 - theta1):\nforward(evalf(sqrt (125))):\nleft(90 - theta1):\nleft(90):\nforward(30):\nleft(45):\nforw ard(evalf(sqrt(200))):\nleft(45):\nforward(10):\nleft(45):\nforward(ev alf(sqrt(200))):\nleft(45):\nforward(40):\nleft(45):\nforward(evalf(sq rt(200))):\nleft(45):\nforward(20):\nliftPen():\nforward(15):\nend pro c:\n\nletter35 := proc()\nliftPen():\nforward(10):\nleft(90):\nlowerPe n():\nforward(60):\nright(90):\nliftPen():\nforward(10):\nright(90):\n lowerPen():\nforward(60):\nleft(90):\nliftPen():\nforward(10):\nleft(9 0):\nforward(20):\nleft(90):\nlowerPen():\nforward(30):\nliftPen():\nr ight(90):\nforward(20):\nright(90):\nlowerPen():\nforward(30):\nliftPe n():\nforward(15):\nright(90):\nforward(40):\nleft(90):\nend proc:\n\n letter36 := proc()\nlowerPen():\nforward(15):\nleft(45):\nforward(eval f(sqrt(450))):\nleft(90):\nforward(evalf(sqrt(1800))):\nright(90):\nfo rward(evalf(sqrt(450))):\nright(45):\nforward(15):\nright(180):\nliftP en():\nforward(20):\nleft(90):\nlowerPen():\nforward(60):\nliftPen(): \nleft(90):\nforward(10):\nleft(90):\nlowerPen():\nforward(60):\nliftP en():\nright(90):\nforward(25):\nright(90):\nforward(60):\nleft(90):\n end proc:\n\nletter37 := proc()\nlocal theta:\ntheta := arctan(2) * 18 0 / Pi:\nleft(theta):\nlowerPen():\nforward(evalf(sqrt(4500))):\nleft( 180 - theta):\nliftPen():\nforward(20):\nleft(90):\nforward(5):\nlower Pen():\nleft(90 - theta):\nforward(evalf(sqrt(125))):\nright(2*(90 - t heta)):\nforward(evalf(sqrt(125))):\nright(2 * theta):\nforward(evalf( sqrt(125))):\nright(2*(90 - theta)):\nforward(evalf(sqrt(125))):\nrigh t(theta):\nliftPen():\nforward(10):\nright(90):\nforward(50):\nleft(90 + theta):\nlowerPen():\nforward(evalf(sqrt(125))):\nleft(2*(90 - thet a)):\nforward(evalf(sqrt(125))):\nleft(2 * theta):\nforward(evalf(sqrt (125))):\nleft(2 * (90 - theta)):\nforward(evalf(sqrt(125))):\nright(9 0 - theta):\nliftPen():\nforward(5):\nleft(90):\nforward(25):\nend pro c:\n\nletter94 := proc()\nlocal theta:\ntheta := arctan(1/2) * 180 / P i:\nliftPen():\nleft(90):\nforward(30):\nlowerPen():\nright(theta):\nf orward(evalf(sqrt(1125))):\nright(2 * (90 - theta)):\nforward(evalf(sq rt(1125))):\nright(theta):\nliftPen():\nforward(30):\nleft(90):\nforwa rd(15):\nend proc:\n\nletter38 := proc()\nlocal theta1:\ntheta1 := arc tan(5/3) * 180 / Pi:\nliftPen():\nforward(30):\nleft(180 - theta1):\nl owerPen():\nforward(evalf(sqrt(3400))):\nright(135 - theta1):\nforward (evalf(sqrt(200))):\nright(45):\nforward(20):\nliftPen():\nright(90): \nforward(30):\nright(90):\nforward(18):\nlowerPen():\nleft(45):\nforw ard(evalf(sqrt(288))):\nleft(45):\nforward(6):\nleft(45):\nforward(eva lf(sqrt(288))):\nleft(90):\nforward(evalf(sqrt(648))):\nliftPen():\nri ght(135):\nforward(18):\nleft(90):\nforward(15):\nend proc:\n\nletter4 2 := proc()\nlocal theta1, theta2:\ntheta1 := arctan(4) * 180 / Pi:\nt heta2 := arctan(4/3) * 180 / Pi:\nlowerPen():\nleft(theta1):\nforward( evalf(sqrt(3825))):\nright(2 * theta1):\nforward(evalf(sqrt(3825))):\n right(180 - theta1 + theta2):\nforward(50):\nright(180 - theta2):\nfor ward(30):\nright(180 - theta2):\nforward(50):\nleft(180 - theta2):\nli ftPen():\nforward(45):\nend proc:\n\nletter40 := proc()\nlocal theta: \ntheta := arctan(4/3) * 180 / Pi:\nliftPen():\nforward(15):\nleft(90) :\nforward(60):\nlowerPen():\nleft(90 + theta):\nforward(25):\nleft(90 - theta):\nforward(20):\nleft(90 - theta):\nforward(25):\nleft(theta) :\nliftPen():\nforward(30):\nend proc:\n\nletter41 := proc()\nlocal th eta:\ntheta := arctan(4/3) * 180 / Pi:\nliftPen():\nforward(15):\nleft (90):\nforward(60):\nlowerPen():\nright(90 + theta):\nforward(25):\nri ght(90 - theta):\nforward(20):\nright(90 - theta):\nforward(25):\nleft (180 - theta):\nliftPen():\nforward(30):\nend proc:\n\nletter45 := pro c()\nliftPen():\nleft(90):\nforward(30):\nlowerPen():\nright(90):\nfor ward(30):\nliftPen():\nright(90):\nforward(30):\nleft(90):\nforward(15 ):\nend proc:\n\nletter95 := proc()\nlowerPen():\nforward(30):\nliftPe n():\nforward(15):\nend proc:\n\nletter61 := proc()\nliftPen():\nforwa rd(30):\nleft(90):\nforward(25):\nleft(90):\nlowerPen():\nforward(30): \nliftPen():\nright(90):\nforward(10):\nright(90):\nlowerPen():\nforwa rd(30):\nliftPen():\nright(90):\nforward(35):\nleft(90):\nforward(15): \nend proc:\n\nletter92 := proc()\nlocal theta:\ntheta := arctan(2) * \+ 180 / Pi:\nliftPen():\nleft(90):\nforward(60):\nright(90 + theta):\nlo werPen():\nforward(evalf(sqrt(4500))):\nleft(theta):\nliftPen():\nforw ard(15):\nend proc:\n\nletter124 := proc()\nliftPen():\nleft(90):\nfor ward(60):\nright(90):\nforward(15):\nright(90):\nlowerPen():\nforward( 60):\nliftPen():\nleft(90):\nforward(30):\nend proc:\n\nletter47 := pr oc()\nlocal theta:\ntheta := arctan(2) * 180 / Pi:\nleft(theta):\nlowe rPen():\nforward(evalf(sqrt(4500))):\nright(theta + 90):\nliftPen():\n forward(60):\nleft(90):\nforward(15):\nend proc:\n\nletter39 := proc() \nliftPen():\nleft(90):\nforward(60):\nright(90):\nforward(10):\nright (60):\nlowerPen():\nforward(10):\nleft(120):\nforward(10):\nleft(120): \nforward(10):\nleft(90):\nliftPen():\nforward(60):\nleft(90):\nforwar d(35):\nend proc:\n\nletter34 := proc()\nliftPen():\nleft(90):\nforwar d(60):\nright(150):\nlowerPen():\nforward(10):\nleft(120):\nforward(10 ):\nleft(120):\nforward(10):\nright(180):\nliftPen():\nforward(20):\nl owerPen():\nforward(10):\nright(120):\nforward(10):\nright(120):\nforw ard(10):\nright(120):\nliftPen():\nforward(25):\nright(90):\nforward(6 0):\nleft(90):\nend proc:\n\nletter58 := proc()\nliftPen():\nforward(1 0):\nleft(90):\nforward(10):\nlowerPen():\nforward(10):\nright(90):\nf orward(10):\nright(90):\nforward(10):\nright(90):\nforward(10):\nright (90):\nliftPen():\nforward(30):\nlowerPen():\nforward(10):\nright(90): \nforward(10):\nright(90):\nforward(10):\nright(90):\nforward(10):\nli ftPen():\nright(180):\nforward(35):\nright(90):\nforward(40):\nleft(90 ):\nend proc:\n\nletter59 := proc()\nlocal theta:\ntheta := arctan(1/2 ) * 180 / Pi:\nliftPen():\nforward(10):\nleft(90):\nforward(40):\nlowe rPen():\nforward(10):\nright(90):\nforward(10):\nright(90):\nforward(1 0):\nright(90):\nforward(10):\nleft(90):\nliftPen():\nforward(20):\nlo werPen():\nforward(10):\nright(45):\nforward(evalf(sqrt(200))):\nleft( 135 + theta):\nforward(evalf(sqrt(500))):\nleft(90 - theta):\nforward( 10):\nleft(90):\nforward(10):\nliftPen():\nleft(90):\nforward(20):\nle ft(90):\nforward(35):\nend proc:\n\nletter60 := proc()\nliftPen():\nfo rward(30):\nleft(90):\nforward(60):\nleft(135):\nlowerPen():\nforward( evalf(sqrt(1800))):\nleft(90):\nforward(evalf(sqrt(1800))):\nleft(45): \nliftPen():\nforward(15):\nend proc:\n\nletter62 := proc()\nliftPen() :\nleft(90):\nforward(60):\nright(135):\nlowerPen():\nforward(evalf(sq rt(1800))):\nright(90):\nforward(evalf(sqrt(1800))):\nleft(135):\nlift Pen():\nforward(45):\nend proc:\n\nletter44 := proc()\nlocal theta:\nt heta := arctan(1/2) * 180 / Pi:\nliftPen():\nforward(10):\nleft(90):\n lowerPen():\nforward(10):\nright(90):\nforward(10):\nright(90):\nforwa rd(10):\nright(90 - theta):\nforward(evalf(sqrt(500))):\nright(theta + 135):\nforward(evalf(sqrt(200))):\nright(45):\nliftPen():\nforward(35 ):\nend proc:\n\nletter46 := proc()\nliftPen():\nforward(10):\nlowerPe n():\nforward(10):\nleft(90):\nforward(10):\nleft(90):\nforward(10):\n left(90):\nforward(10):\nleft(90):\nliftPen():\nforward(35):\nend proc :\n\nletter91 := proc()\nliftPen():\nforward(30):\nleft(90):\nforward( 60):\nleft(90):\nlowerPen():\nforward(15):\nleft(90):\nforward(60):\nl eft(90):\nforward(15):\nliftPen():\nforward(15):\nend proc:\n\nletter9 3 := proc()\nliftPen():\nleft(90):\nforward(60):\nright(90):\nlowerPen ():\nforward(15):\nright(90):\nforward(60):\nright(90):\nforward(15): \nliftPen():\nright(180):\nforward(45):\nend proc:\n\nletter123 := pro c()\nliftPen():\nforward(30):\nleft(90):\nforward(60):\nleft(135):\nlo werPen():\nforward(evalf(sqrt(200))):\nleft(45):\nforward(10):\nright( 45):\nforward(evalf(sqrt(200))):\nleft(90):\nforward(evalf(sqrt(200))) :\nright(45):\nforward(10):\nleft(45):\nforward(evalf(sqrt(200))):\nle ft(45):\nliftPen():\nforward(15):\nend proc:\n\nletter125 := proc()\nl iftPen():\nleft(90):\nforward(60):\nright(135):\nlowerPen():\nforward( evalf(sqrt(200))):\nright(45):\nforward(10):\nleft(45):\nforward(evalf (sqrt(200))):\nright(90):\nforward(evalf(sqrt(200))):\nleft(45):\nforw ard(10):\nright(45):\nforward(evalf(sqrt(200))):\nleft(135):\nliftPen( ):\nforward(45):\nend proc:\n\nletter63 := proc()\nliftPen():\nleft(90 ):\nforward(50):\nright(45):\nlowerPen():\nforward(evalf(sqrt(200))): \nright(45):\nforward(10):\nright(45):\nforward(evalf(sqrt(200))):\nri ght(90):\nforward(evalf(sqrt(450))):\nleft(45):\nforward(20):\nliftPen ():\nforward(5):\nright(90):\nlowerPen():\nforward(5):\nleft(90):\nfor ward(10):\nleft(90):\nforward(10):\nleft(90):\nforward(10):\nleft(90): \nforward(5):\nliftPen():\nleft(90):\nforward(10):\nleft(90):\nforward (30):\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 18 "runTurtleMaplet();" }}{PARA 6 "" 1 "" {TEXT -1 38 " Initializing Java runtime environment." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {MARK "1 0 0" 0 }{VIEWOPTS 1 1 0 3 4 1802 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }