turtle.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?xml version="1.0" ?>
  2. <!DOCTYPE movements SYSTEM "../../etc/TurtleMobility.dtd">
  3. <movements>
  4. <movement id="1">
  5. <!-- draw a square -->
  6. <set speed="10" x="100" y="200"/>
  7. <repeat n="4">
  8. <forward d="50"/>
  9. <turn angle="90"/>
  10. </repeat>
  11. </movement>
  12. <movement id="2">
  13. <!-- two squares, the second 45 degrees tilted -->
  14. <set x="200" y="200" speed="10" angle="90"/>
  15. <repeat n="2">
  16. <repeat n="4">
  17. <forward d="50"/>
  18. <turn angle="90"/>
  19. </repeat>
  20. <turn angle="45"/>
  21. <set speed="20"/>
  22. </repeat>
  23. </movement>
  24. <movement id="3">
  25. <!-- Random Waypoint -->
  26. <repeat>
  27. <set speed="uniform(20,60)"/>
  28. <moveto x="uniform(0,$MAXX)" y="uniform(0,$MAXY)"/>
  29. <wait t="uniform(0,10)"/>
  30. </repeat>
  31. </movement>
  32. <movement id="4">
  33. <!-- MassMobility with "reflect" border policy -->
  34. <repeat>
  35. <set speed="uniform(10,20)" borderPolicy="reflect"/>
  36. <turn angle="uniform(-30,30)"/>
  37. <forward t="uniform(0.1,1)"/>
  38. </repeat>
  39. </movement>
  40. <movement id="5">
  41. <!-- MassMobility with "wrap" border policy -->
  42. <repeat>
  43. <set speed="uniform(10,20)" borderPolicy="wrap"/>
  44. <turn angle="uniform(-30,30)"/>
  45. <forward t="uniform(0.1,1)"/>
  46. </repeat>
  47. </movement>
  48. <movement id="6">
  49. <!-- MassMobility with "placerandomly" border policy -->
  50. <repeat>
  51. <set speed="uniform(10,20)" borderPolicy="placerandomly"/>
  52. <turn angle="uniform(-30,30)"/>
  53. <forward t="uniform(0.1,1)"/>
  54. </repeat>
  55. </movement>
  56. </movements>