._pysketcher001.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <!--
  2. Automatically generated HTML file from DocOnce source
  3. (https://github.com/hplgit/doconce/)
  4. -->
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8. <meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
  9. <meta name="description" content="Using Pysketcher to Create Principal Sketches of Physics Problems">
  10. <meta name="keywords" content="tree data structure,recursive function calls">
  11. <title>Using Pysketcher to Create Principal Sketches of Physics Problems</title>
  12. <!-- Bootstrap style: bootswatch_readable -->
  13. <link href="http://netdna.bootstrapcdn.com/bootswatch/3.1.1/readable/bootstrap.min.css" rel="stylesheet">
  14. <!-- not necessary
  15. <link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
  16. -->
  17. <style type="text/css">
  18. /* Add scrollbar to dropdown menus in bootstrap navigation bar */
  19. .dropdown-menu {
  20. height: auto;
  21. max-height: 400px;
  22. overflow-x: hidden;
  23. }
  24. </style>
  25. </head>
  26. <!-- tocinfo
  27. {'highest level': 1,
  28. 'sections': [('A first glimpse of Pysketcher', 1, None, '___sec0'),
  29. ('Basic construction of sketches', 2, None, '___sec1'),
  30. ('Basic drawing', 3, None, '___sec2'),
  31. ('Groups of objects', 3, None, '___sec3'),
  32. ('Changing line styles and colors', 3, None, '___sec4'),
  33. ('The figure composition as an object hierarchy',
  34. 3,
  35. None,
  36. '___sec5'),
  37. ('Animation: translating the vehicle', 3, None, '___sec6'),
  38. ('Animation: rolling the wheels',
  39. 3,
  40. 'sketcher:vehicle1:anim',
  41. 'sketcher:vehicle1:anim'),
  42. ('A simple pendulum',
  43. 1,
  44. 'sketcher:ex:pendulum',
  45. 'sketcher:ex:pendulum'),
  46. ('The basic physics sketch',
  47. 2,
  48. 'sketcher:ex:pendulum:basic',
  49. 'sketcher:ex:pendulum:basic'),
  50. ('The body diagram', 2, None, '___sec10'),
  51. ('Animated body diagram',
  52. 2,
  53. 'sketcher:ex:pendulum:anim',
  54. 'sketcher:ex:pendulum:anim'),
  55. ('Function for drawing the body diagram', 3, None, '___sec12'),
  56. ('Equations for the motion and forces', 3, None, '___sec13'),
  57. ('Numerical solution', 3, None, '___sec14'),
  58. ('Animation', 3, None, '___sec15'),
  59. ('Basic shapes', 1, None, '___sec16'),
  60. ('Axis', 2, None, '___sec17'),
  61. ('Distance with text', 2, None, '___sec18'),
  62. ('Rectangle', 2, None, '___sec19'),
  63. ('Triangle', 2, None, '___sec20'),
  64. ('Arc', 2, None, '___sec21'),
  65. ('Spring', 2, None, '___sec22'),
  66. ('Dashpot', 2, None, '___sec23'),
  67. ('Wavy', 2, None, '___sec24'),
  68. ('Stochastic curves', 2, None, '___sec25'),
  69. ('Inner workings of the Pysketcher tool', 1, None, '___sec26'),
  70. ('Example of classes for geometric objects',
  71. 2,
  72. None,
  73. '___sec27'),
  74. ('Simple geometric objects', 3, None, '___sec28'),
  75. ('Class curve', 3, None, '___sec29'),
  76. ('Compound geometric objects', 3, None, '___sec30'),
  77. ('Adding functionality via recursion', 2, None, '___sec31'),
  78. ('Basic principles of recursion', 3, None, '___sec32'),
  79. ('Explaining recursion', 3, None, '___sec33'),
  80. ('Scaling, translating, and rotating a figure',
  81. 2,
  82. 'sketcher:scaling',
  83. 'sketcher:scaling'),
  84. ('Scaling', 3, None, '___sec35'),
  85. ('Translation', 3, None, '___sec36'),
  86. ('Rotation', 3, None, '___sec37')]}
  87. end of tocinfo -->
  88. <body>
  89. <script type="text/x-mathjax-config">
  90. MathJax.Hub.Config({
  91. TeX: {
  92. equationNumbers: { autoNumber: "none" },
  93. extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
  94. }
  95. });
  96. </script>
  97. <script type="text/javascript"
  98. src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
  99. </script>
  100. <!-- newcommands.tex -->
  101. $$
  102. \newcommand{\half}{\frac{1}{2}}
  103. \newcommand{\tp}{\thinspace .}
  104. \newcommand{\rpos}{\boldsymbol{r}}
  105. \newcommand{\ii}{\boldsymbol{i}}
  106. \newcommand{\jj}{\boldsymbol{j}}
  107. \newcommand{\ir}{\boldsymbol{i}_r}
  108. \newcommand{\ith}{\boldsymbol{i}_{\theta}}
  109. $$
  110. <!-- Bootstrap navigation bar -->
  111. <div class="navbar navbar-default navbar-fixed-top">
  112. <div class="navbar-header">
  113. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
  114. <span class="icon-bar"></span>
  115. <span class="icon-bar"></span>
  116. <span class="icon-bar"></span>
  117. </button>
  118. <a class="navbar-brand" href="pysketcher.html">Using Pysketcher to Create Principal Sketches of Physics Problems</a>
  119. </div>
  120. <div class="navbar-collapse collapse navbar-responsive-collapse">
  121. <ul class="nav navbar-nav navbar-right">
  122. <li class="dropdown">
  123. <a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
  124. <ul class="dropdown-menu">
  125. <!-- navigation toc: --> <li><a href="._pysketcher002.html#___sec0" style="font-size: 80%;"><b>A first glimpse of Pysketcher</b></a></li>
  126. <!-- navigation toc: --> <li><a href="._pysketcher002.html#___sec1" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Basic construction of sketches</a></li>
  127. <!-- navigation toc: --> <li><a href="._pysketcher002.html#___sec2" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Basic drawing</a></li>
  128. <!-- navigation toc: --> <li><a href="._pysketcher002.html#___sec3" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Groups of objects</a></li>
  129. <!-- navigation toc: --> <li><a href="._pysketcher002.html#___sec4" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changing line styles and colors</a></li>
  130. <!-- navigation toc: --> <li><a href="._pysketcher002.html#___sec5" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The figure composition as an object hierarchy</a></li>
  131. <!-- navigation toc: --> <li><a href="._pysketcher002.html#___sec6" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Animation: translating the vehicle</a></li>
  132. <!-- navigation toc: --> <li><a href="._pysketcher002.html#sketcher:vehicle1:anim" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Animation: rolling the wheels</a></li>
  133. <!-- navigation toc: --> <li><a href="._pysketcher003.html#sketcher:ex:pendulum" style="font-size: 80%;"><b>A simple pendulum</b></a></li>
  134. <!-- navigation toc: --> <li><a href="._pysketcher003.html#sketcher:ex:pendulum:basic" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;The basic physics sketch</a></li>
  135. <!-- navigation toc: --> <li><a href="._pysketcher003.html#___sec10" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;The body diagram</a></li>
  136. <!-- navigation toc: --> <li><a href="._pysketcher003.html#sketcher:ex:pendulum:anim" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Animated body diagram</a></li>
  137. <!-- navigation toc: --> <li><a href="._pysketcher003.html#___sec12" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Function for drawing the body diagram</a></li>
  138. <!-- navigation toc: --> <li><a href="._pysketcher003.html#___sec13" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equations for the motion and forces</a></li>
  139. <!-- navigation toc: --> <li><a href="._pysketcher003.html#___sec14" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Numerical solution</a></li>
  140. <!-- navigation toc: --> <li><a href="._pysketcher003.html#___sec15" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Animation</a></li>
  141. <!-- navigation toc: --> <li><a href="._pysketcher004.html#___sec16" style="font-size: 80%;"><b>Basic shapes</b></a></li>
  142. <!-- navigation toc: --> <li><a href="._pysketcher004.html#___sec17" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Axis</a></li>
  143. <!-- navigation toc: --> <li><a href="._pysketcher004.html#___sec18" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Distance with text</a></li>
  144. <!-- navigation toc: --> <li><a href="._pysketcher004.html#___sec19" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Rectangle</a></li>
  145. <!-- navigation toc: --> <li><a href="._pysketcher004.html#___sec20" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Triangle</a></li>
  146. <!-- navigation toc: --> <li><a href="._pysketcher004.html#___sec21" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Arc</a></li>
  147. <!-- navigation toc: --> <li><a href="._pysketcher004.html#___sec22" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Spring</a></li>
  148. <!-- navigation toc: --> <li><a href="._pysketcher004.html#___sec23" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Dashpot</a></li>
  149. <!-- navigation toc: --> <li><a href="._pysketcher004.html#___sec24" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Wavy</a></li>
  150. <!-- navigation toc: --> <li><a href="._pysketcher004.html#___sec25" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Stochastic curves</a></li>
  151. <!-- navigation toc: --> <li><a href="._pysketcher005.html#___sec26" style="font-size: 80%;"><b>Inner workings of the Pysketcher tool</b></a></li>
  152. <!-- navigation toc: --> <li><a href="._pysketcher005.html#___sec27" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Example of classes for geometric objects</a></li>
  153. <!-- navigation toc: --> <li><a href="._pysketcher005.html#___sec28" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Simple geometric objects</a></li>
  154. <!-- navigation toc: --> <li><a href="._pysketcher005.html#___sec29" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class curve</a></li>
  155. <!-- navigation toc: --> <li><a href="._pysketcher005.html#___sec30" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compound geometric objects</a></li>
  156. <!-- navigation toc: --> <li><a href="._pysketcher005.html#___sec31" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Adding functionality via recursion</a></li>
  157. <!-- navigation toc: --> <li><a href="._pysketcher005.html#___sec32" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Basic principles of recursion</a></li>
  158. <!-- navigation toc: --> <li><a href="._pysketcher005.html#___sec33" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Explaining recursion</a></li>
  159. <!-- navigation toc: --> <li><a href="._pysketcher005.html#sketcher:scaling" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;Scaling, translating, and rotating a figure</a></li>
  160. <!-- navigation toc: --> <li><a href="._pysketcher005.html#___sec35" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Scaling</a></li>
  161. <!-- navigation toc: --> <li><a href="._pysketcher005.html#___sec36" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Translation</a></li>
  162. <!-- navigation toc: --> <li><a href="._pysketcher005.html#___sec37" style="font-size: 80%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rotation</a></li>
  163. </ul>
  164. </li>
  165. </ul>
  166. </div>
  167. </div>
  168. </div> <!-- end of navigation bar -->
  169. <div class="container">
  170. <p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
  171. <a name="part0001"></a>
  172. <!-- !split -->
  173. <h2>
  174. Table of contents</h2>
  175. <p>
  176. <a href="._pysketcher002.html#___sec0"> A first glimpse of Pysketcher </a><br>
  177. &nbsp; &nbsp; &nbsp; <a href="._pysketcher002.html#___sec1"> Basic construction of sketches </a><br>
  178. <a href="._pysketcher003.html#sketcher:ex:pendulum"> A simple pendulum </a><br>
  179. &nbsp; &nbsp; &nbsp; <a href="._pysketcher003.html#sketcher:ex:pendulum:basic"> The basic physics sketch </a><br>
  180. &nbsp; &nbsp; &nbsp; <a href="._pysketcher003.html#___sec10"> The body diagram </a><br>
  181. &nbsp; &nbsp; &nbsp; <a href="._pysketcher003.html#sketcher:ex:pendulum:anim"> Animated body diagram </a><br>
  182. <a href="._pysketcher004.html#___sec16"> Basic shapes </a><br>
  183. &nbsp; &nbsp; &nbsp; <a href="._pysketcher004.html#___sec17"> Axis </a><br>
  184. &nbsp; &nbsp; &nbsp; <a href="._pysketcher004.html#___sec18"> Distance with text </a><br>
  185. &nbsp; &nbsp; &nbsp; <a href="._pysketcher004.html#___sec19"> Rectangle </a><br>
  186. &nbsp; &nbsp; &nbsp; <a href="._pysketcher004.html#___sec20"> Triangle </a><br>
  187. &nbsp; &nbsp; &nbsp; <a href="._pysketcher004.html#___sec21"> Arc </a><br>
  188. &nbsp; &nbsp; &nbsp; <a href="._pysketcher004.html#___sec22"> Spring </a><br>
  189. &nbsp; &nbsp; &nbsp; <a href="._pysketcher004.html#___sec23"> Dashpot </a><br>
  190. &nbsp; &nbsp; &nbsp; <a href="._pysketcher004.html#___sec24"> Wavy </a><br>
  191. &nbsp; &nbsp; &nbsp; <a href="._pysketcher004.html#___sec25"> Stochastic curves </a><br>
  192. <a href="._pysketcher005.html#___sec26"> Inner workings of the Pysketcher tool </a><br>
  193. &nbsp; &nbsp; &nbsp; <a href="._pysketcher005.html#___sec27"> Example of classes for geometric objects </a><br>
  194. &nbsp; &nbsp; &nbsp; <a href="._pysketcher005.html#___sec31"> Adding functionality via recursion </a><br>
  195. &nbsp; &nbsp; &nbsp; <a href="._pysketcher005.html#sketcher:scaling"> Scaling, translating, and rotating a figure </a><br>
  196. </p>
  197. <p>
  198. <p>
  199. <!-- navigation buttons at the bottom of the page -->
  200. <ul class="pagination">
  201. <li><a href="._pysketcher000.html">&laquo;</a></li>
  202. <li><a href="._pysketcher000.html">1</a></li>
  203. <li class="active"><a href="._pysketcher001.html">2</a></li>
  204. <li><a href="._pysketcher002.html">3</a></li>
  205. <li><a href="._pysketcher003.html">4</a></li>
  206. <li><a href="._pysketcher004.html">5</a></li>
  207. <li><a href="._pysketcher005.html">6</a></li>
  208. <li><a href="._pysketcher002.html">&raquo;</a></li>
  209. </ul>
  210. <!-- ------------------- end of main content --------------- -->
  211. </div> <!-- end container -->
  212. <!-- include javascript, jQuery *first* -->
  213. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  214. <script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
  215. <!-- Bootstrap footer
  216. <footer>
  217. <a href="http://..."><img width="250" align=right src="http://..."></a>
  218. </footer>
  219. -->
  220. </body>
  221. </html>