Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-10-18 12:44:03 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-10-18 12:44:03 (GMT)
commit04b871358ed41fceb136e384417dcd6ab897e54f (patch)
treeaa51eca9013f4cbaa808ac13d0e95614942596bb /samples
parentf20487a3b243d1f348bed816c0d23cacde7c546a (diff)
refactor turtle sees example
Diffstat (limited to 'samples')
-rw-r--r--samples/images/butia.svg108
-rw-r--r--samples/sensors-follow-path.ta93
-rw-r--r--samples/sensors-turtle-sees.ta107
-rw-r--r--samples/thumbnails/sensors-follow-path.pngbin0 -> 15267 bytes
4 files changed, 201 insertions, 107 deletions
diff --git a/samples/images/butia.svg b/samples/images/butia.svg
new file mode 100644
index 0000000..3edae1c
--- /dev/null
+++ b/samples/images/butia.svg
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="333.71198"
+ height="333.71167"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="butia.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="139.05958"
+ inkscape:cy="161.83778"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1366"
+ inkscape:window-height="709"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Capa 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-224.14403,-286.92437)">
+ <path
+ sodipodi:type="arc"
+ style="fill:none;stroke:#63c521;stroke-width:46.87316513;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="path3066"
+ sodipodi:cx="442.85715"
+ sodipodi:cy="480.93362"
+ sodipodi:rx="140"
+ sodipodi:ry="145.71428"
+ d="m 582.85715,480.93362 c 0,80.47578 -62.68014,145.71428 -140,145.71428 -77.31987,0 -140,-65.2385 -140,-145.71428 0,-80.47577 62.68013,-145.71427 140,-145.71427 77.31986,0 140,65.2385 140,145.71427 z"
+ transform="matrix(0.91413861,0,0,0.87829005,-13.832809,31.380984)" />
+ <path
+ style="fill:none;stroke:#63c521;stroke-width:40;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 336.94341,400.00662 108.1132,107.54717"
+ id="path3838"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#63c521;stroke-width:40;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="M 445.05661,400.00662 336.94341,507.55379"
+ id="path3838-6"
+ inkscape:connector-curvature="0" />
+ <g
+ id="g3968"
+ transform="translate(-2.4511719e-6,0.08248621)">
+ <path
+ sodipodi:nodetypes="czc"
+ inkscape:connector-curvature="0"
+ id="path3860-7"
+ d="m 233.14403,366.55256 c 0,0 14.74049,-22.8697 31.35874,-39.35193 16.61827,-16.48222 39.35194,-31.35875 39.35194,-31.35875"
+ style="fill:none;stroke:#63c521;stroke-width:18;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:20;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="czc"
+ inkscape:connector-curvature="0"
+ id="path3860-7-9"
+ d="m 548.85599,366.55256 c 0,0 -14.74049,-22.8697 -31.35874,-39.35193 -16.61827,-16.48222 -39.35194,-31.35875 -39.35194,-31.35875"
+ style="fill:none;stroke:#63c521;stroke-width:18;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:20;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="czc"
+ inkscape:connector-curvature="0"
+ id="path3860-7-6"
+ d="m 233.14403,540.84287 c 0,0 14.74049,22.8697 31.35874,39.35193 16.61827,16.48222 39.35194,31.35875 39.35194,31.35875"
+ style="fill:none;stroke:#63c521;stroke-width:18;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:20;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="czc"
+ inkscape:connector-curvature="0"
+ id="path3860-7-9-8"
+ d="m 548.85599,540.84287 c 0,0 -14.74049,22.8697 -31.35874,39.35193 -16.61827,16.48222 -39.35194,31.35875 -39.35194,31.35875"
+ style="fill:none;stroke:#63c521;stroke-width:18;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:20;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ </g>
+</svg>
diff --git a/samples/sensors-follow-path.ta b/samples/sensors-follow-path.ta
new file mode 100644
index 0000000..7af6d50
--- /dev/null
+++ b/samples/sensors-follow-path.ta
@@ -0,0 +1,93 @@
+[[0, ["start", 2.0], 20, 180, [null, 60]],
+[1, "setcolor", 778, 712, [52, 21, 53]],
+[2, "setcolor", 778, 544, [27, 22, 51]],
+[3, "hat", 1060, 120, [null, 4, 88]],
+[4, ["string", "path"], 1119, 132, [3, null]],
+[5, "stack", 778, 796, [53, 6, null]],
+[6, ["string", "path"], 837, 796, [5, null]],
+[7, ["forever", 231], 20, 352, [9, 90, null]],
+[8, ["vspace", 0], 38, 470, [10, 18]],
+[9, "penup", 20, 310, [70, 7]],
+[10, "forward", 38, 428, [90, 11, 8]],
+[11, ["number", 10.0], 112, 428, [10, null]],
+[12, "left", 56, 830, [29, 13, null]],
+[13, ["number", 30], 135, 830, [12, null]],
+[14, "right", 56, 620, [31, 15, null]],
+[15, ["number", 30], 128, 620, [14, null]],
+[16, "see", 160, 478, [20, null]],
+[17, "see", 160, 688, [24, null]],
+[18, ["if", 21], 38, 512, [8, 20, 31, 19]],
+[19, ["vspace", 0], 38, 680, [18, 23]],
+[20, ["equal2", 0], 104, 478, [18, 16, 65, null]],
+[21, "blue", 859, 712, [1, null]],
+[22, "red", 859, 544, [2, null]],
+[23, ["if", 21], 38, 722, [19, 24, 29, null]],
+[24, ["equal2", 0], 104, 688, [23, 17, 25, null]],
+[25, "red", 160, 730, [24, null]],
+[26, "clean", 778, 208, [69, 66]],
+[27, "setpensize", 778, 502, [55, 28, 2]],
+[28, ["number", 25], 879, 502, [27, null]],
+[29, "back", 56, 788, [23, 30, 12]],
+[30, ["number", 10.0], 114, 788, [29, null]],
+[31, "back", 56, 578, [18, 32, 14]],
+[32, ["number", 10.0], 114, 578, [31, null]],
+[33, "forward", 1078, 616, [35, 34, 37]],
+[34, ["number", 10], 1152, 616, [33, null]],
+[35, ["repeat", 21], 1060, 574, [39, 36, 33, null]],
+[36, ["number", 10], 1120, 574, [35, null]],
+[37, "right", 1078, 658, [33, 38, null]],
+[38, ["number", 9], 1150, 658, [37, null]],
+[39, "hat", 1060, 520, [null, 40, 35]],
+[40, ["string", "right"], 1119, 532, [39, null]],
+[41, "hat", 1060, 300, [null, 42, 43]],
+[42, ["string", "left"], 1119, 312, [41, null]],
+[43, ["repeat", 21], 1060, 354, [41, 44, 45, null]],
+[44, ["number", 10], 1120, 354, [43, null]],
+[45, "forward", 1078, 396, [43, 46, 47]],
+[46, ["number", 10], 1152, 396, [45, null]],
+[47, "left", 1078, 438, [45, 48, null]],
+[48, ["number", 9], 1157, 438, [47, null]],
+[49, "stack", 778, 628, [51, 50, 52]],
+[50, ["string", "path"], 837, 628, [49, null]],
+[51, "startfill", 778, 586, [2, 49]],
+[52, "stopfill", 778, 670, [49, 1]],
+[53, "setpensize", 778, 754, [1, 54, 5]],
+[54, ["number", 50], 879, 754, [53, null]],
+[55, ["fillscreen", 0], 778, 418, [67, 57, 56, 27]],
+[56, ["number", 50], 908, 460, [55, null]],
+[57, "yellow", 908, 418, [55, null]],
+[58, "hat", 760, 120, [null, 59, 69]],
+[59, ["string", "draw path"], 819, 132, [58, null]],
+[60, "stack", 20, 226, [0, 61, 70]],
+[61, ["string", "draw path"], 79, 226, [60, null]],
+[62, ["setxy2", 0], 778, 292, [66, 63, 64, 67]],
+[63, ["number", -100], 839, 292, [62, null]],
+[64, ["number", -100], 839, 334, [62, null]],
+[65, "yellow", 160, 520, [20, null]],
+[66, "penup", 778, 250, [26, 62]],
+[67, "pendown", 778, 376, [62, 55]],
+[68, "sandwichclampcollapsed", 1078, 216, [88, 78, null]],
+[69, "sandwichclampcollapsed", 760, 174, [58, 26, null]],
+[70, "skin", 20, 268, [60, 71, 9]],
+[71, ["journal", "/home/walter/Activities/TurtleBlocks.activity/samples/images/butia.svg"], 109, 268, [70, null]],
+[72, "stack", 1096, 292, [78, 73, 74]],
+[73, ["string", "left"], 1155, 292, [72, null]],
+[74, "stack", 1096, 334, [72, 75, 86]],
+[75, ["string", "right"], 1155, 334, [74, null]],
+[76, "stack", 1096, 418, [86, 77, 80]],
+[77, ["string", "right"], 1155, 418, [76, null]],
+[78, "forward", 1096, 250, [68, 79, 72]],
+[79, ["number", 25.0], 1170, 250, [78, null]],
+[80, "forward", 1096, 460, [76, 81, 82]],
+[81, ["number", 25.0], 1170, 460, [80, null]],
+[82, "stack", 1096, 502, [80, 83, 84]],
+[83, ["string", "right"], 1155, 502, [82, null]],
+[84, "stack", 1096, 544, [82, 85, null]],
+[85, ["string", "left"], 1155, 544, [84, null]],
+[86, "forward", 1096, 376, [74, 87, 76]],
+[87, ["number", 25.0], 1170, 376, [86, null]],
+[88, ["repeat", 0], 1060, 174, [3, 89, 68, null]],
+[89, ["number", 4], 1120, 174, [88, null]],
+[90, "wait", 38, 386, [7, 91, 10]],
+[91, ["number", 0.1], 107, 386, [90, null]],
+[-1, ["turtle", "Yertle"], -66.3397459621555, -178.30127018922207, 240.0, 70, 50, 50.0]] \ No newline at end of file
diff --git a/samples/sensors-turtle-sees.ta b/samples/sensors-turtle-sees.ta
deleted file mode 100644
index ac90671..0000000
--- a/samples/sensors-turtle-sees.ta
+++ /dev/null
@@ -1,107 +0,0 @@
-[[0, ["start", 2.0], 186, 203, [null, 99]],
-[1, "setcolor", 548, 701, [91, 21, 92]],
-[2, "setcolor", 548, 549, [30, 22, 90]],
-[3, "hat", 1280, 79, [null, 4, 36]],
-[4, ["string", "path"], 1338, 87, [3, null]],
-[5, "stack", 548, 785, [92, 6, null]],
-[6, ["string", "path"], 606, 785, [5, null]],
-[7, "forever", 186, 321, [9, 10, null]],
-[8, ["vspace", 0], 247, 381, [10, 18]],
-[9, "penup", 186, 287, [99, 7]],
-[10, "forward", 247, 339, [7, 11, 8]],
-[11, ["number", 5], 318, 339, [10, null]],
-[12, "left", 299, 741, [32, 13, null]],
-[13, ["number", 30], 357, 741, [12, null]],
-[14, "right", 299, 533, [34, 15, null]],
-[15, ["number", 30], 357, 533, [14, null]],
-[16, "see", 331, 389, [20, null]],
-[17, "see", 331, 597, [25, null]],
-[18, "if", 247, 423, [8, 20, 34, 19]],
-[19, ["vspace", 40.0], 247, 509, [18, 23]],
-[20, ["equal2", 0], 285, 389, [18, 16, 104, null]],
-[21, "blue", 625, 701, [1, null]],
-[22, "red", 625, 549, [2, null]],
-[23, "if", 247, 631, [19, 25, 32, 24]],
-[24, ["vspace", 20.0], 247, 717, [23, 28]],
-[25, ["equal2", 0], 285, 597, [23, 17, 26, null]],
-[26, "red", 331, 639, [25, null]],
-[27, "clean", 548, 237, [97, 105]],
-[28, "wait", 247, 799, [24, 29, null]],
-[29, ["number", 0.1], 305, 799, [28, null]],
-[30, "setpensize", 548, 507, [94, 31, 2]],
-[31, ["number", 25], 650, 507, [30, null]],
-[32, "back", 299, 699, [23, 33, 12]],
-[33, ["number", 5], 357, 699, [32, null]],
-[34, "back", 299, 491, [18, 35, 14]],
-[35, ["number", 5], 357, 491, [34, null]],
-[36, "forward", 1280, 129, [3, 37, 66]],
-[37, ["number", 100], 1351, 129, [36, null]],
-[38, "forward", 1280, 213, [66, 39, 68]],
-[39, ["number", 100], 1351, 213, [38, null]],
-[40, "forward", 1280, 339, [64, 41, 72]],
-[41, ["number", 250], 1351, 339, [40, null]],
-[42, "forward", 1280, 465, [62, 43, 76]],
-[43, ["number", 100], 1351, 465, [42, null]],
-[44, "forward", 1280, 549, [76, 45, 74]],
-[45, ["number", 150], 1351, 549, [44, null]],
-[46, "forward", 1121, 797, [48, 47, 50]],
-[47, ["number", 10], 1192, 797, [46, null]],
-[48, "repeat", 1056, 737, [52, 49, 46, null]],
-[49, ["number", 10], 1107, 737, [48, null]],
-[50, "right", 1121, 839, [46, 51, null]],
-[51, ["number", 9], 1179, 839, [50, null]],
-[52, "hat", 1056, 687, [null, 53, 48]],
-[53, ["string", "right"], 1114, 695, [52, null]],
-[54, "hat", 825, 678, [null, 55, 56]],
-[55, ["string", "left"], 883, 686, [54, null]],
-[56, "repeat", 825, 728, [54, 57, 58, null]],
-[57, ["number", 10], 876, 728, [56, null]],
-[58, "forward", 890, 788, [56, 59, 60]],
-[59, ["number", 10], 961, 788, [58, null]],
-[60, "left", 890, 830, [58, 61, null]],
-[61, ["number", 9], 948, 830, [60, null]],
-[62, "stack", 1280, 423, [72, 63, 42]],
-[63, ["string", "left"], 1338, 423, [62, null]],
-[64, "stack", 1280, 297, [68, 65, 40]],
-[65, ["string", "right"], 1338, 297, [64, null]],
-[66, "stack", 1280, 171, [36, 67, 38]],
-[67, ["string", "left"], 1338, 171, [66, null]],
-[68, "stack", 1280, 255, [38, 69, 64]],
-[69, ["string", "right"], 1338, 255, [68, null]],
-[70, "stack", 1280, 633, [74, 71, 78]],
-[71, ["string", "right"], 1338, 633, [70, null]],
-[72, "stack", 1280, 381, [40, 73, 62]],
-[73, ["string", "right"], 1338, 381, [72, null]],
-[74, "stack", 1280, 591, [44, 75, 70]],
-[75, ["string", "right"], 1338, 591, [74, null]],
-[76, "stack", 1280, 507, [42, 77, 44]],
-[77, ["string", "right"], 1338, 507, [76, null]],
-[78, "stack", 1280, 675, [70, 79, 80]],
-[79, ["string", "left"], 1338, 675, [78, null]],
-[80, "stack", 1280, 717, [78, 81, 82]],
-[81, ["string", "left"], 1338, 717, [80, null]],
-[82, "stack", 1280, 759, [80, 83, 86]],
-[83, ["string", "right"], 1338, 759, [82, null]],
-[84, "stack", 548, 625, [90, 85, 91]],
-[85, ["string", "path"], 606, 625, [84, null]],
-[86, "stack", 1280, 801, [82, 87, 88]],
-[87, ["string", "right"], 1338, 801, [86, null]],
-[88, "forward", 1280, 843, [86, 89, null]],
-[89, ["number", 50], 1351, 843, [88, null]],
-[90, "startfill", 548, 591, [2, 84]],
-[91, "stopfill", 548, 667, [84, 1]],
-[92, "setpensize", 548, 743, [1, 93, 5]],
-[93, ["number", 50], 650, 743, [92, null]],
-[94, ["fillscreen", 0], 548, 423, [106, 96, 95, 30]],
-[95, ["number", 50], 630, 465, [94, null]],
-[96, "yellow", 630, 423, [94, null]],
-[97, "hat", 548, 187, [null, 98, 27]],
-[98, ["string", "draw maze"], 606, 195, [97, null]],
-[99, "stack", 186, 245, [0, 100, 9]],
-[100, ["string", "draw maze"], 244, 245, [99, null]],
-[101, ["setxy2", 0], 548, 305, [105, 102, 103, 106]],
-[102, ["number", -100], 606, 305, [101, null]],
-[103, ["number", -100], 606, 347, [101, null]],
-[104, "yellow", 331, 431, [20, null]],
-[105, "penup", 548, 271, [27, 101]],
-[106, "pendown", 548, 389, [101, 94]]] \ No newline at end of file
diff --git a/samples/thumbnails/sensors-follow-path.png b/samples/thumbnails/sensors-follow-path.png
new file mode 100644
index 0000000..a4916a9
--- /dev/null
+++ b/samples/thumbnails/sensors-follow-path.png
Binary files differ