Explorar el Código

Merge branch 'master' of github.com:hplgit/pysketcher

Hans Petter Langtangen hace 10 años
padre
commit
ad4b7267a6
Se han modificado 100 ficheros con 3287 adiciones y 4234 borrados
  1. 0 1
      README
  2. 122 0
      README.do.txt
  3. 125 0
      README.md
  4. 2 0
      README.sh
  5. 197 0
      doc/pub/tutorial/._pysketcher000.html
  6. 813 0
      doc/pub/tutorial/._pysketcher001.html
  7. 523 0
      doc/pub/tutorial/._pysketcher002.html
  8. 896 0
      doc/pub/tutorial/._pysketcher003.html
  9. 2 2
      doc/tutorial/html/.buildinfo
  10. 0 0
      doc/pub/tutorial/html/_images/Vehicle0_hier2.png
  11. 0 0
      doc/pub/tutorial/html/_images/vehicle0.png
  12. 0 0
      doc/pub/tutorial/html/_images/vehicle0_dim.png
  13. 0 0
      doc/pub/tutorial/html/_images/vehicle0_hier1.png
  14. BIN
      doc/pub/tutorial/html/_images/vehicle1.png
  15. BIN
      doc/pub/tutorial/html/_images/wheel_on_inclined_plane.png
  16. 2 2
      doc/tutorial/html/html/_sources/index.txt
  17. 0 0
      doc/pub/tutorial/html/_static/ajax-loader.gif
  18. 5 0
      doc/tutorial/html/html/_static/basic.css
  19. 0 0
      doc/pub/tutorial/html/_static/comment-bright.png
  20. 0 0
      doc/pub/tutorial/html/_static/comment-close.png
  21. 0 0
      doc/pub/tutorial/html/_static/comment.png
  22. 0 0
      doc/pub/tutorial/html/_static/dialog-note.png
  23. 0 0
      doc/pub/tutorial/html/_static/dialog-seealso.png
  24. 0 0
      doc/pub/tutorial/html/_static/dialog-topic.png
  25. 0 0
      doc/pub/tutorial/html/_static/dialog-warning.png
  26. 0 0
      doc/pub/tutorial/html/_static/doctools.js
  27. 0 0
      doc/pub/tutorial/html/_static/down-pressed.png
  28. 0 0
      doc/pub/tutorial/html/_static/down.png
  29. 0 0
      doc/pub/tutorial/html/_static/epub.css
  30. 0 0
      doc/pub/tutorial/html/_static/file.png
  31. 0 0
      doc/pub/tutorial/html/_static/footerbg.png
  32. 0 0
      doc/pub/tutorial/html/_static/headerbg.png
  33. 0 0
      doc/pub/tutorial/html/_static/ie6.css
  34. 0 0
      doc/pub/tutorial/html/_static/jquery.js
  35. 0 0
      doc/pub/tutorial/html/_static/middlebg.png
  36. 0 0
      doc/pub/tutorial/html/_static/minus.png
  37. 0 0
      doc/pub/tutorial/html/_static/plus.png
  38. 3 2
      doc/tutorial/html/_static/pygments.css
  39. 78 34
      doc/tutorial/html/_static/pyramid.css
  40. 1 1
      doc/tutorial/html/html/_static/searchtools.js
  41. 0 0
      doc/pub/tutorial/html/_static/transparent.gif
  42. 0 0
      doc/pub/tutorial/html/_static/underscore.js
  43. 0 0
      doc/pub/tutorial/html/_static/up-pressed.png
  44. 0 0
      doc/pub/tutorial/html/_static/up.png
  45. 0 0
      doc/pub/tutorial/html/_static/websupport.js
  46. 57 9
      doc/tutorial/html/genindex.html
  47. 59 23
      doc/tutorial/html/index.html
  48. BIN
      doc/pub/tutorial/html/objects.inv
  49. 35 9
      doc/tutorial/html/html/search.html
  50. 1 0
      doc/pub/tutorial/html/searchindex.js
  51. 197 0
      doc/pub/tutorial/pysketcher.html
  52. BIN
      doc/pub/tutorial/pysketcher.pdf
  53. 8 2
      doc/src/tut/.dict4spell.txt
  54. 23 4
      doc/src/tut/basics.do.txt
  55. 55 4
      doc/src/tut/classes.do.txt
  56. BIN
      doc/src/tut/fig-tut/vehicle_v1.pdf
  57. BIN
      doc/src/tut/fig-tut/vehicle_v1.png
  58. BIN
      doc/src/tut/fig-tut/vehicle_v2.pdf
  59. BIN
      doc/src/tut/fig-tut/vehicle_v2.png
  60. BIN
      doc/src/tut/fig-tut/vehicle_v23.pdf
  61. BIN
      doc/src/tut/fig-tut/vehicle_v23.png
  62. BIN
      doc/src/tut/fig-tut/vehicle_v3.pdf
  63. BIN
      doc/src/tut/fig-tut/vehicle_v3.png
  64. 0 4
      doc/src/tut/implementation.do.txt
  65. 9 0
      doc/src/tut/main_sketcher.do.txt
  66. 22 16
      doc/src/tut/make.sh
  67. 10 0
      doc/src/tut/src-tut/README.txt
  68. BIN
      doc/src/tut/src-tut/test/tmp_Arc.png
  69. BIN
      doc/src/tut/src-tut/test/tmp_Axis.png
  70. BIN
      doc/src/tut/src-tut/test/tmp_Dashpot.png
  71. BIN
      doc/src/tut/src-tut/test/tmp_Distance_wText.png
  72. BIN
      doc/src/tut/src-tut/test/tmp_Rectangle.png
  73. BIN
      doc/src/tut/src-tut/test/tmp_Spring.png
  74. BIN
      doc/src/tut/src-tut/test/tmp_Triangle.png
  75. 42 0
      doc/src/tut/src-tut/vehicle0_scaling.py
  76. BIN
      doc/tutorial/html/_images/vehicle1.png
  77. BIN
      doc/tutorial/html/_images/wheel_on_inclined_plane.png
  78. 0 20
      doc/tutorial/html/_sources/index.txt
  79. 0 1383
      doc/tutorial/html/_sources/wrap_sketcher.txt
  80. 0 528
      doc/tutorial/html/_static/basic.css
  81. 0 556
      doc/tutorial/html/_static/searchtools.js
  82. 0 4
      doc/tutorial/html/html/.buildinfo
  83. BIN
      doc/tutorial/html/html/_images/Vehicle0_hier2.png
  84. BIN
      doc/tutorial/html/html/_images/vehicle0.png
  85. BIN
      doc/tutorial/html/html/_images/vehicle0_dim.png
  86. BIN
      doc/tutorial/html/html/_images/vehicle0_hier1.png
  87. BIN
      doc/tutorial/html/html/_images/vehicle1.png
  88. BIN
      doc/tutorial/html/html/_images/wheel_on_inclined_plane.png
  89. 0 1383
      doc/tutorial/html/html/_sources/wrap_sketcher.txt
  90. BIN
      doc/tutorial/html/html/_static/ajax-loader.gif
  91. BIN
      doc/tutorial/html/html/_static/comment-bright.png
  92. BIN
      doc/tutorial/html/html/_static/comment-close.png
  93. BIN
      doc/tutorial/html/html/_static/comment.png
  94. BIN
      doc/tutorial/html/html/_static/dialog-note.png
  95. BIN
      doc/tutorial/html/html/_static/dialog-seealso.png
  96. BIN
      doc/tutorial/html/html/_static/dialog-topic.png
  97. BIN
      doc/tutorial/html/html/_static/dialog-warning.png
  98. 0 247
      doc/tutorial/html/html/_static/doctools.js
  99. BIN
      doc/tutorial/html/html/_static/down-pressed.png
  100. 0 0
      doc/tutorial/html/html/_static/down.png

+ 0 - 1
README

@@ -1 +0,0 @@
-Python-based drawing tool for making sketches of mechanics problems.

+ 122 - 0
README.do.txt

@@ -0,0 +1,122 @@
+======= Pysketcher =======
+
+Tool for defining sketches of physics problems in terms of Python code.
+
+===== Purpose =====
+
+Pysketcher can typically be used to draw figures like
+
+FIGURE: [doc/src/tut/fig-tut/wheel_on_inclined_plane, width=600 frac=0.6]
+
+Such figures can easily be *interactively* made using a lot of drawing programs.
+A Pysketcher figure, however, is defined in terms of computer code. This gives
+a great advantage: geometric features can be parameterized in term
+of variables. Geometric variations are then trivially generated, and
+complicated figures can be built as a hierarchy of simpler elements.
+
+Here is a very simple figure that illustrates how geometric features are
+parameterized by variables (H, R, L, etc.):
+
+FIGURE: [doc/src/tut/fig-tut/vehicle0_dim, width=600 frac=0.6]
+
+One can then quickly change parameters, below to
+`R=0.5; L=5; H=2` and `R=2; L=7; H=1`, and get new figures that would be
+tedious to draw manually in an interactive tool.
+
+FIGURE: [doc/src/tut/fig-tut/vehicle_v23, width=800]
+
+Another major feature of Pysketcher is the ability to let the
+sketch be dynamic and make an animation of the time evolution.
+Here is an example of a very simple vehicle on a bumpy road,
+where the solution of a differential equation (upper blue line) is fed
+back to the sketch to make a vertical displacement of the spring and
+other objects in the vehicle. "View animation": "http://hplgit.github.io/bumpy/doc/src/mov-bumpy/m2_k1_5_b0_2/index.html" (the animation was created by
+"this Pysketcher script": "https://github.com/hplgit/bumpy/blob/master/doc/src/fig-bumpy/bumpy_road_fig.py").
+
+FIGURE: [http://hplgit.github.io/bumpy/doc/src/mov-bumpy/m2_k1_5_b0_2/tmp_frame_0030.png, width=600]
+
+
+===== Tutorial =====
+
+For an introduction to Pysketcher, see the tutorial in "HTML": "http://hplgit.github.io/pysketcher/doc/pub/pysketcher.html", "Sphinx": "http://hplgit.github.io/pysketcher/doc/pub/html/index.html", or "PDF": "http://hplgit/github.io/pysketcher/doc/pub/pysketcher.pdf" format (or a simplified version of
+the tutorial in Chapter 9 in "A Primer on Scientific Programming with Python": "http://www.amazon.com/Scientific-Programming-Computational-Science-Engineering/dp/3642549586/ref=sr_1_2?s=books&ie=UTF8&qid=1407225588&sr=1-2&keywords=langtangen", by H. P. Langtangen, Springer, 2014).
+
+===== Examples =====
+
+See the `examples` directory for some examples beyond the more basic
+ones in the tutorial.
+For example, a pendulum and its body diagram,
+
+FIGURE: [examples/pendulum2, width=800 frac=1]
+
+can be created by the program "`examples/pendulum.py`": "https://github.com/hplgit/pysketcher/tree/master/examples/pendulum.py".
+
+===== Technology =====
+
+Pysketcher applies Matplotlib to make the drawings, but it is quite
+easy to replace the backend `MatplotlibDraw.py` by similar code utilizing
+TikZ or another plotting package. The Pysketcher software is a thin
+layer basically constructing a tree structure of elements in the
+sketch. A lot of classes are offered for different type of basic
+elements, such as Circle, Rectangle, Text, Text with arrow, Force,
+arbitrary curve, etc.
+Complicated figures can be created by sticking one
+figure into another
+(i.e., hierarchical building of figures by sticking one tree
+structure into another).
+
+===== Citation =====
+
+If you use Pysketcher and want to cite it, you can either cite this
+web site or the book
+that has the original documentation of the tool.
+
+BibTeX format:
+
+!bc
+@book{Langtangen_2014,
+  title = {A Primer on Scientific Programming With {P}ython},
+  author = {H. P. Langtangen},
+  year = {2014},
+  publisher = {Springer},
+  edition = {Fourth},
+}
+
+@misc{Pysketcher,
+  title = {{P}ysketcher: {D}rawing tool for making sketches},
+  author = {H. P. Langtangen},
+  url = {https://github.com/hplgit/pysketcher},
+  key = {Pysketcher},
+  note = {\url{https://github.com/hplgit/pysketcher}},
+}
+!ec
+
+Publish format:
+
+!bc
+* books
+** A Primer on Scientific Programming With {P}ython
+   key:       Langtangen_2014
+   author:    H. P. Langtangen
+   year:      2014
+   publisher: Springer
+   status:    published
+   edition:   Fourth
+   entrytype: book
+* misc
+** {P}ysketcher: {D}rawing tool for making sketches
+   key:       Pysketcher
+   author:    H. P. Langtangen
+   url:       https://github.com/hplgit/pysketcher
+   status:    published
+   sortkey:   Pysketcher
+   note:      \url{https://github.com/hplgit/pysketcher}
+!ec
+
+===== History =====
+
+Pysketcher was first constructed as a powerful educational example on
+object-oriented programming for the book
+*A Primer on Scientific Programming With Python*, but the tool quickly
+became so useful for the author that it was further developed and
+heavily used for creating figures in other documents.

+ 125 - 0
README.md

@@ -0,0 +1,125 @@
+## Pysketcher
+
+Tool for defining sketches of physics problems in terms of Python code.
+
+### Purpose
+
+Pysketcher can typically be used to draw figures like
+
+<!-- <img src="doc/src/tut/fig-tut/wheel_on_inclined_plane.png" width=600> -->
+![](doc/src/tut/fig-tut/wheel_on_inclined_plane.png)
+
+Such figures can easily be *interactively* made using a lot of drawing programs.
+A Pysketcher figure, however, is defined in terms of computer code. This gives
+a great advantage: geometric features can be parameterized in term
+of variables, as here:
+
+<!-- <img src="doc/src/tut/fig-tut/vehicle0_dim.png" width=600> -->
+![](doc/src/tut/fig-tut/vehicle0_dim.png)
+
+One can then quickly change parameters, here to
+`R=0.5; L=5; H=2` and `R=2; L=7; H=1`, and get new figures that would be
+tedious to draw manually in an interactive tool.
+
+<!-- <img src="doc/src/tut/fig-tut/vehicle_v23.png" width=800> -->
+![](doc/src/tut/fig-tut/vehicle_v23.png)
+
+Another major feature of Pysketcher is the ability to let animate the
+sketch. Here is an example of a very simple vehicle on a bumpy road,
+where the solution of a differential equation (upper blue line) is fed
+back to the sketch to make a vertical displacement of the spring and
+other objects in the vehicle, [view animation](http://hplgit.github.io/bumpy/doc/src/mov-bumpy/m2_k1_5_b0_2/index.html) (the animation was created by
+[this Pysketcher script](https://github.com/hplgit/bumpy/blob/master/doc/src/fig-bumpy/bumpy_road_fig.py)).
+
+<!-- <img src="http://hplgit.github.io/bumpy/doc/src/mov-bumpy/m2_k1_5_b0_2/tmp_frame_0030.png" width=600> -->
+![](http://hplgit.github.io/bumpy/doc/src/mov-bumpy/m2_k1_5_b0_2/tmp_frame_0030.png)
+
+
+### Tutorial
+
+For an introduction to Pysketcher, see the tutorial in [HTML](http://hplgit.github.io/pysketcher/doc/pub/pysketcher.html), [Sphinx](http://hplgit.github.io/pysketcher/doc/pub/html/index.html), or [PDF](http://hplgit/github.io/pysketcher/doc/pub/pysketcher.pdf) format (or a simplified version of
+the tutorial in Chapter 9 in [A Primer on Scientific Programming with Python](http://www.amazon.com/Scientific-Programming-Computational-Science-Engineering/dp/3642549586/ref=sr_1_2?s=books&ie=UTF8&qid=1407225588&sr=1-2&keywords=langtangen), by H. P. Langtangen, Springer, 2014).
+
+### Examples
+
+See the `examples` directory for some examples beyond the more basic
+ones in the tutorial.
+For example, a pendulum and its body diagram,
+
+<!-- <img src="examples/pendulum2.png" width=800> -->
+![](examples/pendulum2.png)
+
+can be created by the program [`examples/pendulum.py`](https://github.com/hplgit/pysketcher/tree/master/examples/pendulum.py).
+
+### Technology
+
+Pysketcher applies Matplotlib to make the drawings, but it is quite
+easy to replace the backend `MatplotlibDraw.py` by similar code utilizing
+TikZ or another plotting package. The Pysketcher software is a thin
+layer basically constructing a tree structure of elements in the
+sketch. A lot of classes are offered for different type of basic
+elements, such as Circle, Rectangle, Text, Text with arrow, Force,
+arbitrary curve, etc.
+Complicated figures can be created by sticking one
+figure into another
+(i.e., hierarchical building of figures by sticking one tree
+structure into another).
+
+### Citation
+
+If you use Pysketcher and want to cite it, you can either cite this
+web site or the book
+that has the original documentation of the tool.
+
+BibTeX format:
+
+
+```
+@book{Langtangen_2014,
+  title = {A Primer on Scientific Programming With {P}ython},
+  author = {H. P. Langtangen},
+  year = {2014},
+  publisher = {Springer},
+  edition = {Fourth},
+}
+
+@misc{Pysketcher,
+  title = {{P}ysketcher: {D}rawing tool for making sketches},
+  author = {H. P. Langtangen},
+  url = {https://github.com/hplgit/pysketcher},
+  key = {Pysketcher},
+  note = {\url{https://github.com/hplgit/pysketcher}},
+}
+```
+
+Publish format:
+
+
+```
+* books
+** A Primer on Scientific Programming With {P}ython
+   key:       Langtangen_2014
+   author:    H. P. Langtangen
+   year:      2014
+   publisher: Springer
+   status:    published
+   edition:   Fourth
+   entrytype: book
+* misc
+** {P}ysketcher: {D}rawing tool for making sketches
+   key:       Pysketcher
+   author:    H. P. Langtangen
+   url:       https://github.com/hplgit/pysketcher
+   status:    published
+   sortkey:   Pysketcher
+   note:      \url{https://github.com/hplgit/pysketcher}
+```
+
+### History
+
+Pysketcher was first constructed as a powerful educational example on
+object-oriented programming for the book
+*A Primer on Scientific Programming With Python*, but the tool quickly
+became so useful for the author that it was further developed and
+heavily used for creating figures in other documents.
+

+ 2 - 0
README.sh

@@ -0,0 +1,2 @@
+#!/bin/sh
+doconce format pandoc README --github_md

+ 197 - 0
doc/pub/tutorial/._pysketcher000.html

@@ -0,0 +1,197 @@
+<!--
+Automatically generated HTML file from DocOnce source
+(https://github.com/hplgit/doconce/)
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
+<meta name="description" content="Using Pysketcher to Create Principal Sketches of Physics Problems">
+<meta name="keywords" content="tree data structure,recursive function calls">
+
+<title>Using Pysketcher to Create Principal Sketches of Physics Problems</title>
+
+
+<style type="text/css">
+/* blueish style */
+
+/* Color definitions:  http://www.december.com/html/spec/color0.html
+   CSS examples:       http://www.w3schools.com/css/css_examples.asp */
+
+body {
+  margin-top: 1.0em;
+  background-color: #ffffff;
+  font-family: Helvetica, Arial, FreeSans, san-serif;
+  color: #000000;
+}
+h1 { font-size: 1.8em; color: #1e36ce; }
+h2 { font-size: 1.6em; color: #1e36ce; }
+h3 { font-size: 1.4em; color: #1e36ce; }
+a { color: #1e36ce; text-decoration:none; }
+tt { font-family: "Courier New", Courier; }
+/* pre style removed because it will interfer with pygments */
+p { text-indent: 0px; }
+hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
+p.caption { width: 80%; font-style: normal; text-align: left; }
+hr.figure { border: 0; width: 80%; border-bottom: 1px solid #aaa}
+
+div { text-align: justify; text-justify: inter-word; }
+</style>
+
+
+</head>
+
+<!-- tocinfo
+{'highest level': 1,
+ 'sections': [(' A First Glimpse of Pysketcher ', 1, None, '___sec0'),
+              (' Basic Construction of Sketches ', 2, None, '___sec1'),
+              (' Basic Drawing ', 3, None, '___sec2'),
+              (' Groups of Objects ', 3, None, '___sec3'),
+              (' Changing Line Styles and Colors ', 3, None, '___sec4'),
+              (' The Figure Composition as an Object Hierarchy ',
+               3,
+               None,
+               '___sec5'),
+              (' Animation: Translating the Vehicle ', 3, None, '___sec6'),
+              (' Animation: Rolling the Wheels ',
+               3,
+               'sketcher:vehicle1:anim',
+               'sketcher:vehicle1:anim'),
+              (' Basic Shapes ', 1, None, '___sec8'),
+              (' Axis ', 2, None, '___sec9'),
+              (' Distance with Text ', 2, None, '___sec10'),
+              (' Rectangle ', 2, None, '___sec11'),
+              (' Triangle ', 2, None, '___sec12'),
+              (' Arc ', 2, None, '___sec13'),
+              (' Spring ', 2, None, '___sec14'),
+              (' Dashpot ', 2, None, '___sec15'),
+              (' Wavy ', 2, None, '___sec16'),
+              (' Stochastic curves ', 2, None, '___sec17'),
+              (' Inner Workings of the Pysketcher Tool ',
+               1,
+               None,
+               '___sec18'),
+              (' Example of Classes for Geometric Objects ',
+               2,
+               None,
+               '___sec19'),
+              (' Simple Geometric Objects ', 3, None, '___sec20'),
+              (' Class Curve ', 3, None, '___sec21'),
+              (' Compound Geometric Objects ', 3, None, '___sec22'),
+              (' Adding Functionality via Recursion ', 2, None, '___sec23'),
+              (' Basic Principles of Recursion ', 3, None, '___sec24'),
+              (' Explaining Recursion ', 3, None, '___sec25'),
+              (' Scaling, Translating, and Rotating a Figure ',
+               2,
+               'sketcher:scaling',
+               'sketcher:scaling'),
+              (' Scaling ', 3, None, '___sec27'),
+              (' Translation ', 3, None, '___sec28'),
+              (' Rotation ', 3, None, '___sec29')]}
+end of tocinfo -->
+
+<body>
+
+
+
+<script type="text/x-mathjax-config">
+MathJax.Hub.Config({
+  TeX: {
+     equationNumbers: {  autoNumber: "none"  },
+     extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
+  }
+});
+</script>
+<script type="text/javascript"
+ src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
+</script>
+
+
+
+    
+<a name="part0000"></a>
+<p>
+<!-- begin top navigation -->
+<table style="width: 100%"><tr><td>
+</td><td>
+<div style="text-align: right;"><a href="._pysketcher001.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/next1.png" border=0 alt="Next &raquo;"></a></div>
+</td></tr></table>
+<!-- end top navigation -->
+</p>
+
+<p>
+<!-- ------------------- main content ---------------------- -->
+
+
+
+<center><h1>Using Pysketcher to Create Principal Sketches of Physics Problems</h1></center>  <!-- document title -->
+
+<p>
+<!-- author(s): Hans Petter Langtangen -->
+
+<center>
+<b>Hans Petter Langtangen</b> [1, 2]
+</center>
+
+<p>
+<!-- institution(s) -->
+
+<center>[1] <b>Center for Biomedical Computing, Simula Research Laboratory</b></center>
+<center>[2] <b>Department of Informatics, University of Oslo</b></center>
+<p>
+<center><h4>Apr 27, 2015</h4></center> <!-- date -->
+<p>
+
+<!-- begin box -->
+<div style="width: 95%; padding: 10px; border: 1px solid #000; border-radius: 4px;">
+This document is derived from Chapter 9 in the book
+<a href="http://www.amazon.com/Scientific-Programming-Computational-Science-Engineering/dp/3642549586/ref=sr_1_2?s=books&ie=UTF8&qid=1407225588&sr=1-2&keywords=langtangen" target="_self">A Primer on Scientific Programming with Python</a>, by H. P. Langtangen,
+4th edition, Springer, 2014.
+</div>
+<!-- end box -->
+
+
+<p>
+<b>Abstract.</b> Pysketcher is a Python package which allows principal sketches of
+physics and mechanics problems to be realized through short programs
+instead of interactive (and potentially tedious and inaccurate)
+drawing.  Elements of the sketch, such as lines, circles, angles,
+forces, coordinate systems, etc., are realized as objects and
+collected in hierarchical structures. Parts of the hierarchical
+structures can easily change line styles and colors, or be copied,
+scaled, translated, and rotated. These features make it
+straightforward to move parts of the sketch to create animation,
+usually in accordance with the physics of the underlying problem.
+Exact dimensioning of the elements in the sketch is trivial to obtain
+since distances are specified in computer code.
+
+<p>
+Pysketcher is easy to learn from a number of examples. Beyond
+essential Python programming and a knowledge about mechanics problems,
+no further background is required.
+
+<p>
+<!-- Task (can be questions): make sketches of physical problems, see fig -->
+<!-- through user-friendly composition of basic shapes -->
+<!-- Desired knowledge: plotting curves, basic OO (ch. X.Y, ...) -->
+<!-- Required knowledge? -->
+<!-- Learning Goals: these targets the inner workings of pysketcher, -->
+<!-- which is just a part of this document... -->
+
+<p>
+<p>
+<!-- begin bottom navigation -->
+<table style="width: 100%"><tr><td>
+</td><td>
+<div style="text-align: right;"><a href="._pysketcher001.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/next1.png" border=0 alt="Next &raquo;"></a></div>
+</td></tr></table>
+<!-- end bottom navigation -->
+</p>
+
+<!-- ------------------- end of main content --------------- -->
+
+
+</body>
+</html>
+    
+

+ 813 - 0
doc/pub/tutorial/._pysketcher001.html

@@ -0,0 +1,813 @@
+<!--
+Automatically generated HTML file from DocOnce source
+(https://github.com/hplgit/doconce/)
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
+<meta name="description" content="Using Pysketcher to Create Principal Sketches of Physics Problems">
+<meta name="keywords" content="tree data structure,recursive function calls">
+
+<title>Using Pysketcher to Create Principal Sketches of Physics Problems</title>
+
+
+<style type="text/css">
+/* blueish style */
+
+/* Color definitions:  http://www.december.com/html/spec/color0.html
+   CSS examples:       http://www.w3schools.com/css/css_examples.asp */
+
+body {
+  margin-top: 1.0em;
+  background-color: #ffffff;
+  font-family: Helvetica, Arial, FreeSans, san-serif;
+  color: #000000;
+}
+h1 { font-size: 1.8em; color: #1e36ce; }
+h2 { font-size: 1.6em; color: #1e36ce; }
+h3 { font-size: 1.4em; color: #1e36ce; }
+a { color: #1e36ce; text-decoration:none; }
+tt { font-family: "Courier New", Courier; }
+/* pre style removed because it will interfer with pygments */
+p { text-indent: 0px; }
+hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
+p.caption { width: 80%; font-style: normal; text-align: left; }
+hr.figure { border: 0; width: 80%; border-bottom: 1px solid #aaa}
+
+div { text-align: justify; text-justify: inter-word; }
+</style>
+
+
+</head>
+
+<!-- tocinfo
+{'highest level': 1,
+ 'sections': [(' A First Glimpse of Pysketcher ', 1, None, '___sec0'),
+              (' Basic Construction of Sketches ', 2, None, '___sec1'),
+              (' Basic Drawing ', 3, None, '___sec2'),
+              (' Groups of Objects ', 3, None, '___sec3'),
+              (' Changing Line Styles and Colors ', 3, None, '___sec4'),
+              (' The Figure Composition as an Object Hierarchy ',
+               3,
+               None,
+               '___sec5'),
+              (' Animation: Translating the Vehicle ', 3, None, '___sec6'),
+              (' Animation: Rolling the Wheels ',
+               3,
+               'sketcher:vehicle1:anim',
+               'sketcher:vehicle1:anim'),
+              (' Basic Shapes ', 1, None, '___sec8'),
+              (' Axis ', 2, None, '___sec9'),
+              (' Distance with Text ', 2, None, '___sec10'),
+              (' Rectangle ', 2, None, '___sec11'),
+              (' Triangle ', 2, None, '___sec12'),
+              (' Arc ', 2, None, '___sec13'),
+              (' Spring ', 2, None, '___sec14'),
+              (' Dashpot ', 2, None, '___sec15'),
+              (' Wavy ', 2, None, '___sec16'),
+              (' Stochastic curves ', 2, None, '___sec17'),
+              (' Inner Workings of the Pysketcher Tool ',
+               1,
+               None,
+               '___sec18'),
+              (' Example of Classes for Geometric Objects ',
+               2,
+               None,
+               '___sec19'),
+              (' Simple Geometric Objects ', 3, None, '___sec20'),
+              (' Class Curve ', 3, None, '___sec21'),
+              (' Compound Geometric Objects ', 3, None, '___sec22'),
+              (' Adding Functionality via Recursion ', 2, None, '___sec23'),
+              (' Basic Principles of Recursion ', 3, None, '___sec24'),
+              (' Explaining Recursion ', 3, None, '___sec25'),
+              (' Scaling, Translating, and Rotating a Figure ',
+               2,
+               'sketcher:scaling',
+               'sketcher:scaling'),
+              (' Scaling ', 3, None, '___sec27'),
+              (' Translation ', 3, None, '___sec28'),
+              (' Rotation ', 3, None, '___sec29')]}
+end of tocinfo -->
+
+<body>
+
+
+
+<script type="text/x-mathjax-config">
+MathJax.Hub.Config({
+  TeX: {
+     equationNumbers: {  autoNumber: "none"  },
+     extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
+  }
+});
+</script>
+<script type="text/javascript"
+ src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
+</script>
+
+
+
+    
+<a name="part0001"></a>
+<p>
+<!-- begin top navigation -->
+<table style="width: 100%"><tr><td>
+<div style="text-align: left;"><a href="._pysketcher000.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/prev1.png" border=0 alt="&laquo; Previous"></a></div>
+</td><td>
+<div style="text-align: right;"><a href="._pysketcher002.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/next1.png" border=0 alt="Next &raquo;"></a></div>
+</td></tr></table>
+<!-- end top navigation -->
+</p>
+
+<p>
+<!-- !split -->
+
+<p>
+2DO:
+
+<ul>
+ <li> two wheels of different radii on inclined plane coupled to
+   correct solution</li>
+ <li> <a href="http://inventwithpython.com/chapter17.html" target="_self">Pygame backend</a></li>
+</ul>
+
+<h1 id="___sec0">A First Glimpse of Pysketcher </h1>
+
+<p>
+Formulation of physical problems makes heavy use of <em>principal sketches</em>
+such as the one in Figure <a href="#sketcher:fig:inclinedplane">1</a>.
+This particular sketch illustrates the classical mechanics problem
+of a rolling wheel on an inclined plane.
+The figure
+is made up many individual elements: a rectangle
+filled with a pattern (the inclined plane), a hollow circle with color
+(the wheel), arrows with labels (the \( N \) and \( Mg \) forces, and the \( x \)
+axis), an angle with symbol \( \theta \), and a dashed line indicating the
+starting location of the wheel.
+
+<p>
+Drawing software and plotting programs can produce such figures quite
+easily in principle, but the amount of details the user needs to
+control with the mouse can be substantial. Software more tailored to
+producing sketches of this type would work with more convenient
+abstractions, such as circle, wall, angle, force arrow, axis, and so
+forth. And as soon we start <em>programming</em> to construct the figure we
+get a range of other powerful tools at disposal. For example, we can
+easily translate and rotate parts of the figure and make an animation
+that illustrates the physics of the problem.
+Programming as a superior alternative to interactive drawing is
+the mantra of this section.
+
+<p>
+<center> <!-- figure -->
+<hr class="figure">
+<center><p class="caption">Figure 1:  Sketch of a physics problem. <div id="sketcher:fig:inclinedplane"></div> </p></center>
+<p><img src="fig-tut/wheel_on_inclined_plane.png" align="bottom" width=400></p>
+</center>
+
+<h2 id="___sec1">Basic Construction of Sketches </h2>
+
+<p>
+Before attacking real-life sketches as in Figure <a href="#sketcher:fig:inclinedplane">1</a>
+we focus on the significantly simpler drawing shown
+in Figure <a href="#sketcher:fig:vehicle0">2</a>.  This toy sketch consists of
+several elements: two circles, two rectangles, and a &quot;ground&quot; element.
+
+<p>
+<center> <!-- figure -->
+<hr class="figure">
+<center><p class="caption">Figure 2:  Sketch of a simple figure. <div id="sketcher:fig:vehicle0"></div> </p></center>
+<p><img src="fig-tut/vehicle0_dim.png" align="bottom" width=600></p>
+</center>
+
+<p>
+When the sketch is defined in terms of computer code, it is natural to
+parameterize geometric features, such as the radius of the wheel (\( R \)),
+the center point of the left wheel (\( w_1 \)), as well as the height (\( H \)) and
+length (\( L \)) of the main part. The simple vehicle in
+Figure <a href="#sketcher:fig:vehicle0">2</a> is quickly drawn in almost any interactive
+tool. However, if we want to change the radius of the wheels, you need a
+sophisticated drawing tool to avoid redrawing the whole figure, while
+in computer code this is a matter of changing the \( R \) parameter and
+rerunning the program.
+For example, Figure <a href="#sketcher:fig:vehicle0b">3</a> shows
+a variation of the drawing in
+Figure <a href="#sketcher:fig:vehicle0">2</a> obtained by just setting
+\( R=0.5 \), \( L=5 \), \( H=2 \), and \( R=2 \). Being able
+to quickly change geometric sizes is key to many problem settings in
+physics and engineering, but then a program must define the geometry.
+
+<p>
+<center> <!-- figure -->
+<hr class="figure">
+<center><p class="caption">Figure 3:  Redrawing a figure with other geometric parameters. <div id="sketcher:fig:vehicle0b"></div> </p></center>
+<p><img src="fig-tut/vehicle_v2.png" align="bottom" width=500></p>
+</center>
+
+<h3 id="___sec2">Basic Drawing </h3>
+
+<p>
+A typical program creating these five elements is shown next.
+After importing the <code>pysketcher</code> package, the first task is always to
+define a coordinate system:
+
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">pysketcher</span> <span style="color: #008000; font-weight: bold">import</span> <span style="color: #666666">*</span>
+
+drawing_tool<span style="color: #666666">.</span>set_coordinate_system(
+    xmin<span style="color: #666666">=0</span>, xmax<span style="color: #666666">=10</span>, ymin<span style="color: #666666">=-1</span>, ymax<span style="color: #666666">=8</span>)
+</pre></div>
+<p>
+Instead of working with lengths expressed by specific numbers it is
+highly recommended to use variables to parameterize lengths as
+this makes it easier to change dimensions later.
+Here we introduce some key lengths for the radius of the wheels,
+distance between the wheels, etc.:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">R <span style="color: #666666">=</span> <span style="color: #666666">1</span>    <span style="color: #408080; font-style: italic"># radius of wheel</span>
+L <span style="color: #666666">=</span> <span style="color: #666666">4</span>    <span style="color: #408080; font-style: italic"># distance between wheels</span>
+H <span style="color: #666666">=</span> <span style="color: #666666">2</span>    <span style="color: #408080; font-style: italic"># height of vehicle body</span>
+w_1 <span style="color: #666666">=</span> <span style="color: #666666">5</span>  <span style="color: #408080; font-style: italic"># position of front wheel</span>
+drawing_tool<span style="color: #666666">.</span>set_coordinate_system(xmin<span style="color: #666666">=0</span>, xmax<span style="color: #666666">=</span>w_1 <span style="color: #666666">+</span> <span style="color: #666666">2*</span>L <span style="color: #666666">+</span> <span style="color: #666666">3*</span>R,
+                                   ymin<span style="color: #666666">=-1</span>, ymax<span style="color: #666666">=2*</span>R <span style="color: #666666">+</span> <span style="color: #666666">3*</span>H)
+</pre></div>
+<p>
+With the drawing area in place we can make the first <code>Circle</code> object
+in an intuitive fashion:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">wheel1 <span style="color: #666666">=</span> Circle(center<span style="color: #666666">=</span>(w_1, R), radius<span style="color: #666666">=</span>R)
+</pre></div>
+<p>
+to change dimensions later.
+
+<p>
+To translate the geometric information about the <code>wheel1</code> object to
+instructions for the plotting engine (in this case Matplotlib), one calls the
+<code>wheel1.draw()</code>. To display all drawn objects, one issues
+<code>drawing_tool.display()</code>. The typical steps are hence:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">wheel1 <span style="color: #666666">=</span> Circle(center<span style="color: #666666">=</span>(w_1, R), radius<span style="color: #666666">=</span>R)
+wheel1<span style="color: #666666">.</span>draw()
+
+<span style="color: #408080; font-style: italic"># Define other objects and call their draw() methods</span>
+drawing_tool<span style="color: #666666">.</span>display()
+drawing_tool<span style="color: #666666">.</span>savefig(<span style="color: #BA2121">&#39;tmp.png&#39;</span>)  <span style="color: #408080; font-style: italic"># store picture</span>
+</pre></div>
+<p>
+The next wheel can be made by taking a copy of <code>wheel1</code> and
+translating the object to the right according to a
+displacement vector \( (L,0) \):
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">wheel2 <span style="color: #666666">=</span> wheel1<span style="color: #666666">.</span>copy()
+wheel2<span style="color: #666666">.</span>translate((L,<span style="color: #666666">0</span>))
+</pre></div>
+<p>
+The two rectangles are also made in an intuitive way:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">under <span style="color: #666666">=</span> Rectangle(lower_left_corner<span style="color: #666666">=</span>(w_1<span style="color: #666666">-2*</span>R, <span style="color: #666666">2*</span>R),
+                  width<span style="color: #666666">=2*</span>R <span style="color: #666666">+</span> L <span style="color: #666666">+</span> <span style="color: #666666">2*</span>R, height<span style="color: #666666">=</span>H)
+over  <span style="color: #666666">=</span> Rectangle(lower_left_corner<span style="color: #666666">=</span>(w_1, <span style="color: #666666">2*</span>R <span style="color: #666666">+</span> H),
+                  width<span style="color: #666666">=2.5*</span>R, height<span style="color: #666666">=1.25*</span>H)
+</pre></div>
+
+<h3 id="___sec3">Groups of Objects </h3>
+
+<p>
+Instead of calling the <code>draw</code> method of every object, we can
+group objects and call <code>draw</code>, or perform other operations, for
+the whole group. For example, we may collect the two wheels
+in a <code>wheels</code> group and the <code>over</code> and <code>under</code> rectangles
+in a <code>body</code> group. The whole vehicle is a composition
+of its <code>wheels</code> and <code>body</code> groups. The code goes like
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">wheels  <span style="color: #666666">=</span> Composition({<span style="color: #BA2121">&#39;wheel1&#39;</span>: wheel1, <span style="color: #BA2121">&#39;wheel2&#39;</span>: wheel2})
+body    <span style="color: #666666">=</span> Composition({<span style="color: #BA2121">&#39;under&#39;</span>: under, <span style="color: #BA2121">&#39;over&#39;</span>: over})
+
+vehicle <span style="color: #666666">=</span> Composition({<span style="color: #BA2121">&#39;wheels&#39;</span>: wheels, <span style="color: #BA2121">&#39;body&#39;</span>: body})
+</pre></div>
+<p>
+The ground is illustrated by an object of type <code>Wall</code>,
+mostly used to indicate walls in sketches of mechanical systems.
+A <code>Wall</code> takes the <code>x</code> and <code>y</code> coordinates of some curve,
+and a <code>thickness</code> parameter, and creates a thick curve filled
+with a simple pattern. In this case the curve is just a flat
+line so the construction is made of two points on the
+ground line (\( (w_1-L,0) \) and \( (w_1+3L,0) \)):
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">ground <span style="color: #666666">=</span> Wall(x<span style="color: #666666">=</span>[w_1 <span style="color: #666666">-</span> L, w_1 <span style="color: #666666">+</span> <span style="color: #666666">3*</span>L], y<span style="color: #666666">=</span>[<span style="color: #666666">0</span>, <span style="color: #666666">0</span>], thickness<span style="color: #666666">=-0.3*</span>R)
+</pre></div>
+<p>
+The negative thickness makes the pattern-filled rectangle appear below
+the defined line, otherwise it appears above.
+
+<p>
+We may now collect all the objects in a &quot;top&quot; object that contains
+the whole figure:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">fig <span style="color: #666666">=</span> Composition({<span style="color: #BA2121">&#39;vehicle&#39;</span>: vehicle, <span style="color: #BA2121">&#39;ground&#39;</span>: ground})
+fig<span style="color: #666666">.</span>draw()  <span style="color: #408080; font-style: italic"># send all figures to plotting backend</span>
+drawing_tool<span style="color: #666666">.</span>display()
+drawing_tool<span style="color: #666666">.</span>savefig(<span style="color: #BA2121">&#39;tmp.png&#39;</span>)
+</pre></div>
+<p>
+The <code>fig.draw()</code> call will visit
+all subgroups, their subgroups,
+and so forth in the hierarchical tree structure of
+figure elements,
+and call <code>draw</code> for every object.
+
+<h3 id="___sec4">Changing Line Styles and Colors </h3>
+
+<p>
+Controlling the line style, line color, and line width is
+fundamental when designing figures. The <code>pysketcher</code>
+package allows the user to control such properties in
+single objects, but also set global properties that are
+used if the object has no particular specification of
+the properties. Setting the global properties are done like
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">drawing_tool<span style="color: #666666">.</span>set_linestyle(<span style="color: #BA2121">&#39;dashed&#39;</span>)
+drawing_tool<span style="color: #666666">.</span>set_linecolor(<span style="color: #BA2121">&#39;black&#39;</span>)
+drawing_tool<span style="color: #666666">.</span>set_linewidth(<span style="color: #666666">4</span>)
+</pre></div>
+<p>
+At the object level the properties are specified in a similar
+way:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">wheels<span style="color: #666666">.</span>set_linestyle(<span style="color: #BA2121">&#39;solid&#39;</span>)
+wheels<span style="color: #666666">.</span>set_linecolor(<span style="color: #BA2121">&#39;red&#39;</span>)
+</pre></div>
+<p>
+and so on.
+
+<p>
+Geometric figures can be specified as <em>filled</em>, either with a color or with a
+special visual pattern:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #408080; font-style: italic"># Set filling of all curves</span>
+drawing_tool<span style="color: #666666">.</span>set_filled_curves(color<span style="color: #666666">=</span><span style="color: #BA2121">&#39;blue&#39;</span>, pattern<span style="color: #666666">=</span><span style="color: #BA2121">&#39;/&#39;</span>)
+
+<span style="color: #408080; font-style: italic"># Turn off filling of all curves</span>
+drawing_tool<span style="color: #666666">.</span>set_filled_curves(<span style="color: #008000">False</span>)
+
+<span style="color: #408080; font-style: italic"># Fill the wheel with red color</span>
+wheel1<span style="color: #666666">.</span>set_filled_curves(<span style="color: #BA2121">&#39;red&#39;</span>)
+</pre></div>
+<p>
+<!-- <a href="http://packages.python.org/ete2/" target="_self"><tt>http://packages.python.org/ete2/</tt></a> for visualizing tree structures! -->
+
+<h3 id="___sec5">The Figure Composition as an Object Hierarchy </h3>
+
+<p>
+The composition of objects making up the figure
+is hierarchical, similar to a family, where
+each object has a parent and a number of children. Do a
+<code>print fig</code> to display the relations:
+<p>
+
+<!-- code=text (!bc dat) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">ground
+    wall
+vehicle
+    body
+        over
+            rectangle
+        under
+            rectangle
+    wheels
+        wheel1
+            arc
+        wheel2
+            arc
+</pre></div>
+<p>
+The indentation reflects how deep down in the hierarchy (family)
+we are.
+This output is to be interpreted as follows:
+
+<ul>
+  <li> <code>fig</code> contains two objects, <code>ground</code> and <code>vehicle</code></li>
+  <li> <code>ground</code> contains an object <code>wall</code></li>
+  <li> <code>vehicle</code> contains two objects, <code>body</code> and <code>wheels</code></li>
+  <li> <code>body</code> contains two objects, <code>over</code> and <code>under</code></li>
+  <li> <code>wheels</code> contains two objects, <code>wheel1</code> and <code>wheel2</code></li>
+</ul>
+
+In this listing there are also objects not defined by the
+programmer: <code>rectangle</code> and <code>arc</code>. These are of type <code>Curve</code>
+and automatically generated by the classes <code>Rectangle</code> and <code>Circle</code>.
+
+<p>
+More detailed information can be printed by
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">print</span> fig<span style="color: #666666">.</span>show_hierarchy(<span style="color: #BA2121">&#39;std&#39;</span>)
+</pre></div>
+<p>
+yielding the output
+<p>
+
+<!-- code=text (!bc dat) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">ground (Wall):
+    wall (Curve): 4 coords fillcolor=&#39;white&#39; fillpattern=&#39;/&#39;
+vehicle (Composition):
+    body (Composition):
+        over (Rectangle):
+            rectangle (Curve): 5 coords
+        under (Rectangle):
+            rectangle (Curve): 5 coords
+    wheels (Composition):
+        wheel1 (Circle):
+            arc (Curve): 181 coords
+        wheel2 (Circle):
+            arc (Curve): 181 coords
+</pre></div>
+<p>
+Here we can see the class type for each figure object, how many
+coordinates that are involved in basic figures (<code>Curve</code> objects), and
+special settings of the basic figure (fillcolor, line types, etc.).
+For example, <code>wheel2</code> is a <code>Circle</code> object consisting of an <code>arc</code>,
+which is a <code>Curve</code> object consisting of 181 coordinates (the
+points needed to draw a smooth circle). The <code>Curve</code> objects are the
+only objects that really holds specific coordinates to be drawn.
+The other object types are just compositions used to group
+parts of the complete figure.
+
+<p>
+One can also get a graphical overview of the hierarchy of figure objects
+that build up a particular figure <code>fig</code>.
+Just call <code>fig.graphviz_dot('fig')</code> to produce a file <code>fig.dot</code> in
+the <em>dot format</em>. This file contains relations between parent and
+child objects in the figure and can be turned into an image,
+as in Figure <a href="#sketcher:fig:vehicle0:hier1">4</a>, by
+running the <code>dot</code> program:
+<p>
+
+<!-- code=text (!bc sys) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">Terminal&gt; dot -Tpng -o fig.png fig.dot
+</pre></div>
+<p>
+<center> <!-- figure -->
+<hr class="figure">
+<center><p class="caption">Figure 4:  Hierarchical relation between figure objects. <div id="sketcher:fig:vehicle0:hier1"></div> </p></center>
+<p><img src="fig-tut/vehicle0_hier1.png" align="bottom" width=500></p>
+</center>
+
+<p>
+The call <code>fig.graphviz_dot('fig', classname=True)</code> makes a <code>fig.dot</code> file
+where the class type of each object is also visible, see
+Figure <a href="#sketcher:fig:vehicle0:hier2">5</a>. The ability to write out the
+object hierarchy or view it graphically can be of great help when
+working with complex figures that involve layers of subfigures.
+
+<p>
+<center> <!-- figure -->
+<hr class="figure">
+<center><p class="caption">Figure 5:  Hierarchical relation between figure objects, including their class names. <div id="sketcher:fig:vehicle0:hier2"></div> </p></center>
+<p><img src="fig-tut/Vehicle0_hier2.png" align="bottom" width=500></p>
+</center>
+
+<p>
+Any of the objects can in the program be reached through their names, e.g.,
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>]
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>]
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>][<span style="color: #BA2121">&#39;wheel2&#39;</span>]
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>][<span style="color: #BA2121">&#39;wheel2&#39;</span>][<span style="color: #BA2121">&#39;arc&#39;</span>]
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>][<span style="color: #BA2121">&#39;wheel2&#39;</span>][<span style="color: #BA2121">&#39;arc&#39;</span>]<span style="color: #666666">.</span>x  <span style="color: #408080; font-style: italic"># x coords</span>
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>][<span style="color: #BA2121">&#39;wheel2&#39;</span>][<span style="color: #BA2121">&#39;arc&#39;</span>]<span style="color: #666666">.</span>y  <span style="color: #408080; font-style: italic"># y coords</span>
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>][<span style="color: #BA2121">&#39;wheel2&#39;</span>][<span style="color: #BA2121">&#39;arc&#39;</span>]<span style="color: #666666">.</span>linestyle
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>][<span style="color: #BA2121">&#39;wheel2&#39;</span>][<span style="color: #BA2121">&#39;arc&#39;</span>]<span style="color: #666666">.</span>linetype
+</pre></div>
+<p>
+Grabbing a part of the figure this way is handy for
+changing properties of that part, for example, colors, line styles
+(see Figure <a href="#sketcher:fig:vehicle0:v2">6</a>):
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>]<span style="color: #666666">.</span>set_filled_curves(<span style="color: #BA2121">&#39;blue&#39;</span>)
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>]<span style="color: #666666">.</span>set_linewidth(<span style="color: #666666">6</span>)
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>]<span style="color: #666666">.</span>set_linecolor(<span style="color: #BA2121">&#39;black&#39;</span>)
+
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;body&#39;</span>][<span style="color: #BA2121">&#39;under&#39;</span>]<span style="color: #666666">.</span>set_filled_curves(<span style="color: #BA2121">&#39;red&#39;</span>)
+
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;body&#39;</span>][<span style="color: #BA2121">&#39;over&#39;</span>]<span style="color: #666666">.</span>set_filled_curves(pattern<span style="color: #666666">=</span><span style="color: #BA2121">&#39;/&#39;</span>)
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;body&#39;</span>][<span style="color: #BA2121">&#39;over&#39;</span>]<span style="color: #666666">.</span>set_linewidth(<span style="color: #666666">14</span>)
+fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;body&#39;</span>][<span style="color: #BA2121">&#39;over&#39;</span>][<span style="color: #BA2121">&#39;rectangle&#39;</span>]<span style="color: #666666">.</span>linewidth <span style="color: #666666">=</span> <span style="color: #666666">4</span>
+</pre></div>
+<p>
+The last line accesses the <code>Curve</code> object directly, while the line above,
+accesses the <code>Rectangle</code> object, which will then set the linewidth of
+its <code>Curve</code> object, and other objects if it had any.
+The result of the actions above is shown in Figure <a href="#sketcher:fig:vehicle0:v2">6</a>.
+
+<p>
+<center> <!-- figure -->
+<hr class="figure">
+<center><p class="caption">Figure 6:  Left: Basic line-based drawing. Right: Thicker lines and filled parts. <div id="sketcher:fig:vehicle0:v2"></div> </p></center>
+<p><img src="fig-tut/vehicle0.png" align="bottom" width=700></p>
+</center>
+
+<p>
+We can also change position of parts of the figure and thereby make
+animations, as shown next.
+
+<h3 id="___sec6">Animation: Translating the Vehicle </h3>
+
+<p>
+Can we make our little vehicle roll? A first attempt will be to
+fake rolling by just displacing all parts of the vehicle.
+The relevant parts constitute the <code>fig['vehicle']</code> object.
+This part of the figure can be translated, rotated, and scaled.
+A translation along the ground means a translation in \( x \) direction,
+say a length \( L \) to the right:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>]<span style="color: #666666">.</span>translate((L,<span style="color: #666666">0</span>))
+</pre></div>
+<p>
+You need to erase, draw, and display to see the movement:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">drawing_tool<span style="color: #666666">.</span>erase()
+fig<span style="color: #666666">.</span>draw()
+drawing_tool<span style="color: #666666">.</span>display()
+</pre></div>
+<p>
+Without erasing, the old drawing of the vehicle will remain in
+the figure so you get two vehicles. Without <code>fig.draw()</code> the
+new coordinates of the vehicle will not be communicated to
+the drawing tool, and without calling display the updated
+drawing will not be visible.
+
+<p>
+A figure that moves in time is conveniently realized by the
+function <code>animate</code>:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">animate(fig, tp, action)
+</pre></div>
+<p>
+Here, <code>fig</code> is the entire figure, <code>tp</code> is an array of
+time points, and <code>action</code> is a user-specified function that changes
+<code>fig</code> at a specific time point. Typically, <code>action</code> will move
+parts of <code>fig</code>.
+
+<p>
+In the present case we can define the movement through a velocity
+function <code>v(t)</code> and displace the figure <code>v(t)*dt</code> for small time
+intervals <code>dt</code>. A possible velocity function is
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">v</span>(t):
+    <span style="color: #008000; font-weight: bold">return</span> <span style="color: #666666">-8*</span>R<span style="color: #666666">*</span>t<span style="color: #666666">*</span>(<span style="color: #666666">1</span> <span style="color: #666666">-</span> t<span style="color: #666666">/</span>(<span style="color: #666666">2*</span>R))
+</pre></div>
+<p>
+Our action function for horizontal displacements <code>v(t)*dt</code> becomes
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">move</span>(t, fig):
+    x_displacement <span style="color: #666666">=</span> dt<span style="color: #666666">*</span>v(t)
+    fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>]<span style="color: #666666">.</span>translate((x_displacement, <span style="color: #666666">0</span>))
+</pre></div>
+<p>
+Since our velocity is negative for \( t\in [0,2R] \) the displacement is
+to the left.
+
+<p>
+The <code>animate</code> function will for each time point <code>t</code> in <code>tp</code> erase
+the drawing, call <code>action(t, fig)</code>, and show the new figure by
+<code>fig.draw()</code> and <code>drawing_tool.display()</code>.
+Here we choose a resolution of the animation corresponding to
+25 time points in the time interval \( [0,2R] \):
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">import</span> <span style="color: #0000FF; font-weight: bold">numpy</span>
+tp <span style="color: #666666">=</span> numpy<span style="color: #666666">.</span>linspace(<span style="color: #666666">0</span>, <span style="color: #666666">2*</span>R, <span style="color: #666666">25</span>)
+dt <span style="color: #666666">=</span> tp[<span style="color: #666666">1</span>] <span style="color: #666666">-</span> tp[<span style="color: #666666">0</span>]  <span style="color: #408080; font-style: italic"># time step</span>
+
+animate(fig, tp, move, pause_per_frame<span style="color: #666666">=0.2</span>)
+</pre></div>
+<p>
+The <code>pause_per_frame</code> adds a pause, here 0.2 seconds, between
+each frame in the animation.
+
+<p>
+We can also ask <code>animate</code> to store each frame in a file:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">files <span style="color: #666666">=</span> animate(fig, tp, move_vehicle, moviefiles<span style="color: #666666">=</span><span style="color: #008000">True</span>,
+                pause_per_frame<span style="color: #666666">=0.2</span>)
+</pre></div>
+<p>
+The <code>files</code> variable, here <code>'tmp_frame_%04d.png'</code>,
+is the printf-specification used to generate the individual
+plot files. We can use this specification to make a video
+file via <code>ffmpeg</code> (or <code>avconv</code> on Debian-based Linux systems such
+as Ubuntu). Videos in the Flash and WebM formats can be created
+by
+
+<p>
+
+<!-- code=text (!bc sys) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">Terminal&gt; ffmpeg -r 12 -i tmp_frame_%04d.png -vcodec flv mov.flv
+Terminal&gt; ffmpeg -r 12 -i tmp_frame_%04d.png -vcodec libvpx mov.webm
+</pre></div>
+<p>
+An animated GIF movie can also be made using the <code>convert</code> program
+from the ImageMagick software suite:
+
+<p>
+
+<!-- code=text (!bc sys) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">Terminal&gt; convert -delay 20 tmp_frame*.png mov.gif
+Terminal&gt; animate mov.gif  # play movie
+</pre></div>
+<p>
+The delay between frames, in units of 1/100 s,
+governs the speed of the movie.
+To play the animated GIF file in a web page, simply insert
+<code>&lt;img src=&quot;mov.gif&quot;&gt;</code> in the HTML code.
+
+<p>
+The individual PNG frames can be directly played in a web
+browser by running
+
+<p>
+
+<!-- code=text (!bc sys) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">Terminal&gt; scitools movie output_file=mov.html fps=5 tmp_frame*
+</pre></div>
+<p>
+or calling
+
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">scitools.std</span> <span style="color: #008000; font-weight: bold">import</span> movie
+movie(files, encoder<span style="color: #666666">=</span><span style="color: #BA2121">&#39;html&#39;</span>, output_file<span style="color: #666666">=</span><span style="color: #BA2121">&#39;mov.html&#39;</span>)
+</pre></div>
+<p>
+in Python. Load the resulting file <code>mov.html</code> into a web browser
+to play the movie.
+
+<p>
+Try to run <a href="http://tinyurl.com/ot733jn/vehicle0.py" target="_self"><tt>vehicle0.py</tt></a> and
+then load <code>mov.html</code> into a browser, or play one of the <code>mov.*</code>
+video files.  Alternatively, you can view a ready-made <a href="http://tinyurl.com/oou9lp7/mov-tut/vehicle0.html" target="_self">movie</a>.
+
+<h3 id="sketcher:vehicle1:anim">Animation: Rolling the Wheels</h3>
+
+<p>
+It is time to show rolling wheels. To this end, we add spokes to the
+wheels, formed by two crossing lines, see Figure <a href="#sketcher:fig:vehicle1">7</a>.
+The construction of the wheels will now involve a circle and two lines:
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">wheel1 <span style="color: #666666">=</span> Composition({
+    <span style="color: #BA2121">&#39;wheel&#39;</span>: Circle(center<span style="color: #666666">=</span>(w_1, R), radius<span style="color: #666666">=</span>R),
+    <span style="color: #BA2121">&#39;cross&#39;</span>: Composition({<span style="color: #BA2121">&#39;cross1&#39;</span>: Line((w_1,<span style="color: #666666">0</span>),   (w_1,<span style="color: #666666">2*</span>R)),
+                          <span style="color: #BA2121">&#39;cross2&#39;</span>: Line((w_1<span style="color: #666666">-</span>R,R), (w_1<span style="color: #666666">+</span>R,R))})})
+wheel2 <span style="color: #666666">=</span> wheel1<span style="color: #666666">.</span>copy()
+wheel2<span style="color: #666666">.</span>translate((L,<span style="color: #666666">0</span>))
+</pre></div>
+<p>
+Observe that <code>wheel1.copy()</code> copies all the objects that make
+up the first wheel, and <code>wheel2.translate</code> translates all
+the copied objects.
+
+<p>
+<center> <!-- figure -->
+<hr class="figure">
+<center><p class="caption">Figure 7:  Wheels with spokes to illustrate rolling. <div id="sketcher:fig:vehicle1"></div> </p></center>
+<p><img src="fig-tut/vehicle1.png" align="bottom" width=400></p>
+</center>
+
+<p>
+The <code>move</code> function now needs to displace all the objects in the
+entire vehicle and also rotate the <code>cross1</code> and <code>cross2</code>
+objects in both wheels.
+The rotation angle follows from the fact that the arc length
+of a rolling wheel equals the displacement of the center of
+the wheel, leading to a rotation angle
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">angle <span style="color: #666666">=</span> <span style="color: #666666">-</span> x_displacement<span style="color: #666666">/</span>R
+</pre></div>
+<p>
+With <code>w_1</code> tracking the \( x \) coordinate of the center
+of the front wheel, we can rotate that wheel by
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">w1 <span style="color: #666666">=</span> fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>][<span style="color: #BA2121">&#39;wheel1&#39;</span>]
+<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">math</span> <span style="color: #008000; font-weight: bold">import</span> degrees
+w1<span style="color: #666666">.</span>rotate(degrees(angle), center<span style="color: #666666">=</span>(w_1, R))
+</pre></div>
+<p>
+The <code>rotate</code> function takes two parameters: the rotation angle
+(in degrees) and the center point of the rotation, which is the
+center of the wheel in this case. The other wheel is rotated by
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">w2 <span style="color: #666666">=</span> fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>][<span style="color: #BA2121">&#39;wheel2&#39;</span>]
+w2<span style="color: #666666">.</span>rotate(degrees(angle), center<span style="color: #666666">=</span>(w_1 <span style="color: #666666">+</span> L, R))
+</pre></div>
+<p>
+That is, the angle is the same, but the rotation point is different.
+The update of the center point is done by <code>w_1 += x_displacement</code>.
+The complete <code>move</code> function with translation of the entire
+vehicle and rotation of the wheels then becomes
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">w_1 <span style="color: #666666">=</span> w_1 <span style="color: #666666">+</span> L   <span style="color: #408080; font-style: italic"># start position</span>
+
+<span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">move</span>(t, fig):
+    x_displacement <span style="color: #666666">=</span> dt<span style="color: #666666">*</span>v(t)
+    fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>]<span style="color: #666666">.</span>translate((x_displacement, <span style="color: #666666">0</span>))
+
+    <span style="color: #408080; font-style: italic"># Rotate wheels</span>
+    <span style="color: #008000; font-weight: bold">global</span> w_1
+    w_1 <span style="color: #666666">+=</span> x_displacement
+    <span style="color: #408080; font-style: italic"># R*angle = -x_displacement</span>
+    angle <span style="color: #666666">=</span> <span style="color: #666666">-</span> x_displacement<span style="color: #666666">/</span>R
+    w1 <span style="color: #666666">=</span> fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>][<span style="color: #BA2121">&#39;wheel1&#39;</span>]
+    w1<span style="color: #666666">.</span>rotate(degrees(angle), center<span style="color: #666666">=</span>(w_1, R))
+    w2 <span style="color: #666666">=</span> fig[<span style="color: #BA2121">&#39;vehicle&#39;</span>][<span style="color: #BA2121">&#39;wheels&#39;</span>][<span style="color: #BA2121">&#39;wheel2&#39;</span>]
+    w2<span style="color: #666666">.</span>rotate(degrees(angle), center<span style="color: #666666">=</span>(w_1 <span style="color: #666666">+</span> L, R))
+</pre></div>
+<p>
+The complete example is found in the file
+<a href="http://tinyurl.com/ot733jn/vehicle1.py" target="_self"><tt>vehicle1.py</tt></a>. You may run this file or watch a <a href="http://tinyurl.com/oou9lp7/mov-tut/vehicle1.html" target="_self">ready-made movie</a>.
+
+<p>
+The advantages with making figures this way, through programming
+rather than using interactive drawing programs, are numerous.  For
+example, the objects are parameterized by variables so that various
+dimensions can easily be changed.  Subparts of the figure, possible
+involving a lot of figure objects, can change color, linetype, filling
+or other properties through a <em>single</em> function call.  Subparts of the
+figure can be rotated, translated, or scaled.  Subparts of the figure
+can also be copied and moved to other parts of the drawing
+area. However, the single most important feature is probably the
+ability to make animations governed by mathematical formulas or data
+coming from physics simulations of the problem, as shown in the example above.
+
+<p>
+<p>
+<!-- begin bottom navigation -->
+<table style="width: 100%"><tr><td>
+<div style="text-align: left;"><a href="._pysketcher000.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/prev1.png" border=0 alt="&laquo; Previous"></a></div>
+</td><td>
+<div style="text-align: right;"><a href="._pysketcher002.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/next1.png" border=0 alt="Next &raquo;"></a></div>
+</td></tr></table>
+<!-- end bottom navigation -->
+</p>
+
+<!-- ------------------- end of main content --------------- -->
+
+
+</body>
+</html>
+    
+

+ 523 - 0
doc/pub/tutorial/._pysketcher002.html

@@ -0,0 +1,523 @@
+<!--
+Automatically generated HTML file from DocOnce source
+(https://github.com/hplgit/doconce/)
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
+<meta name="description" content="Using Pysketcher to Create Principal Sketches of Physics Problems">
+<meta name="keywords" content="tree data structure,recursive function calls">
+
+<title>Using Pysketcher to Create Principal Sketches of Physics Problems</title>
+
+
+<style type="text/css">
+/* blueish style */
+
+/* Color definitions:  http://www.december.com/html/spec/color0.html
+   CSS examples:       http://www.w3schools.com/css/css_examples.asp */
+
+body {
+  margin-top: 1.0em;
+  background-color: #ffffff;
+  font-family: Helvetica, Arial, FreeSans, san-serif;
+  color: #000000;
+}
+h1 { font-size: 1.8em; color: #1e36ce; }
+h2 { font-size: 1.6em; color: #1e36ce; }
+h3 { font-size: 1.4em; color: #1e36ce; }
+a { color: #1e36ce; text-decoration:none; }
+tt { font-family: "Courier New", Courier; }
+/* pre style removed because it will interfer with pygments */
+p { text-indent: 0px; }
+hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
+p.caption { width: 80%; font-style: normal; text-align: left; }
+hr.figure { border: 0; width: 80%; border-bottom: 1px solid #aaa}
+
+div { text-align: justify; text-justify: inter-word; }
+</style>
+
+
+</head>
+
+<!-- tocinfo
+{'highest level': 1,
+ 'sections': [(' A First Glimpse of Pysketcher ', 1, None, '___sec0'),
+              (' Basic Construction of Sketches ', 2, None, '___sec1'),
+              (' Basic Drawing ', 3, None, '___sec2'),
+              (' Groups of Objects ', 3, None, '___sec3'),
+              (' Changing Line Styles and Colors ', 3, None, '___sec4'),
+              (' The Figure Composition as an Object Hierarchy ',
+               3,
+               None,
+               '___sec5'),
+              (' Animation: Translating the Vehicle ', 3, None, '___sec6'),
+              (' Animation: Rolling the Wheels ',
+               3,
+               'sketcher:vehicle1:anim',
+               'sketcher:vehicle1:anim'),
+              (' Basic Shapes ', 1, None, '___sec8'),
+              (' Axis ', 2, None, '___sec9'),
+              (' Distance with Text ', 2, None, '___sec10'),
+              (' Rectangle ', 2, None, '___sec11'),
+              (' Triangle ', 2, None, '___sec12'),
+              (' Arc ', 2, None, '___sec13'),
+              (' Spring ', 2, None, '___sec14'),
+              (' Dashpot ', 2, None, '___sec15'),
+              (' Wavy ', 2, None, '___sec16'),
+              (' Stochastic curves ', 2, None, '___sec17'),
+              (' Inner Workings of the Pysketcher Tool ',
+               1,
+               None,
+               '___sec18'),
+              (' Example of Classes for Geometric Objects ',
+               2,
+               None,
+               '___sec19'),
+              (' Simple Geometric Objects ', 3, None, '___sec20'),
+              (' Class Curve ', 3, None, '___sec21'),
+              (' Compound Geometric Objects ', 3, None, '___sec22'),
+              (' Adding Functionality via Recursion ', 2, None, '___sec23'),
+              (' Basic Principles of Recursion ', 3, None, '___sec24'),
+              (' Explaining Recursion ', 3, None, '___sec25'),
+              (' Scaling, Translating, and Rotating a Figure ',
+               2,
+               'sketcher:scaling',
+               'sketcher:scaling'),
+              (' Scaling ', 3, None, '___sec27'),
+              (' Translation ', 3, None, '___sec28'),
+              (' Rotation ', 3, None, '___sec29')]}
+end of tocinfo -->
+
+<body>
+
+
+
+<script type="text/x-mathjax-config">
+MathJax.Hub.Config({
+  TeX: {
+     equationNumbers: {  autoNumber: "none"  },
+     extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
+  }
+});
+</script>
+<script type="text/javascript"
+ src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
+</script>
+
+
+
+    
+<a name="part0002"></a>
+<p>
+<!-- begin top navigation -->
+<table style="width: 100%"><tr><td>
+<div style="text-align: left;"><a href="._pysketcher001.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/prev1.png" border=0 alt="&laquo; Previous"></a></div>
+</td><td>
+<div style="text-align: right;"><a href="._pysketcher003.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/next1.png" border=0 alt="Next &raquo;"></a></div>
+</td></tr></table>
+<!-- end top navigation -->
+</p>
+
+<p>
+<!-- !split -->
+
+<h1 id="___sec8">Basic Shapes </h1>
+
+<p>
+This section presents many of the basic shapes in Pysketcher:
+<code>Axis</code>, <code>Distance_wText</code>, <code>Rectangle</code>, 	<code>Triangle</code>, <code>Arc</code>,
+<code>Spring</code>, <code>Dashpot</code>, and <code>Wavy</code>.
+Each shape is demonstrated with a figure and a
+unit test that shows how the figure is constructed in Python code.
+
+<h2 id="___sec9">Axis </h2>
+
+<p>
+The <code>Axis</code> object gives the possibility draw a single axis to
+notify a coordinate system. Here is an example where we
+draw \( x \) and \( y \) axis of three coordinate systems of different
+rotation:
+
+<p>
+<br />
+<br />
+
+<p>
+<center><p><img src="fig-tut/Axis.png" align="bottom" width=500></p></center>
+
+<p>
+<br />
+<br />
+
+<p>
+The corresponding code looks like this:
+
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">test_Axis</span>():
+    drawing_tool<span style="color: #666666">.</span>set_coordinate_system(
+        xmin<span style="color: #666666">=0</span>, xmax<span style="color: #666666">=15</span>, ymin<span style="color: #666666">=-7</span>, ymax<span style="color: #666666">=8</span>, axis<span style="color: #666666">=</span><span style="color: #008000">True</span>,
+        instruction_file<span style="color: #666666">=</span><span style="color: #BA2121">&#39;tmp_Axis.py&#39;</span>)
+    <span style="color: #408080; font-style: italic"># Draw normal x and y axis with origin at (7.5, 2)</span>
+    <span style="color: #408080; font-style: italic"># in the coordinate system of the sketch: [0,15]x[-7,8]</span>
+    x_axis <span style="color: #666666">=</span> Axis((<span style="color: #666666">7.5</span>,<span style="color: #666666">2</span>), <span style="color: #666666">5</span>, <span style="color: #BA2121">&#39;x&#39;</span>, rotation_angle<span style="color: #666666">=0</span>)
+    y_axis <span style="color: #666666">=</span> Axis((<span style="color: #666666">7.5</span>,<span style="color: #666666">2</span>), <span style="color: #666666">5</span>, <span style="color: #BA2121">&#39;y&#39;</span>, rotation_angle<span style="color: #666666">=90</span>)
+    system <span style="color: #666666">=</span> Composition({<span style="color: #BA2121">&#39;x axis&#39;</span>: x_axis, <span style="color: #BA2121">&#39;y axis&#39;</span>: y_axis})
+    system<span style="color: #666666">.</span>draw()
+    drawing_tool<span style="color: #666666">.</span>display()
+
+    <span style="color: #408080; font-style: italic"># Rotate this system 40 degrees counter clockwise</span>
+    <span style="color: #408080; font-style: italic"># and draw it with dashed lines</span>
+    system<span style="color: #666666">.</span>set_linestyle(<span style="color: #BA2121">&#39;dashed&#39;</span>)
+    system<span style="color: #666666">.</span>rotate(<span style="color: #666666">40</span>, (<span style="color: #666666">7.5</span>,<span style="color: #666666">2</span>))
+    system<span style="color: #666666">.</span>draw()
+    drawing_tool<span style="color: #666666">.</span>display()
+
+    <span style="color: #408080; font-style: italic"># Rotate this system another 220 degrees and show</span>
+    <span style="color: #408080; font-style: italic"># with dotted lines</span>
+    system<span style="color: #666666">.</span>set_linestyle(<span style="color: #BA2121">&#39;dotted&#39;</span>)
+    system<span style="color: #666666">.</span>rotate(<span style="color: #666666">220</span>, (<span style="color: #666666">7.5</span>,<span style="color: #666666">2</span>))
+    system<span style="color: #666666">.</span>draw()
+    drawing_tool<span style="color: #666666">.</span>display()
+
+    drawing_tool<span style="color: #666666">.</span>display(<span style="color: #BA2121">&#39;Axis&#39;</span>)
+</pre></div>
+
+<h2 id="___sec10">Distance with Text </h2>
+
+<p>
+The object <code>Distance_wText</code> is used to display an arrow, to indicate
+a distance in a sketch, with an additional text in the middle of the arrow.
+
+<p>
+The figure
+
+<p>
+<br />
+<br />
+
+<p>
+<center><p><img src="fig-tut/Distance_wText.png" align="bottom" width=500></p></center>
+
+<p>
+<br />
+<br />
+
+<p>
+was produced by this code:
+
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">test_Distance_wText</span>():
+    drawing_tool<span style="color: #666666">.</span>set_coordinate_system(
+        xmin<span style="color: #666666">=0</span>, xmax<span style="color: #666666">=10</span>, ymin<span style="color: #666666">=0</span>, ymax<span style="color: #666666">=6</span>,
+        axis<span style="color: #666666">=</span><span style="color: #008000">True</span>, instruction_file<span style="color: #666666">=</span><span style="color: #BA2121">&#39;tmp_Distance_wText.py&#39;</span>)
+
+    fontsize<span style="color: #666666">=14</span>
+    t <span style="color: #666666">=</span> <span style="color: #BA2121">r&#39;$ 2\pi R^2 $&#39;</span>  <span style="color: #408080; font-style: italic"># sample text</span>
+    examples <span style="color: #666666">=</span> Composition({
+        <span style="color: #BA2121">&#39;a0&#39;</span>: Distance_wText((<span style="color: #666666">4</span>,<span style="color: #666666">5</span>), (<span style="color: #666666">8</span>, <span style="color: #666666">5</span>), t, fontsize),
+        <span style="color: #BA2121">&#39;a6&#39;</span>: Distance_wText((<span style="color: #666666">4</span>,<span style="color: #666666">5</span>), (<span style="color: #666666">4</span>, <span style="color: #666666">4</span>), t, fontsize),
+        <span style="color: #BA2121">&#39;a1&#39;</span>: Distance_wText((<span style="color: #666666">0</span>,<span style="color: #666666">2</span>), (<span style="color: #666666">2</span>, <span style="color: #666666">4.5</span>), t, fontsize),
+        <span style="color: #BA2121">&#39;a2&#39;</span>: Distance_wText((<span style="color: #666666">0</span>,<span style="color: #666666">2</span>), (<span style="color: #666666">2</span>, <span style="color: #666666">0</span>), t, fontsize),
+        <span style="color: #BA2121">&#39;a3&#39;</span>: Distance_wText((<span style="color: #666666">2</span>,<span style="color: #666666">4.5</span>), (<span style="color: #666666">0</span>, <span style="color: #666666">5.5</span>), t, fontsize),
+        <span style="color: #BA2121">&#39;a4&#39;</span>: Distance_wText((<span style="color: #666666">8</span>,<span style="color: #666666">4</span>), (<span style="color: #666666">10</span>, <span style="color: #666666">3</span>), t, fontsize,
+                             text_spacing<span style="color: #666666">=-1./60</span>),
+        <span style="color: #BA2121">&#39;a5&#39;</span>: Distance_wText((<span style="color: #666666">8</span>,<span style="color: #666666">2</span>), (<span style="color: #666666">10</span>, <span style="color: #666666">1</span>), t, fontsize,
+                             text_spacing<span style="color: #666666">=-1./40</span>, alignment<span style="color: #666666">=</span><span style="color: #BA2121">&#39;right&#39;</span>),
+        <span style="color: #BA2121">&#39;c1&#39;</span>: Text_wArrow(<span style="color: #BA2121">&#39;text_spacing=-1./60&#39;</span>,
+                          (<span style="color: #666666">4</span>, <span style="color: #666666">3.5</span>), (<span style="color: #666666">9</span>, <span style="color: #666666">3.2</span>),
+                          fontsize<span style="color: #666666">=10</span>, alignment<span style="color: #666666">=</span><span style="color: #BA2121">&#39;left&#39;</span>),
+        <span style="color: #BA2121">&#39;c2&#39;</span>: Text_wArrow(<span style="color: #BA2121">&#39;text_spacing=-1./40, alignment=&quot;right&quot;&#39;</span>,
+                          (<span style="color: #666666">4</span>, <span style="color: #666666">0.5</span>), (<span style="color: #666666">9</span>, <span style="color: #666666">1.2</span>),
+                          fontsize<span style="color: #666666">=10</span>, alignment<span style="color: #666666">=</span><span style="color: #BA2121">&#39;left&#39;</span>),
+        })
+    examples<span style="color: #666666">.</span>draw()
+    drawing_tool<span style="color: #666666">.</span>display(<span style="color: #BA2121">&#39;Distance_wText and text positioning&#39;</span>)
+</pre></div>
+<p>
+Note the use of <code>Text_wArrow</code> to write an explaining text with an
+associated arrow, here used to explain how
+the <code>text_spacing</code> and <code>alignment</code> arguments can be used to adjust
+the appearance of the text that goes with the distance arrow.
+
+<h2 id="___sec11">Rectangle </h2>
+
+<p>
+<center><p><img src="fig-tut/Rectangle.png" align="bottom" width=500></p></center>
+
+<p>
+<br />
+<br />
+
+<p>
+The above figure can be produced by the following code.
+
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">test_Rectangle</span>():
+    L <span style="color: #666666">=</span> <span style="color: #666666">3.0</span>
+    W <span style="color: #666666">=</span> <span style="color: #666666">4.0</span>
+
+    drawing_tool<span style="color: #666666">.</span>set_coordinate_system(
+        xmin<span style="color: #666666">=0</span>, xmax<span style="color: #666666">=2*</span>W, ymin<span style="color: #666666">=-</span>L<span style="color: #666666">/2</span>, ymax<span style="color: #666666">=2*</span>L,
+        axis<span style="color: #666666">=</span><span style="color: #008000">True</span>, instruction_file<span style="color: #666666">=</span><span style="color: #BA2121">&#39;tmp_Rectangle.py&#39;</span>)
+    drawing_tool<span style="color: #666666">.</span>set_linecolor(<span style="color: #BA2121">&#39;blue&#39;</span>)
+    drawing_tool<span style="color: #666666">.</span>set_grid(<span style="color: #008000">True</span>)
+
+    xpos <span style="color: #666666">=</span> W<span style="color: #666666">/2</span>
+    r <span style="color: #666666">=</span> Rectangle(lower_left_corner<span style="color: #666666">=</span>(xpos,<span style="color: #666666">0</span>), width<span style="color: #666666">=</span>W, height<span style="color: #666666">=</span>L)
+    r<span style="color: #666666">.</span>draw()
+    r<span style="color: #666666">.</span>draw_dimensions()
+    drawing_tool<span style="color: #666666">.</span>display(<span style="color: #BA2121">&#39;Rectangle&#39;</span>)
+</pre></div>
+<p>
+The <code>draw_dimension</code> method adds explanation of dimensions and various
+important argument in the construction of a shape.
+
+<h2 id="___sec12">Triangle </h2>
+
+<p>
+<center><p><img src="fig-tut/Triangle.png" align="bottom" width=500></p></center>
+
+<p>
+<br />
+<br />
+
+<p>
+The code below produces the figure.
+
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">test_Triangle</span>():
+    L <span style="color: #666666">=</span> <span style="color: #666666">3.0</span>
+    W <span style="color: #666666">=</span> <span style="color: #666666">4.0</span>
+
+    drawing_tool<span style="color: #666666">.</span>set_coordinate_system(
+        xmin<span style="color: #666666">=0</span>, xmax<span style="color: #666666">=2*</span>W, ymin<span style="color: #666666">=-</span>L<span style="color: #666666">/2</span>, ymax<span style="color: #666666">=1.2*</span>L,
+        axis<span style="color: #666666">=</span><span style="color: #008000">True</span>, instruction_file<span style="color: #666666">=</span><span style="color: #BA2121">&#39;tmp_Triangle.py&#39;</span>)
+    drawing_tool<span style="color: #666666">.</span>set_linecolor(<span style="color: #BA2121">&#39;blue&#39;</span>)
+    drawing_tool<span style="color: #666666">.</span>set_grid(<span style="color: #008000">True</span>)
+
+    xpos <span style="color: #666666">=</span> <span style="color: #666666">1</span>
+    t <span style="color: #666666">=</span> Triangle(p1<span style="color: #666666">=</span>(W<span style="color: #666666">/2</span>,<span style="color: #666666">0</span>), p2<span style="color: #666666">=</span>(<span style="color: #666666">3*</span>W<span style="color: #666666">/2</span>,W<span style="color: #666666">/2</span>), p3<span style="color: #666666">=</span>(<span style="color: #666666">4*</span>W<span style="color: #666666">/5.</span>,L))
+    t<span style="color: #666666">.</span>draw()
+    t<span style="color: #666666">.</span>draw_dimensions()
+    drawing_tool<span style="color: #666666">.</span>display(<span style="color: #BA2121">&#39;Triangle&#39;</span>)
+</pre></div>
+<p>
+Here, the <code>draw_dimension</code> method writes the name of the corners at the
+position of the corners, which does not always look nice (the present figure
+is an example). For a high-quality sketch one would add some spacing
+to the location of the p1, p2, and even p3 texts.
+
+<h2 id="___sec13">Arc </h2>
+
+<p>
+<center><p><img src="fig-tut/Arc.png" align="bottom" width=400></p></center>
+
+<p>
+<br />
+<br />
+
+<p>
+An arc like the one above is produced by
+
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">test_Arc</span>():
+    L <span style="color: #666666">=</span> <span style="color: #666666">4.0</span>
+    W <span style="color: #666666">=</span> <span style="color: #666666">4.0</span>
+
+    drawing_tool<span style="color: #666666">.</span>set_coordinate_system(
+        xmin<span style="color: #666666">=-</span>W<span style="color: #666666">/2</span>, xmax<span style="color: #666666">=</span>W, ymin<span style="color: #666666">=-</span>L<span style="color: #666666">/2</span>, ymax<span style="color: #666666">=1.5*</span>L,
+        axis<span style="color: #666666">=</span><span style="color: #008000">True</span>, instruction_file<span style="color: #666666">=</span><span style="color: #BA2121">&#39;tmp_Arc.py&#39;</span>)
+    drawing_tool<span style="color: #666666">.</span>set_linecolor(<span style="color: #BA2121">&#39;blue&#39;</span>)
+    drawing_tool<span style="color: #666666">.</span>set_grid(<span style="color: #008000">True</span>)
+
+    center <span style="color: #666666">=</span> point(<span style="color: #666666">0</span>,<span style="color: #666666">0</span>)
+    radius <span style="color: #666666">=</span> L<span style="color: #666666">/2</span>
+    start_angle <span style="color: #666666">=</span> <span style="color: #666666">60</span>
+    arc_angle <span style="color: #666666">=</span> <span style="color: #666666">45</span>
+    a <span style="color: #666666">=</span> Arc(center, radius, start_angle, arc_angle)
+    a<span style="color: #666666">.</span>set_arrow(<span style="color: #BA2121">&#39;-&gt;&#39;</span>)
+    a<span style="color: #666666">.</span>draw()
+
+    R1 <span style="color: #666666">=</span> <span style="color: #666666">1.25*</span>radius
+    R2 <span style="color: #666666">=</span> <span style="color: #666666">1.5*</span>radius
+    R <span style="color: #666666">=</span> <span style="color: #666666">2*</span>radius
+    a<span style="color: #666666">.</span>dimensions <span style="color: #666666">=</span> {
+        <span style="color: #BA2121">&#39;start_angle&#39;</span>: Arc_wText(
+            <span style="color: #BA2121">&#39;start_angle&#39;</span>, center, R1, start_angle<span style="color: #666666">=0</span>,
+            arc_angle<span style="color: #666666">=</span>start_angle, text_spacing<span style="color: #666666">=1/10.</span>),
+        <span style="color: #BA2121">&#39;arc_angle&#39;</span>: Arc_wText(
+            <span style="color: #BA2121">&#39;arc_angle&#39;</span>, center, R2, start_angle<span style="color: #666666">=</span>start_angle,
+            arc_angle<span style="color: #666666">=</span>arc_angle, text_spacing<span style="color: #666666">=1/20.</span>),
+        <span style="color: #BA2121">&#39;r=0&#39;</span>: Line(center, center <span style="color: #666666">+</span>
+                    point(R<span style="color: #666666">*</span>cos(radians(start_angle)),
+                          R<span style="color: #666666">*</span>sin(radians(start_angle)))),
+        <span style="color: #BA2121">&#39;r=start_angle&#39;</span>: Line(center, center <span style="color: #666666">+</span>
+                              point(R<span style="color: #666666">*</span>cos(radians(start_angle<span style="color: #666666">+</span>arc_angle)),
+                                    R<span style="color: #666666">*</span>sin(radians(start_angle<span style="color: #666666">+</span>arc_angle)))),
+        <span style="color: #BA2121">&#39;r=start+arc_angle&#39;</span>:  Line(center, center <span style="color: #666666">+</span>
+                                   point(R, <span style="color: #666666">0</span>))<span style="color: #666666">.</span>set_linestyle(<span style="color: #BA2121">&#39;dashed&#39;</span>),
+        <span style="color: #BA2121">&#39;radius&#39;</span>: Distance_wText(center, a(<span style="color: #666666">0</span>), <span style="color: #BA2121">&#39;radius&#39;</span>, text_spacing<span style="color: #666666">=1/40.</span>),
+        <span style="color: #BA2121">&#39;center&#39;</span>: Text(<span style="color: #BA2121">&#39;center&#39;</span>, center<span style="color: #666666">-</span>point(radius<span style="color: #666666">/10.</span>, radius<span style="color: #666666">/10.</span>)),
+        }
+    <span style="color: #008000; font-weight: bold">for</span> dimension <span style="color: #AA22FF; font-weight: bold">in</span> a<span style="color: #666666">.</span>dimensions:
+        dim <span style="color: #666666">=</span> a<span style="color: #666666">.</span>dimensions[dimension]
+        dim<span style="color: #666666">.</span>set_linestyle(<span style="color: #BA2121">&#39;dashed&#39;</span>)
+        dim<span style="color: #666666">.</span>set_linewidth(<span style="color: #666666">1</span>)
+        dim<span style="color: #666666">.</span>set_linecolor(<span style="color: #BA2121">&#39;black&#39;</span>)
+
+    a<span style="color: #666666">.</span>draw_dimensions()
+    drawing_tool<span style="color: #666666">.</span>display(<span style="color: #BA2121">&#39;Arc&#39;</span>)
+</pre></div>
+
+<h2 id="___sec14">Spring </h2>
+
+<p>
+<center><p><img src="fig-tut/Spring.png" align="bottom" width=800></p></center>
+
+<p>
+<br />
+<br />
+
+<p>
+The code for making this spring is
+
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">test_Spring</span>():
+    L <span style="color: #666666">=</span> <span style="color: #666666">5.0</span>
+    W <span style="color: #666666">=</span> <span style="color: #666666">2.0</span>
+
+    drawing_tool<span style="color: #666666">.</span>set_coordinate_system(
+        xmin<span style="color: #666666">=0</span>, xmax<span style="color: #666666">=7*</span>W, ymin<span style="color: #666666">=-</span>L<span style="color: #666666">/2</span>, ymax<span style="color: #666666">=1.5*</span>L,
+        axis<span style="color: #666666">=</span><span style="color: #008000">True</span>, instruction_file<span style="color: #666666">=</span><span style="color: #BA2121">&#39;tmp_Spring.py&#39;</span>)
+    drawing_tool<span style="color: #666666">.</span>set_linecolor(<span style="color: #BA2121">&#39;blue&#39;</span>)
+    drawing_tool<span style="color: #666666">.</span>set_grid(<span style="color: #008000">True</span>)
+
+    xpos <span style="color: #666666">=</span> W
+    s1 <span style="color: #666666">=</span> Spring((W,<span style="color: #666666">0</span>), L, teeth<span style="color: #666666">=</span><span style="color: #008000">True</span>)
+    s1_title <span style="color: #666666">=</span> Text(<span style="color: #BA2121">&#39;Default Spring&#39;</span>,
+                    s1<span style="color: #666666">.</span>geometric_features()[<span style="color: #BA2121">&#39;end&#39;</span>] <span style="color: #666666">+</span> point(<span style="color: #666666">0</span>,L<span style="color: #666666">/10</span>))
+    s1<span style="color: #666666">.</span>draw()
+    s1_title<span style="color: #666666">.</span>draw()
+    <span style="color: #408080; font-style: italic">#s1.draw_dimensions()</span>
+    xpos <span style="color: #666666">+=</span> <span style="color: #666666">3*</span>W
+    s2 <span style="color: #666666">=</span> Spring(start<span style="color: #666666">=</span>(xpos,<span style="color: #666666">0</span>), length<span style="color: #666666">=</span>L, width<span style="color: #666666">=</span>W<span style="color: #666666">/2.</span>,
+                bar_length<span style="color: #666666">=</span>L<span style="color: #666666">/6.</span>, teeth<span style="color: #666666">=</span><span style="color: #008000">False</span>)
+    s2<span style="color: #666666">.</span>draw()
+    s2<span style="color: #666666">.</span>draw_dimensions()
+    drawing_tool<span style="color: #666666">.</span>display(<span style="color: #BA2121">&#39;Spring&#39;</span>)
+</pre></div>
+
+<h2 id="___sec15">Dashpot </h2>
+
+<p>
+<center><p><img src="fig-tut/Dashpot.png" align="bottom" width=600></p></center>
+
+<p>
+<br />
+<br />
+
+<p>
+This dashpot is produced by
+
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">test_Dashpot</span>():
+    L <span style="color: #666666">=</span> <span style="color: #666666">5.0</span>
+    W <span style="color: #666666">=</span> <span style="color: #666666">2.0</span>
+    xpos <span style="color: #666666">=</span> <span style="color: #666666">0</span>
+
+    drawing_tool<span style="color: #666666">.</span>set_coordinate_system(
+        xmin<span style="color: #666666">=</span>xpos, xmax<span style="color: #666666">=</span>xpos<span style="color: #666666">+5.5*</span>W, ymin<span style="color: #666666">=-</span>L<span style="color: #666666">/2</span>, ymax<span style="color: #666666">=1.5*</span>L,
+        axis<span style="color: #666666">=</span><span style="color: #008000">True</span>, instruction_file<span style="color: #666666">=</span><span style="color: #BA2121">&#39;tmp_Dashpot.py&#39;</span>)
+    drawing_tool<span style="color: #666666">.</span>set_linecolor(<span style="color: #BA2121">&#39;blue&#39;</span>)
+    drawing_tool<span style="color: #666666">.</span>set_grid(<span style="color: #008000">True</span>)
+
+    <span style="color: #408080; font-style: italic"># Default (simple) dashpot</span>
+    xpos <span style="color: #666666">=</span> <span style="color: #666666">1.5</span>
+    d1 <span style="color: #666666">=</span> Dashpot(start<span style="color: #666666">=</span>(xpos,<span style="color: #666666">0</span>), total_length<span style="color: #666666">=</span>L)
+    d1_title <span style="color: #666666">=</span> Text(<span style="color: #BA2121">&#39;Dashpot (default)&#39;</span>,
+                    d1<span style="color: #666666">.</span>geometric_features()[<span style="color: #BA2121">&#39;end&#39;</span>] <span style="color: #666666">+</span> point(<span style="color: #666666">0</span>,L<span style="color: #666666">/10</span>))
+    d1<span style="color: #666666">.</span>draw()
+    d1_title<span style="color: #666666">.</span>draw()
+
+    <span style="color: #408080; font-style: italic"># Dashpot for animation with fixed bar_length, dashpot_length and</span>
+    <span style="color: #408080; font-style: italic"># prescribed piston_pos</span>
+    xpos <span style="color: #666666">+=</span> <span style="color: #666666">2.5*</span>W
+    d2 <span style="color: #666666">=</span> Dashpot(start<span style="color: #666666">=</span>(xpos,<span style="color: #666666">0</span>), total_length<span style="color: #666666">=1.2*</span>L, width<span style="color: #666666">=</span>W<span style="color: #666666">/2</span>,
+                 bar_length<span style="color: #666666">=</span>W, dashpot_length<span style="color: #666666">=</span>L<span style="color: #666666">/2</span>, piston_pos<span style="color: #666666">=2*</span>W)
+    d2<span style="color: #666666">.</span>draw()
+    d2<span style="color: #666666">.</span>draw_dimensions()
+
+    drawing_tool<span style="color: #666666">.</span>display(<span style="color: #BA2121">&#39;Dashpot&#39;</span>)
+</pre></div>
+
+<h2 id="___sec16">Wavy </h2>
+
+<p>
+Looks strange. Fix x axis.
+
+<h2 id="___sec17">Stochastic curves </h2>
+
+<p>
+The <code>StochasticWavyCurve</code> object offers three precomputed
+graphics that have a random variation:
+
+<p>
+<br />
+<br />
+
+<p>
+<center><p><img src="fig-tut/StochasticWavyCurve.png" align="bottom" width=600></p></center>
+
+<p>
+<br />
+<br />
+
+<p>
+The usage is simple. The construction
+
+<p>
+
+<!-- code=python (!bc pycod) typeset with pygments style "default" -->
+<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%">curve <span style="color: #666666">=</span> StochasticWavyCurve(curve_no<span style="color: #666666">=1</span>, percentage<span style="color: #666666">=40</span>)
+</pre></div>
+<p>
+picks the second curve (the three are numbered 0, 1, and 2),
+and the first 40% of that curve. In case one desires another extent
+of the axis, one can just scale the coordinates directly as these
+are stored in the arrays <code>curve.x[curve_no]</code> and
+<code>curve.y[curve_no]</code>.
+
+<p>
+<p>
+<!-- begin bottom navigation -->
+<table style="width: 100%"><tr><td>
+<div style="text-align: left;"><a href="._pysketcher001.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/prev1.png" border=0 alt="&laquo; Previous"></a></div>
+</td><td>
+<div style="text-align: right;"><a href="._pysketcher003.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/next1.png" border=0 alt="Next &raquo;"></a></div>
+</td></tr></table>
+<!-- end bottom navigation -->
+</p>
+
+<!-- ------------------- end of main content --------------- -->
+
+
+</body>
+</html>
+    
+

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 896 - 0
doc/pub/tutorial/._pysketcher003.html


+ 2 - 2
doc/tutorial/html/.buildinfo

@@ -1,4 +1,4 @@
 # Sphinx build info version 1
 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 8734583df8ee10fba2867e926fcad8b4
-tags: fbb0d17656682115ca4d033fb2f83ba1
+config: b6bd8de86073aa5742bf9e821e0b3d8a
+tags: 645f666f9bcd5a90fca523b33c5a78b7

doc/tutorial/html/_images/Vehicle0_hier2.png → doc/pub/tutorial/html/_images/Vehicle0_hier2.png


doc/tutorial/html/_images/vehicle0.png → doc/pub/tutorial/html/_images/vehicle0.png


doc/tutorial/html/_images/vehicle0_dim.png → doc/pub/tutorial/html/_images/vehicle0_dim.png


doc/tutorial/html/_images/vehicle0_hier1.png → doc/pub/tutorial/html/_images/vehicle0_hier1.png


BIN
doc/pub/tutorial/html/_images/vehicle1.png


BIN
doc/pub/tutorial/html/_images/wheel_on_inclined_plane.png


+ 2 - 2
doc/tutorial/html/html/_sources/index.txt

@@ -7,9 +7,9 @@ Using Pysketcher to Create Principal Sketches of Physics Problems
 Contents:
 
 .. toctree::
-   :maxdepth: 2
+   :maxdepth: 3
 
-   wrap_sketcher
+   main_sketcher
 
 
 Indices and tables

doc/tutorial/html/_static/ajax-loader.gif → doc/pub/tutorial/html/_static/ajax-loader.gif


+ 5 - 0
doc/tutorial/html/html/_static/basic.css

@@ -7,6 +7,8 @@
  * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
  * :license: BSD, see LICENSE for details.
  *
+ * Adjustments by Hans Petter Langtangen <hpl@simula.no>
+ * (added admonition border)
  */
 
 /* -- main layout ----------------------------------------------------------- */
@@ -276,6 +278,9 @@ p.topic-title {
 /* -- admonitions ----------------------------------------------------------- */
 
 div.admonition {
+    /* Added border and gray background color, hpl */
+    border: 1px solid;
+    background-color: #f2f2f2;
     margin-top: 10px;
     margin-bottom: 10px;
     padding: 7px;

doc/tutorial/html/_static/comment-bright.png → doc/pub/tutorial/html/_static/comment-bright.png


doc/tutorial/html/_static/comment-close.png → doc/pub/tutorial/html/_static/comment-close.png


doc/tutorial/html/_static/comment.png → doc/pub/tutorial/html/_static/comment.png


doc/tutorial/html/_static/dialog-note.png → doc/pub/tutorial/html/_static/dialog-note.png


doc/tutorial/html/_static/dialog-seealso.png → doc/pub/tutorial/html/_static/dialog-seealso.png


doc/tutorial/html/_static/dialog-topic.png → doc/pub/tutorial/html/_static/dialog-topic.png


doc/tutorial/html/_static/dialog-warning.png → doc/pub/tutorial/html/_static/dialog-warning.png


doc/tutorial/html/_static/doctools.js → doc/pub/tutorial/html/_static/doctools.js


doc/tutorial/html/_static/down-pressed.png → doc/pub/tutorial/html/_static/down-pressed.png


doc/tutorial/html/_static/down.png → doc/pub/tutorial/html/_static/down.png


doc/tutorial/html/_static/epub.css → doc/pub/tutorial/html/_static/epub.css


doc/tutorial/html/_static/file.png → doc/pub/tutorial/html/_static/file.png


doc/tutorial/html/_static/footerbg.png → doc/pub/tutorial/html/_static/footerbg.png


doc/tutorial/html/_static/headerbg.png → doc/pub/tutorial/html/_static/headerbg.png


doc/tutorial/html/_static/ie6.css → doc/pub/tutorial/html/_static/ie6.css


doc/tutorial/html/_static/jquery.js → doc/pub/tutorial/html/_static/jquery.js


doc/tutorial/html/_static/middlebg.png → doc/pub/tutorial/html/_static/middlebg.png


doc/tutorial/html/_static/minus.png → doc/pub/tutorial/html/_static/minus.png


doc/tutorial/html/_static/plus.png → doc/pub/tutorial/html/_static/plus.png


+ 3 - 2
doc/tutorial/html/_static/pygments.css

@@ -13,11 +13,11 @@
 .highlight .gr { color: #FF0000 } /* Generic.Error */
 .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
 .highlight .gi { color: #00A000 } /* Generic.Inserted */
-.highlight .go { color: #303030 } /* Generic.Output */
+.highlight .go { color: #333333 } /* Generic.Output */
 .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
 .highlight .gs { font-weight: bold } /* Generic.Strong */
 .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.highlight .gt { color: #0040D0 } /* Generic.Traceback */
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
 .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
 .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
 .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
@@ -40,6 +40,7 @@
 .highlight .nv { color: #bb60d5 } /* Name.Variable */
 .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
 .highlight .w { color: #bbbbbb } /* Text.Whitespace */
+.highlight .mb { color: #208050 } /* Literal.Number.Bin */
 .highlight .mf { color: #208050 } /* Literal.Number.Float */
 .highlight .mh { color: #208050 } /* Literal.Number.Hex */
 .highlight .mi { color: #208050 } /* Literal.Number.Integer */

+ 78 - 34
doc/tutorial/html/_static/pyramid.css

@@ -7,12 +7,14 @@
  * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
  * :license: BSD, see LICENSE for details.
  *
+ * Adjustments by Hans Petter Langtangen <hpl@simula.no>
+ * (admonitions, same as in pylons, fenics, agni)
  */
- 
+
 @import url("basic.css");
- 
+
 /* -- page layout ----------------------------------------------------------- */
- 
+
 body {
     font-family: "Nobile", sans-serif;
     font-size: 100%;
@@ -34,7 +36,7 @@ div.bodywrapper {
 hr {
     border: 1px solid #B1B4B6;
 }
- 
+
 div.document {
     background-color: #eee;
 }
@@ -59,7 +61,7 @@ div.body {
     border-right-style: none;
     overflow: auto;
 }
- 
+
 div.footer {
     color: #ffffff;
     width: 100%;
@@ -69,7 +71,7 @@ div.footer {
     background: transparent;
     clear:both;
 }
- 
+
 div.footer a {
     color: #ffffff;
     text-decoration: none;
@@ -79,14 +81,14 @@ div.footer a:hover {
     color: #e88f00;
     text-decoration: underline;
 }
- 
+
 div.related {
     line-height: 30px;
     color: #373839;
     font-size: 0.8em;
     background-color: #eee;
 }
- 
+
 div.related a {
     color: #1b61d6;
 }
@@ -94,7 +96,7 @@ div.related a {
 div.related ul {
     padding-left: 240px;
 }
- 
+
 div.sphinxsidebar {
     font-size: 0.75em;
     line-height: 1.5em;
@@ -103,7 +105,7 @@ div.sphinxsidebar {
 div.sphinxsidebarwrapper{
     padding: 10px 0;
 }
- 
+
 div.sphinxsidebar h3,
 div.sphinxsidebar h4 {
     font-family: "Neuton", sans-serif;
@@ -118,30 +120,30 @@ div.sphinxsidebar h4 {
 div.sphinxsidebar h4{
     font-size: 1.3em;
 }
- 
+
 div.sphinxsidebar h3 a {
     color: #000000;
 }
- 
- 
+
+
 div.sphinxsidebar p {
     color: #888;
     padding: 5px 20px;
 }
- 
+
 div.sphinxsidebar p.topless {
 }
- 
+
 div.sphinxsidebar ul {
     margin: 10px 20px;
     padding: 0;
     color: #373839;
 }
- 
+
 div.sphinxsidebar a {
     color: #444;
 }
- 
+
 div.sphinxsidebar input {
     border: 1px solid #ccc;
     font-family: sans-serif;
@@ -170,16 +172,16 @@ p.sidebar-title {
 }
 
 /* -- body styles ----------------------------------------------------------- */
- 
+
 a, a .pre {
     color: #1b61d6;
     text-decoration: none;
 }
- 
+
 a:hover, a:hover .pre {
     text-decoration: underline;
 }
- 
+
 div.body h1,
 div.body h2,
 div.body h3,
@@ -193,31 +195,71 @@ div.body h6 {
     margin: 30px 0px 10px 0px;
     padding: 5px 0;
 }
- 
+
 div.body h1 { border-top: 20px solid white; margin-top: 0; font-size: 200%; }
 div.body h2 { font-size: 150%; background-color: #ffffff; }
 div.body h3 { font-size: 120%; background-color: #ffffff; }
 div.body h4 { font-size: 110%; background-color: #ffffff; }
 div.body h5 { font-size: 100%; background-color: #ffffff; }
 div.body h6 { font-size: 100%; background-color: #ffffff; }
- 
+
 a.headerlink {
     color: #1b61d6;
     font-size: 0.8em;
     padding: 0 4px 0 4px;
     text-decoration: none;
 }
- 
+
 a.headerlink:hover {
     text-decoration: underline;
 }
- 
+
 div.body p, div.body dd, div.body li {
     line-height: 1.5em;
 }
- 
-div.admonition p.admonition-title + p {
-    display: inline;
+
+/* admonition styles taken from agni theme, sphinxdoc.css */
+div.admonition, div.warning {
+    font-size: 0.9em;
+    margin: 1em 0 1em 0;
+    border: 1px solid #888A85;
+    background-color: #f7f7f7;
+    padding: 0;
+}
+
+div.admonition p, div.warning p {
+    margin: 0.5em 1em 0.5em 1em;
+    padding: 0;
+}
+
+div.admonition pre, div.warning pre {
+    margin: 0.4em 1em 0.4em 1em;
+}
+
+div.admonition p.admonition-title,
+div.warning p.admonition-title {
+    margin: 0;
+    padding: 0.1em 0 0.1em 0.5em;
+    color: white;
+    border-bottom: 1px solid #86989B;
+    font-weight: bold;
+    background-color: #adadad;
+}
+
+div.warning {
+    border: 1px solid #940000;
+}
+
+div.warning p.admonition-title {
+    background-color: #CF0000;
+    border-bottom-color: #940000;
+}
+
+div.admonition ul, div.admonition ol,
+div.warning ul, div.warning ol {
+    margin-top: 1em;
+    margin: 0.1em 0.5em 0.5em 3em;
+    padding: 0;
 }
 
 div.highlight{
@@ -231,7 +273,7 @@ div.note {
     padding: 10px 20px 10px 60px;
     background: #e1ecfe url(dialog-note.png) no-repeat 10px 8px;
 }
- 
+
 div.seealso {
     background: #fff6bf url(dialog-seealso.png) no-repeat 10px 8px;
     border: 2px solid #ffd324;
@@ -239,7 +281,7 @@ div.seealso {
     border-right-style: none;
     padding: 10px 20px 10px 60px;
 }
- 
+
 div.topic {
     background: #eeeeee;
     border: 2px solid #C6C9CB;
@@ -247,7 +289,7 @@ div.topic {
     border-right-style: none;
     border-left-style: none;
 }
- 
+
 div.warning {
     background: #fbe3e4 url(dialog-warning.png) no-repeat 10px 8px;
     border: 2px solid #fbc2c4;
@@ -255,15 +297,17 @@ div.warning {
     border-left-style: none;
     padding: 10px 20px 10px 60px;
 }
- 
+
+/*
 p.admonition-title {
     display: none;
 }
- 
+*/
+
 p.admonition-title:after {
     content: ":";
 }
- 
+
 pre {
     padding: 10px;
     background-color: #fafafa;
@@ -275,7 +319,7 @@ pre {
     border-right-style: none;
     border-left-style: none;
 }
- 
+
 tt {
     background-color: transparent;
     color: #222;

+ 1 - 1
doc/tutorial/html/html/_static/searchtools.js

@@ -301,7 +301,7 @@ var Search = {
   },
 
   query : function(query) {
-    var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"];
+    var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
 
     // Stem the searchterms and add them to the correct list
     var stemmer = new Stemmer();

doc/tutorial/html/_static/transparent.gif → doc/pub/tutorial/html/_static/transparent.gif


doc/tutorial/html/_static/underscore.js → doc/pub/tutorial/html/_static/underscore.js


doc/tutorial/html/_static/up-pressed.png → doc/pub/tutorial/html/_static/up-pressed.png


doc/tutorial/html/_static/up.png → doc/pub/tutorial/html/_static/up.png


doc/tutorial/html/_static/websupport.js → doc/pub/tutorial/html/_static/websupport.js


+ 57 - 9
doc/tutorial/html/genindex.html

@@ -9,15 +9,15 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Index &mdash; Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation</title>
+    <title>Index</title>
     
     <link rel="stylesheet" href="_static/pyramid.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
-        URL_ROOT:    '',
-        VERSION:     '1.0',
+        URL_ROOT:    './',
+        VERSION:     '0.1',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -27,14 +27,40 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
-    <link rel="top" title="Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation" href="index.html" />
+
+        <script src="http://sagecell.sagemath.org/static/jquery.min.js"></script>
+        <script src="http://sagecell.sagemath.org/static/embedded_sagecell.js"></script>
+
+        <script>sagecell.makeSagecell({inputLocation: ".sage"});</script>
+
+        <style type="text/css">
+                .sagecell .CodeMirror-scroll {
+                        overflow-y: hidden;
+                        overflow-x: auto;
+                }
+                .sagecell .CodeMirror {
+                        height: auto;
+                }
+        </style>
+
+    
+    <link rel="top" title="Using Pysketcher to Create Principal Sketches of Physics Problems" href="index.html" />
+
 <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
 <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
 <!--[if lte IE 6]>
 <link rel="stylesheet" href="_static/ie6.css" type="text/css" media="screen" charset="utf-8" />
 <![endif]-->
 
-  </head>
+  
+       <style type="text/css">
+         div.admonition {
+           background-color: whiteSmoke;
+           border: 1px solid #bababa;
+         }
+       </style>
+      </head>
+    
   <body>
 
     <div class="related">
@@ -43,7 +69,7 @@
         <li class="right" style="margin-right: 10px">
           <a href="#" title="General Index"
              accesskey="I">index</a></li>
-        <li><a href="index.html">Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation</a> &raquo;</li> 
+        <li><a href="index.html">Using Pysketcher to Create Principal Sketches of Physics Problems</a> &raquo;</li> 
       </ul>
     </div>  
 
@@ -56,8 +82,30 @@
 <h1 id="index">Index</h1>
 
 <div class="genindex-jumpbox">
+ <a href="#R"><strong>R</strong></a>
+ | <a href="#T"><strong>T</strong></a>
  
 </div>
+<h2 id="R">R</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="main_sketcher.html#index-1">recursive function calls</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
+<h2 id="T">T</h2>
+<table style="width: 100%" class="indextable genindextable"><tr>
+  <td style="width: 33%" valign="top"><dl>
+      
+  <dt><a href="main_sketcher.html#index-0">tree data structure</a>
+  </dt>
+
+  </dl></td>
+</tr></table>
+
 
 
           </div>
@@ -91,12 +139,12 @@
         <li class="right" style="margin-right: 10px">
           <a href="#" title="General Index"
              >index</a></li>
-        <li><a href="index.html">Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation</a> &raquo;</li> 
+        <li><a href="index.html">Using Pysketcher to Create Principal Sketches of Physics Problems</a> &raquo;</li> 
       </ul>
     </div>
     <div class="footer">
-        &copy; Copyright 2012, 0.1.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
+        &copy; Copyright 2015, H. P. Langtangen.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.3.
     </div>
   </body>
 </html>

+ 59 - 23
doc/tutorial/html/index.html

@@ -7,15 +7,15 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Using Pysketcher to Create Principal Sketches of Physics Problems &mdash; Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation</title>
+    <title>Using Pysketcher to Create Principal Sketches of Physics Problems</title>
     
     <link rel="stylesheet" href="_static/pyramid.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
-        URL_ROOT:    '',
-        VERSION:     '1.0',
+        URL_ROOT:    './',
+        VERSION:     '0.1',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -25,15 +25,41 @@
     <script type="text/javascript" src="_static/underscore.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
-    <link rel="top" title="Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation" href="#" />
-    <link rel="next" title="Using Pysketcher to Create Principal Sketches of Physics Problems" href="wrap_sketcher.html" />
+
+        <script src="http://sagecell.sagemath.org/static/jquery.min.js"></script>
+        <script src="http://sagecell.sagemath.org/static/embedded_sagecell.js"></script>
+
+        <script>sagecell.makeSagecell({inputLocation: ".sage"});</script>
+
+        <style type="text/css">
+                .sagecell .CodeMirror-scroll {
+                        overflow-y: hidden;
+                        overflow-x: auto;
+                }
+                .sagecell .CodeMirror {
+                        height: auto;
+                }
+        </style>
+
+    
+    <link rel="top" title="Using Pysketcher to Create Principal Sketches of Physics Problems" href="#" />
+    <link rel="next" title="Using Pysketcher to Create Principal Sketches of Physics Problems" href="main_sketcher.html" />
+
 <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Neuton&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
 <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
 <!--[if lte IE 6]>
 <link rel="stylesheet" href="_static/ie6.css" type="text/css" media="screen" charset="utf-8" />
 <![endif]-->
 
-  </head>
+  
+       <style type="text/css">
+         div.admonition {
+           background-color: whiteSmoke;
+           border: 1px solid #bababa;
+         }
+       </style>
+      </head>
+    
   <body>
 
     <div class="related">
@@ -43,9 +69,9 @@
           <a href="genindex.html" title="General Index"
              accesskey="I">index</a></li>
         <li class="right" >
-          <a href="wrap_sketcher.html" title="Using Pysketcher to Create Principal Sketches of Physics Problems"
+          <a href="main_sketcher.html" title="Using Pysketcher to Create Principal Sketches of Physics Problems"
              accesskey="N">next</a> |</li>
-        <li><a href="#">Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation</a> &raquo;</li> 
+        <li><a href="#">Using Pysketcher to Create Principal Sketches of Physics Problems</a> &raquo;</li> 
       </ul>
     </div>  
 
@@ -59,17 +85,29 @@
 <p>Contents:</p>
 <div class="toctree-wrapper compound">
 <ul>
-<li class="toctree-l1"><a class="reference internal" href="wrap_sketcher.html">Using Pysketcher to Create Principal Sketches of Physics Problems</a></li>
-<li class="toctree-l1"><a class="reference internal" href="wrap_sketcher.html#a-first-glimpse-of-pysketcher">A First Glimpse of Pysketcher</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="wrap_sketcher.html#basic-construction-of-sketches">Basic Construction of Sketches</a></li>
+<li class="toctree-l1"><a class="reference internal" href="main_sketcher.html">Using Pysketcher to Create Principal Sketches of Physics Problems</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="main_sketcher.html#a-first-glimpse-of-pysketcher">A First Glimpse of Pysketcher</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#basic-construction-of-sketches">Basic Construction of Sketches</a></li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal" href="main_sketcher.html#basic-shapes">Basic Shapes</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#axis">Axis</a></li>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#distance-with-text">Distance with Text</a></li>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#rectangle">Rectangle</a></li>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#triangle">Triangle</a></li>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#arc">Arc</a></li>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#spring">Spring</a></li>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#dashpot">Dashpot</a></li>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#wavy">Wavy</a></li>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#stochastic-curves">Stochastic curves</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="wrap_sketcher.html#inner-workings-of-the-pysketcher-tool">Inner Workings of the Pysketcher Tool</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="wrap_sketcher.html#example-of-classes-for-geometric-objects">Example of Classes for Geometric Objects</a></li>
+<li class="toctree-l2"><a class="reference internal" href="main_sketcher.html#inner-workings-of-the-pysketcher-tool">Inner Workings of the Pysketcher Tool</a><ul>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#example-of-classes-for-geometric-objects">Example of Classes for Geometric Objects</a></li>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#adding-functionality-via-recursion">Adding Functionality via Recursion</a></li>
+<li class="toctree-l3"><a class="reference internal" href="main_sketcher.html#scaling-translating-and-rotating-a-figure">Scaling, Translating, and Rotating a Figure</a></li>
 </ul>
 </li>
-<li class="toctree-l1"><a class="reference internal" href="wrap_sketcher.html#adding-functionality-via-recursion">Adding Functionality via Recursion</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="wrap_sketcher.html#scaling-translating-and-rotating-a-figure">Scaling, Translating, and Rotating a Figure</a></li>
 </ul>
 </li>
 </ul>
@@ -92,14 +130,12 @@
         <div class="sphinxsidebarwrapper">
   <h3><a href="#">Table Of Contents</a></h3>
   <ul>
-<li><a class="reference internal" href="#">Using Pysketcher to Create Principal Sketches of Physics Problems</a><ul>
-</ul>
-</li>
+<li><a class="reference internal" href="#">Using Pysketcher to Create Principal Sketches of Physics Problems</a></li>
 <li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
 </ul>
 
   <h4>Next topic</h4>
-  <p class="topless"><a href="wrap_sketcher.html"
+  <p class="topless"><a href="main_sketcher.html"
                         title="next chapter">Using Pysketcher to Create Principal Sketches of Physics Problems</a></p>
 <div id="searchbox" style="display: none">
   <h3>Quick search</h3>
@@ -125,14 +161,14 @@
           <a href="genindex.html" title="General Index"
              >index</a></li>
         <li class="right" >
-          <a href="wrap_sketcher.html" title="Using Pysketcher to Create Principal Sketches of Physics Problems"
+          <a href="main_sketcher.html" title="Using Pysketcher to Create Principal Sketches of Physics Problems"
              >next</a> |</li>
-        <li><a href="#">Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation</a> &raquo;</li> 
+        <li><a href="#">Using Pysketcher to Create Principal Sketches of Physics Problems</a> &raquo;</li> 
       </ul>
     </div>
     <div class="footer">
-        &copy; Copyright 2012, 0.1.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
+        &copy; Copyright 2015, H. P. Langtangen.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.3.
     </div>
   </body>
 </html>

BIN
doc/pub/tutorial/html/objects.inv


+ 35 - 9
doc/tutorial/html/html/search.html

@@ -7,15 +7,15 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Search &mdash; Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation</title>
+    <title>Search</title>
     
     <link rel="stylesheet" href="_static/pyramid.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
-        URL_ROOT:    '',
-        VERSION:     '1.0',
+        URL_ROOT:    './',
+        VERSION:     '0.1',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -26,7 +26,25 @@
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
     <script type="text/javascript" src="_static/searchtools.js"></script>
-    <link rel="top" title="Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation" href="index.html" />
+
+        <script src="http://sagecell.sagemath.org/static/jquery.min.js"></script>
+        <script src="http://sagecell.sagemath.org/static/embedded_sagecell.js"></script>
+
+        <script>sagecell.makeSagecell({inputLocation: ".sage"});</script>
+
+        <style type="text/css">
+                .sagecell .CodeMirror-scroll {
+                        overflow-y: hidden;
+                        overflow-x: auto;
+                }
+                .sagecell .CodeMirror {
+                        height: auto;
+                }
+        </style>
+
+    
+    <link rel="top" title="Using Pysketcher to Create Principal Sketches of Physics Problems" href="index.html" />
+
   <script type="text/javascript">
     jQuery(function() { Search.loadIndex("searchindex.js"); });
   </script>
@@ -38,7 +56,15 @@
 <![endif]-->
 
 
-  </head>
+  
+       <style type="text/css">
+         div.admonition {
+           background-color: whiteSmoke;
+           border: 1px solid #bababa;
+         }
+       </style>
+      </head>
+    
   <body>
 
     <div class="related">
@@ -47,7 +73,7 @@
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
              accesskey="I">index</a></li>
-        <li><a href="index.html">Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation</a> &raquo;</li> 
+        <li><a href="index.html">Using Pysketcher to Create Principal Sketches of Physics Problems</a> &raquo;</li> 
       </ul>
     </div>  
 
@@ -95,12 +121,12 @@
         <li class="right" style="margin-right: 10px">
           <a href="genindex.html" title="General Index"
              >index</a></li>
-        <li><a href="index.html">Using Pysketcher to Create Principal Sketches of Physics Problems 1.0 documentation</a> &raquo;</li> 
+        <li><a href="index.html">Using Pysketcher to Create Principal Sketches of Physics Problems</a> &raquo;</li> 
       </ul>
     </div>
     <div class="footer">
-        &copy; Copyright 2012, 0.1.
-      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
+        &copy; Copyright 2015, H. P. Langtangen.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.3.
     </div>
   </body>
 </html>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
doc/pub/tutorial/html/searchindex.js


+ 197 - 0
doc/pub/tutorial/pysketcher.html

@@ -0,0 +1,197 @@
+<!--
+Automatically generated HTML file from DocOnce source
+(https://github.com/hplgit/doconce/)
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
+<meta name="description" content="Using Pysketcher to Create Principal Sketches of Physics Problems">
+<meta name="keywords" content="tree data structure,recursive function calls">
+
+<title>Using Pysketcher to Create Principal Sketches of Physics Problems</title>
+
+
+<style type="text/css">
+/* blueish style */
+
+/* Color definitions:  http://www.december.com/html/spec/color0.html
+   CSS examples:       http://www.w3schools.com/css/css_examples.asp */
+
+body {
+  margin-top: 1.0em;
+  background-color: #ffffff;
+  font-family: Helvetica, Arial, FreeSans, san-serif;
+  color: #000000;
+}
+h1 { font-size: 1.8em; color: #1e36ce; }
+h2 { font-size: 1.6em; color: #1e36ce; }
+h3 { font-size: 1.4em; color: #1e36ce; }
+a { color: #1e36ce; text-decoration:none; }
+tt { font-family: "Courier New", Courier; }
+/* pre style removed because it will interfer with pygments */
+p { text-indent: 0px; }
+hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
+p.caption { width: 80%; font-style: normal; text-align: left; }
+hr.figure { border: 0; width: 80%; border-bottom: 1px solid #aaa}
+
+div { text-align: justify; text-justify: inter-word; }
+</style>
+
+
+</head>
+
+<!-- tocinfo
+{'highest level': 1,
+ 'sections': [(' A First Glimpse of Pysketcher ', 1, None, '___sec0'),
+              (' Basic Construction of Sketches ', 2, None, '___sec1'),
+              (' Basic Drawing ', 3, None, '___sec2'),
+              (' Groups of Objects ', 3, None, '___sec3'),
+              (' Changing Line Styles and Colors ', 3, None, '___sec4'),
+              (' The Figure Composition as an Object Hierarchy ',
+               3,
+               None,
+               '___sec5'),
+              (' Animation: Translating the Vehicle ', 3, None, '___sec6'),
+              (' Animation: Rolling the Wheels ',
+               3,
+               'sketcher:vehicle1:anim',
+               'sketcher:vehicle1:anim'),
+              (' Basic Shapes ', 1, None, '___sec8'),
+              (' Axis ', 2, None, '___sec9'),
+              (' Distance with Text ', 2, None, '___sec10'),
+              (' Rectangle ', 2, None, '___sec11'),
+              (' Triangle ', 2, None, '___sec12'),
+              (' Arc ', 2, None, '___sec13'),
+              (' Spring ', 2, None, '___sec14'),
+              (' Dashpot ', 2, None, '___sec15'),
+              (' Wavy ', 2, None, '___sec16'),
+              (' Stochastic curves ', 2, None, '___sec17'),
+              (' Inner Workings of the Pysketcher Tool ',
+               1,
+               None,
+               '___sec18'),
+              (' Example of Classes for Geometric Objects ',
+               2,
+               None,
+               '___sec19'),
+              (' Simple Geometric Objects ', 3, None, '___sec20'),
+              (' Class Curve ', 3, None, '___sec21'),
+              (' Compound Geometric Objects ', 3, None, '___sec22'),
+              (' Adding Functionality via Recursion ', 2, None, '___sec23'),
+              (' Basic Principles of Recursion ', 3, None, '___sec24'),
+              (' Explaining Recursion ', 3, None, '___sec25'),
+              (' Scaling, Translating, and Rotating a Figure ',
+               2,
+               'sketcher:scaling',
+               'sketcher:scaling'),
+              (' Scaling ', 3, None, '___sec27'),
+              (' Translation ', 3, None, '___sec28'),
+              (' Rotation ', 3, None, '___sec29')]}
+end of tocinfo -->
+
+<body>
+
+
+
+<script type="text/x-mathjax-config">
+MathJax.Hub.Config({
+  TeX: {
+     equationNumbers: {  autoNumber: "none"  },
+     extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
+  }
+});
+</script>
+<script type="text/javascript"
+ src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
+</script>
+
+
+
+    
+<a name="part0000"></a>
+<p>
+<!-- begin top navigation -->
+<table style="width: 100%"><tr><td>
+</td><td>
+<div style="text-align: right;"><a href="._pysketcher001.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/next1.png" border=0 alt="Next &raquo;"></a></div>
+</td></tr></table>
+<!-- end top navigation -->
+</p>
+
+<p>
+<!-- ------------------- main content ---------------------- -->
+
+
+
+<center><h1>Using Pysketcher to Create Principal Sketches of Physics Problems</h1></center>  <!-- document title -->
+
+<p>
+<!-- author(s): Hans Petter Langtangen -->
+
+<center>
+<b>Hans Petter Langtangen</b> [1, 2]
+</center>
+
+<p>
+<!-- institution(s) -->
+
+<center>[1] <b>Center for Biomedical Computing, Simula Research Laboratory</b></center>
+<center>[2] <b>Department of Informatics, University of Oslo</b></center>
+<p>
+<center><h4>Apr 27, 2015</h4></center> <!-- date -->
+<p>
+
+<!-- begin box -->
+<div style="width: 95%; padding: 10px; border: 1px solid #000; border-radius: 4px;">
+This document is derived from Chapter 9 in the book
+<a href="http://www.amazon.com/Scientific-Programming-Computational-Science-Engineering/dp/3642549586/ref=sr_1_2?s=books&ie=UTF8&qid=1407225588&sr=1-2&keywords=langtangen" target="_self">A Primer on Scientific Programming with Python</a>, by H. P. Langtangen,
+4th edition, Springer, 2014.
+</div>
+<!-- end box -->
+
+
+<p>
+<b>Abstract.</b> Pysketcher is a Python package which allows principal sketches of
+physics and mechanics problems to be realized through short programs
+instead of interactive (and potentially tedious and inaccurate)
+drawing.  Elements of the sketch, such as lines, circles, angles,
+forces, coordinate systems, etc., are realized as objects and
+collected in hierarchical structures. Parts of the hierarchical
+structures can easily change line styles and colors, or be copied,
+scaled, translated, and rotated. These features make it
+straightforward to move parts of the sketch to create animation,
+usually in accordance with the physics of the underlying problem.
+Exact dimensioning of the elements in the sketch is trivial to obtain
+since distances are specified in computer code.
+
+<p>
+Pysketcher is easy to learn from a number of examples. Beyond
+essential Python programming and a knowledge about mechanics problems,
+no further background is required.
+
+<p>
+<!-- Task (can be questions): make sketches of physical problems, see fig -->
+<!-- through user-friendly composition of basic shapes -->
+<!-- Desired knowledge: plotting curves, basic OO (ch. X.Y, ...) -->
+<!-- Required knowledge? -->
+<!-- Learning Goals: these targets the inner workings of pysketcher, -->
+<!-- which is just a part of this document... -->
+
+<p>
+<p>
+<!-- begin bottom navigation -->
+<table style="width: 100%"><tr><td>
+</td><td>
+<div style="text-align: right;"><a href="._pysketcher001.html"><img src="http://hplgit.github.io/doconce/bundled/html_images/next1.png" border=0 alt="Next &raquo;"></a></div>
+</td></tr></table>
+<!-- end bottom navigation -->
+</p>
+
+<!-- ------------------- end of main content --------------- -->
+
+
+</body>
+</html>
+    
+

BIN
doc/pub/tutorial/pysketcher.pdf


+ 8 - 2
doc/src/tut/.dict4spell.txt

@@ -1,18 +1,25 @@
+
+Dashpot
 ImageMagick
 Informatics
 Langtangen
+MPEG
 Matplotlib
 OO
+Pygame
 Pysketcher
 SciTools
 Simula
+WebM
 anim
+backend
 befined
 bicyle
 botton
 ch
 classname
 com
+dashpot
 demystify
 dt
 ffmpeg
@@ -31,6 +38,7 @@ linetype
 linewidth
 org
 png
+printf
 py
 pysketcher
 simplistically
@@ -40,5 +48,3 @@ subfigures
 tmp
 txt
 vectorized
-MPEG
-

+ 23 - 4
doc/src/tut/basics.do.txt

@@ -71,7 +71,7 @@ a ``ground'' element.
 
 ===== Basic Construction of Sketches =====
 
-Before attacking real-life sketches as in Figure ref{sketcher:fig1}
+Before attacking real-life sketches as in Figure ref{sketcher:fig:inclinedplane}
 we focus on the significantly simpler drawing shown
 in Figure ref{sketcher:fig:vehicle0}.  This toy sketch consists of
 several elements: two circles, two rectangles, and a ``ground'' element.
@@ -80,11 +80,32 @@ several elements: two circles, two rectangles, and a ``ground'' element.
 
 FIGURE: [fig-tut/vehicle0_dim, width=600] Sketch of a simple figure. label{sketcher:fig:vehicle0}
 
+When the sketch is defined in terms of computer code, it is natural to
+parameterize geometric features, such as the radius of the wheel ($R$),
+the center point of the left wheel ($w_1$), as well as the height ($H$) and
+length ($L$) of the main part. The simple vehicle in
+Figure ref{sketcher:fig:vehicle0} is quickly drawn in almost any interactive
+tool. However, if we want to change the radius of the wheels, you need a
+sophisticated drawing tool to avoid redrawing the whole figure, while
+in computer code this is a matter of changing the $R$ parameter and
+rerunning the program.
+For example, Figure ref{sketcher:fig:vehicle0b} shows
+a variation of the drawing in
+Figure ref{sketcher:fig:vehicle0} obtained by just setting
+$R=0.5$, $L=5$, $H=2$, and $R=2$. Being able
+to quickly change geometric sizes is key to many problem settings in
+physics and engineering, but then a program must define the geometry.
+
+
+FIGURE: [fig-tut/vehicle_v2, width=500 frac=0.6] Redrawing a figure with other geometric parameters. label{sketcher:fig:vehicle0b}
+
+
 === Basic Drawing ===
 
 A typical program creating these five elements is shown next.
 After importing the `pysketcher` package, the first task is always to
 define a coordinate system:
+
 !bc pycod
 from pysketcher import *
 
@@ -302,7 +323,7 @@ Figure ref{sketcher:fig:vehicle0:hier2}. The ability to write out the
 object hierarchy or view it graphically can be of great help when
 working with complex figures that involve layers of subfigures.
 
-FIGURE: [fig-tut/vehicle0_hier2, width=500 frac=0.8] Hierarchical relation between figure objects, including their class names. label{sketcher:fig:vehicle0:hier2}
+FIGURE: [fig-tut/Vehicle0_hier2, width=500 frac=0.8] Hierarchical relation between figure objects, including their class names. label{sketcher:fig:vehicle0:hier2}
 
 Any of the objects can in the program be reached through their names, e.g.,
 !bc pycod
@@ -531,5 +552,3 @@ can also be copied and moved to other parts of the drawing
 area. However, the single most important feature is probably the
 ability to make animations governed by mathematical formulas or data
 coming from physics simulations of the problem, as shown in the example above.
-
-

+ 55 - 4
doc/src/tut/classes.do.txt

@@ -1,5 +1,15 @@
 ======= Basic Shapes =======
 
+This section presents many of the basic shapes in Pysketcher:
+`Axis`, `Distance_wText`, `Rectangle`, 	`Triangle`, `Arc`,
+`Spring`, `Dashpot`, and `Wavy`.
+Each shape is demonstrated with a figure and a
+unit test that shows how the figure is constructed in Python code.
+These demos rely heavily on the method `draw_dimensions` in
+the shape classes, which annotates the basic drawing of the shape
+with the various geometric parameters that govern the shape.
+
+
 ===== Axis =====
 
 The `Axis` object gives the possibility draw a single axis to
@@ -7,8 +17,14 @@ notify a coordinate system. Here is an example where we
 draw $x$ and $y$ axis of three coordinate systems of different
 rotation:
 
+<linebreak>
+<linebreak>
+
 FIGURE: [fig-tut/Axis, width=500 frac=0.7]
 
+<linebreak>
+<linebreak>
+
 The corresponding code looks like this:
 
 @@@CODE ../../../pysketcher/shapes.py fromto: def test_Axis@drawing_tool.savefig\('tmp_Axis'\)
@@ -20,8 +36,16 @@ a distance in a sketch, with an additional text in the middle of the arrow.
 
 The figure
 
+
+<linebreak>
+<linebreak>
+
 FIGURE: [fig-tut/Distance_wText, width=500 frac=0.7]
 
+<linebreak>
+<linebreak>
+
+
 was produced by this code:
 
 @@@CODE ../../../pysketcher/shapes.py fromto: def test_Distance_wText@drawing_tool.savefig\('tmp_Distance
@@ -34,16 +58,25 @@ the appearance of the text that goes with the distance arrow.
 
 FIGURE: [fig-tut/Rectangle, width=500 frac=0.7]
 
+<linebreak>
+<linebreak>
+
+The above figure can be produced by the following code.
 
 @@@CODE ../../../pysketcher/shapes.py fromto: def test_Rectangle@drawing_tool.savefig\('tmp_Rectangle
 
-The `draw_dimension` method adds explanation of dimensions and various
-important argument in the construction of a shape.
+Note that the `draw_dimension` method adds explanation of dimensions and various
+important argument in the construction of a shape. It adapts the annotations
+to the geometry of the current shape.
 
 ===== Triangle =====
 
 FIGURE: [fig-tut/Triangle, width=500 frac=0.7]
 
+<linebreak>
+<linebreak>
+
+The code below produces the figure.
 
 @@@CODE ../../../pysketcher/shapes.py fromto: def test_Triangle@drawing_tool.savefig\('tmp_Triangle
 Here, the `draw_dimension` method writes the name of the corners at the
@@ -55,6 +88,10 @@ to the location of the p1, p2, and even p3 texts.
 
 FIGURE: [fig-tut/Arc, width=400 frac=0.5]
 
+<linebreak>
+<linebreak>
+
+An arc like the one above is produced by
 
 @@@CODE ../../../pysketcher/shapes.py fromto: def test_Arc@drawing_tool.savefig\('tmp_Arc
 
@@ -62,6 +99,10 @@ FIGURE: [fig-tut/Arc, width=400 frac=0.5]
 
 FIGURE: [fig-tut/Spring, width=800 frac=1]
 
+<linebreak>
+<linebreak>
+
+The code for making these two springs goes like this:
 
 @@@CODE ../../../pysketcher/shapes.py fromto: def test_Spring@drawing_tool.savefig\('tmp_Spring
 
@@ -69,6 +110,10 @@ FIGURE: [fig-tut/Spring, width=800 frac=1]
 
 FIGURE: [fig-tut/Dashpot, width=600 frac=0.8]
 
+<linebreak>
+<linebreak>
+
+This dashpot is produced by
 
 @@@CODE ../../../pysketcher/shapes.py fromto: def test_Dashpot@drawing_tool.savefig\('tmp_Dashpot
 
@@ -78,11 +123,17 @@ Looks strange. Fix x axis.
 
 ===== Stochastic curves =====
 
-The `StochasticWavyCurve` object offers three pre-computed
-graphcs that have a random variation:
+The `StochasticWavyCurve` object offers three precomputed
+graphics that have a random variation:
+
+<linebreak>
+<linebreak>
 
 FIGURE: [fig-tut/StochasticWavyCurve.png, width=600 frac=1]
 
+<linebreak>
+<linebreak>
+
 The usage is simple. The construction
 
 !bc pycod

BIN
doc/src/tut/fig-tut/vehicle_v1.pdf


BIN
doc/src/tut/fig-tut/vehicle_v1.png


BIN
doc/src/tut/fig-tut/vehicle_v2.pdf


BIN
doc/src/tut/fig-tut/vehicle_v2.png


BIN
doc/src/tut/fig-tut/vehicle_v23.pdf


BIN
doc/src/tut/fig-tut/vehicle_v23.png


BIN
doc/src/tut/fig-tut/vehicle_v3.pdf


BIN
doc/src/tut/fig-tut/vehicle_v3.png


+ 0 - 4
doc/src/tut/implementation.do.txt

@@ -468,11 +468,7 @@ that `vehicle` is the parent of `body` and that `body` is a child of
 `vehicle`. The term *node* is also often used to describe an element
 in a tree. A node may have several other nodes as *descendants*.
 
-<<<<<<< HEAD
 FIGURE: [fig-tut/Vehicle0_hier2, width=600 frac=0.8] Hierarchy of figure elements in an instance of class `Vehicle0`. label{sketcher:fig:Vehicle0:hier2}
-=======
-FIGURE: [fig-tut/Vehicle0_hier2, width=600] Hierarchy of figure elements in an instance of class `Vehicle0`. label{sketcher:fig:Vehicle0:hier2}
->>>>>>> de4bcb4860ba1b305e7896fea87a27f83ff8390b
 
 Recursion is the principal programming technique to traverse tree structures.
 Any object in the tree can be viewed as a root of a subtree. For

+ 9 - 0
doc/src/tut/main_sketcher.do.txt

@@ -9,6 +9,12 @@ src_path_tut = 'http://tinyurl.com/oou9lp7'
 src_path_pysketcher = 'http://tinyurl.com/ot733jn'
 %>
 
+!bbox
+This document is derived from Chapter 9 in the book
+"A Primer on Scientific Programming with Python": "http://www.amazon.com/Scientific-Programming-Computational-Science-Engineering/dp/3642549586/ref=sr_1_2?s=books&ie=UTF8&qid=1407225588&sr=1-2&keywords=langtangen", by H. P. Langtangen,
+4th edition, Springer, 2014.
+!ebox
+
 __Abstract.__
 Pysketcher is a Python package which allows principal sketches of
 physics and mechanics problems to be realized through short programs
@@ -35,8 +41,11 @@ no further background is required.
 # Learning Goals: these targets the inner workings of pysketcher,
 # which is just a part of this document...
 
+!split
 # #include "basics.do.txt"
 
+!split
 # #include "classes.do.txt"
 
+!split
 # #include "implementation.do.txt"

+ 22 - 16
doc/src/tut/make.sh

@@ -7,23 +7,29 @@ if [ $? -ne 0 ]; then
   exit 1
 fi
 
-main=main_sketcher
-doconce format html $main
+name=main_sketcher
+doconce format html $name
 
-cp .ptex2tex.cfg-minted .ptex2tex.cfg
-doconce format pdflatex $main
-ptex2tex -DMINTED $main
-pdflatex -shell-escape $main
-makeindex $main
-pdflatex -shell-escape $main
-pdflatex -shell-escape $main
+#cp .ptex2tex.cfg-minted .ptex2tex.cfg
+doconce format pdflatex $name --skip_inline_comments --latex_code_style=pyg
+#ptex2tex -DMINTED $name
+pdflatex -shell-escape $name
+makeindex $name
+pdflatex -shell-escape $name
+pdflatex -shell-escape $name
+cp $name.pdf pysketcher.pdf
 
-doconce format sphinx $main --skip_inline_comments
-rm -rf sphinx-rootdir
-doconce sphinx_dir author="H. P. Langtangen" version=0.1 theme=pyramid $main
+html=pysketcher
+doconce format html $name --skip_inline_comments --html_style=boostrap_bluegray --html_output=$html
+doconce split_html ${html}.html
+
+doconce format sphinx $name --skip_inline_comments
+doconce sphinx_dir author="H. P. Langtangen" version=0.1 theme=pyramid $name
 python automake_sphinx.py
 
-cp ${main}_primer.pdf ../../tutorial/pysketcher_blue.pdf
-cp ${main}.pdf ../../tutorial/pysketcher.pdf
-#cp $main.html ../../tutorial/pysketcher.html
-cp -r sphinx-rootdir/_build/html ../../tutorial/html
+# Publish
+dest=../../pub/tutorial
+name=pysketcher
+cp ${name}.html ._${name}*.html ${name}.pdf $dest/
+rm -rf $dest/html
+cp -r sphinx-rootdir/_build/html $dest/html

+ 10 - 0
doc/src/tut/src-tut/README.txt

@@ -0,0 +1,10 @@
+vehicle0.py: draw vehicle, change colors, let it move
+
+vehicle0_dim.py: draw vehicle and add dimensions used in the sketch
+
+vehicle0_scaling.py: example on how to easily make different vehicles
+from the same code
+
+vehicle1.py: as vehicle0.py, but rolling wheels
+
+vehicle2.py: how to make the vehicle drawing a shape in the Shape hierarchy

BIN
doc/src/tut/src-tut/test/tmp_Arc.png


BIN
doc/src/tut/src-tut/test/tmp_Axis.png


BIN
doc/src/tut/src-tut/test/tmp_Dashpot.png


BIN
doc/src/tut/src-tut/test/tmp_Distance_wText.png


BIN
doc/src/tut/src-tut/test/tmp_Rectangle.png


BIN
doc/src/tut/src-tut/test/tmp_Spring.png


BIN
doc/src/tut/src-tut/test/tmp_Triangle.png


+ 42 - 0
doc/src/tut/src-tut/vehicle0_scaling.py

@@ -0,0 +1,42 @@
+from pysketcher import *
+
+def draw_vehicle(
+    R=1,    # radius of wheel
+    L=4,    # distance between wheels
+    H=2,    # height of vehicle body
+    w_1=5,  # position of front wheel
+    ):
+
+    xmax = w_1 + 2*L + 3*R
+    drawing_tool.set_coordinate_system(xmin=0, xmax=xmax,
+                                       ymin=-1, ymax=2*R + 3*H,
+                                       axis=False)
+
+    wheel1 = Circle(center=(w_1, R), radius=R)
+    wheel2 = wheel1.copy()
+    wheel2.translate((L,0))
+
+    under = Rectangle(lower_left_corner=(w_1-2*R, 2*R),
+                      width=2*R + L + 2*R, height=H)
+    over  = Rectangle(lower_left_corner=(w_1, 2*R + H),
+                      width=2.5*R, height=1.25*H)
+
+    wheels = Composition({'wheel1': wheel1, 'wheel2': wheel2})
+    body = Composition({'under': under, 'over': over})
+
+    vehicle = Composition({'wheels': wheels, 'body': body})
+    ground = Wall(x=[R, xmax], y=[0, 0], thickness=-0.3*R)
+
+    fig = Composition({'vehicle': vehicle, 'ground': ground})
+    return fig
+
+#fig = draw_vehicle(R=1, L=4, H=2, w_1=8)
+#fig = draw_vehicle(R=0.5, L=5, H=2, w_1=8)
+fig = draw_vehicle(R=2, L=7, H=1, w_1=10)
+fig.draw()  # send all figures to plotting backend
+
+drawing_tool.display()
+drawing_tool.savefig('tmp1.png')
+drawing_tool.savefig('tmp1.pdf')
+
+raw_input()

BIN
doc/tutorial/html/_images/vehicle1.png


BIN
doc/tutorial/html/_images/wheel_on_inclined_plane.png


+ 0 - 20
doc/tutorial/html/_sources/index.txt

@@ -1,20 +0,0 @@
-
-.. Master file automatically created by doconce sphinx_dir
-
-Using Pysketcher to Create Principal Sketches of Physics Problems
-=================================================================
-
-Contents:
-
-.. toctree::
-   :maxdepth: 2
-
-   wrap_sketcher
-
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 1383
doc/tutorial/html/_sources/wrap_sketcher.txt


+ 0 - 528
doc/tutorial/html/_static/basic.css

@@ -1,528 +0,0 @@
-/*
- * basic.css
- * ~~~~~~~~~
- *
- * Sphinx stylesheet -- basic theme.
- *
- * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-/* -- main layout ----------------------------------------------------------- */
-
-div.clearer {
-    clear: both;
-}
-
-/* -- relbar ---------------------------------------------------------------- */
-
-div.related {
-    width: 100%;
-    font-size: 90%;
-}
-
-div.related h3 {
-    display: none;
-}
-
-div.related ul {
-    margin: 0;
-    padding: 0 0 0 10px;
-    list-style: none;
-}
-
-div.related li {
-    display: inline;
-}
-
-div.related li.right {
-    float: right;
-    margin-right: 5px;
-}
-
-/* -- sidebar --------------------------------------------------------------- */
-
-div.sphinxsidebarwrapper {
-    padding: 10px 5px 0 10px;
-}
-
-div.sphinxsidebar {
-    float: left;
-    width: 230px;
-    margin-left: -100%;
-    font-size: 90%;
-}
-
-div.sphinxsidebar ul {
-    list-style: none;
-}
-
-div.sphinxsidebar ul ul,
-div.sphinxsidebar ul.want-points {
-    margin-left: 20px;
-    list-style: square;
-}
-
-div.sphinxsidebar ul ul {
-    margin-top: 0;
-    margin-bottom: 0;
-}
-
-div.sphinxsidebar form {
-    margin-top: 10px;
-}
-
-div.sphinxsidebar input {
-    border: 1px solid #98dbcc;
-    font-family: sans-serif;
-    font-size: 1em;
-}
-
-img {
-    border: 0;
-}
-
-/* -- search page ----------------------------------------------------------- */
-
-ul.search {
-    margin: 10px 0 0 20px;
-    padding: 0;
-}
-
-ul.search li {
-    padding: 5px 0 5px 20px;
-    background-image: url(file.png);
-    background-repeat: no-repeat;
-    background-position: 0 7px;
-}
-
-ul.search li a {
-    font-weight: bold;
-}
-
-ul.search li div.context {
-    color: #888;
-    margin: 2px 0 0 30px;
-    text-align: left;
-}
-
-ul.keywordmatches li.goodmatch a {
-    font-weight: bold;
-}
-
-/* -- index page ------------------------------------------------------------ */
-
-table.contentstable {
-    width: 90%;
-}
-
-table.contentstable p.biglink {
-    line-height: 150%;
-}
-
-a.biglink {
-    font-size: 1.3em;
-}
-
-span.linkdescr {
-    font-style: italic;
-    padding-top: 5px;
-    font-size: 90%;
-}
-
-/* -- general index --------------------------------------------------------- */
-
-table.indextable {
-    width: 100%;
-}
-
-table.indextable td {
-    text-align: left;
-    vertical-align: top;
-}
-
-table.indextable dl, table.indextable dd {
-    margin-top: 0;
-    margin-bottom: 0;
-}
-
-table.indextable tr.pcap {
-    height: 10px;
-}
-
-table.indextable tr.cap {
-    margin-top: 10px;
-    background-color: #f2f2f2;
-}
-
-img.toggler {
-    margin-right: 3px;
-    margin-top: 3px;
-    cursor: pointer;
-}
-
-div.modindex-jumpbox {
-    border-top: 1px solid #ddd;
-    border-bottom: 1px solid #ddd;
-    margin: 1em 0 1em 0;
-    padding: 0.4em;
-}
-
-div.genindex-jumpbox {
-    border-top: 1px solid #ddd;
-    border-bottom: 1px solid #ddd;
-    margin: 1em 0 1em 0;
-    padding: 0.4em;
-}
-
-/* -- general body styles --------------------------------------------------- */
-
-a.headerlink {
-    visibility: hidden;
-}
-
-h1:hover > a.headerlink,
-h2:hover > a.headerlink,
-h3:hover > a.headerlink,
-h4:hover > a.headerlink,
-h5:hover > a.headerlink,
-h6:hover > a.headerlink,
-dt:hover > a.headerlink {
-    visibility: visible;
-}
-
-div.body p.caption {
-    text-align: inherit;
-}
-
-div.body td {
-    text-align: left;
-}
-
-.field-list ul {
-    padding-left: 1em;
-}
-
-.first {
-    margin-top: 0 !important;
-}
-
-p.rubric {
-    margin-top: 30px;
-    font-weight: bold;
-}
-
-img.align-left, .figure.align-left, object.align-left {
-    clear: left;
-    float: left;
-    margin-right: 1em;
-}
-
-img.align-right, .figure.align-right, object.align-right {
-    clear: right;
-    float: right;
-    margin-left: 1em;
-}
-
-img.align-center, .figure.align-center, object.align-center {
-  display: block;
-  margin-left: auto;
-  margin-right: auto;
-}
-
-.align-left {
-    text-align: left;
-}
-
-.align-center {
-    clear: both;
-    text-align: center;
-}
-
-.align-right {
-    text-align: right;
-}
-
-/* -- sidebars -------------------------------------------------------------- */
-
-div.sidebar {
-    margin: 0 0 0.5em 1em;
-    border: 1px solid #ddb;
-    padding: 7px 7px 0 7px;
-    background-color: #ffe;
-    width: 40%;
-    float: right;
-}
-
-p.sidebar-title {
-    font-weight: bold;
-}
-
-/* -- topics ---------------------------------------------------------------- */
-
-div.topic {
-    border: 1px solid #ccc;
-    padding: 7px 7px 0 7px;
-    margin: 10px 0 10px 0;
-}
-
-p.topic-title {
-    font-size: 1.1em;
-    font-weight: bold;
-    margin-top: 10px;
-}
-
-/* -- admonitions ----------------------------------------------------------- */
-
-div.admonition {
-    margin-top: 10px;
-    margin-bottom: 10px;
-    padding: 7px;
-}
-
-div.admonition dt {
-    font-weight: bold;
-}
-
-div.admonition dl {
-    margin-bottom: 0;
-}
-
-p.admonition-title {
-    margin: 0px 10px 5px 0px;
-    font-weight: bold;
-}
-
-div.body p.centered {
-    text-align: center;
-    margin-top: 25px;
-}
-
-/* -- tables ---------------------------------------------------------------- */
-
-table.docutils {
-    border: 0;
-    border-collapse: collapse;
-}
-
-table.docutils td, table.docutils th {
-    padding: 1px 8px 1px 5px;
-    border-top: 0;
-    border-left: 0;
-    border-right: 0;
-    border-bottom: 1px solid #aaa;
-}
-
-table.field-list td, table.field-list th {
-    border: 0 !important;
-}
-
-table.footnote td, table.footnote th {
-    border: 0 !important;
-}
-
-th {
-    text-align: left;
-    padding-right: 5px;
-}
-
-table.citation {
-    border-left: solid 1px gray;
-    margin-left: 1px;
-}
-
-table.citation td {
-    border-bottom: none;
-}
-
-/* -- other body styles ----------------------------------------------------- */
-
-ol.arabic {
-    list-style: decimal;
-}
-
-ol.loweralpha {
-    list-style: lower-alpha;
-}
-
-ol.upperalpha {
-    list-style: upper-alpha;
-}
-
-ol.lowerroman {
-    list-style: lower-roman;
-}
-
-ol.upperroman {
-    list-style: upper-roman;
-}
-
-dl {
-    margin-bottom: 15px;
-}
-
-dd p {
-    margin-top: 0px;
-}
-
-dd ul, dd table {
-    margin-bottom: 10px;
-}
-
-dd {
-    margin-top: 3px;
-    margin-bottom: 10px;
-    margin-left: 30px;
-}
-
-dt:target, .highlighted {
-    background-color: #fbe54e;
-}
-
-dl.glossary dt {
-    font-weight: bold;
-    font-size: 1.1em;
-}
-
-.field-list ul {
-    margin: 0;
-    padding-left: 1em;
-}
-
-.field-list p {
-    margin: 0;
-}
-
-.refcount {
-    color: #060;
-}
-
-.optional {
-    font-size: 1.3em;
-}
-
-.versionmodified {
-    font-style: italic;
-}
-
-.system-message {
-    background-color: #fda;
-    padding: 5px;
-    border: 3px solid red;
-}
-
-.footnote:target  {
-    background-color: #ffa;
-}
-
-.line-block {
-    display: block;
-    margin-top: 1em;
-    margin-bottom: 1em;
-}
-
-.line-block .line-block {
-    margin-top: 0;
-    margin-bottom: 0;
-    margin-left: 1.5em;
-}
-
-.guilabel, .menuselection {
-    font-family: sans-serif;
-}
-
-.accelerator {
-    text-decoration: underline;
-}
-
-.classifier {
-    font-style: oblique;
-}
-
-/* -- code displays --------------------------------------------------------- */
-
-pre {
-    overflow: auto;
-    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
-}
-
-td.linenos pre {
-    padding: 5px 0px;
-    border: 0;
-    background-color: transparent;
-    color: #aaa;
-}
-
-table.highlighttable {
-    margin-left: 0.5em;
-}
-
-table.highlighttable td {
-    padding: 0 0.5em 0 0.5em;
-}
-
-tt.descname {
-    background-color: transparent;
-    font-weight: bold;
-    font-size: 1.2em;
-}
-
-tt.descclassname {
-    background-color: transparent;
-}
-
-tt.xref, a tt {
-    background-color: transparent;
-    font-weight: bold;
-}
-
-h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
-    background-color: transparent;
-}
-
-.viewcode-link {
-    float: right;
-}
-
-.viewcode-back {
-    float: right;
-    font-family: sans-serif;
-}
-
-div.viewcode-block:target {
-    margin: -1px -10px;
-    padding: 0 10px;
-}
-
-/* -- math display ---------------------------------------------------------- */
-
-img.math {
-    vertical-align: middle;
-}
-
-div.body div.math p {
-    text-align: center;
-}
-
-span.eqno {
-    float: right;
-}
-
-/* -- printout stylesheet --------------------------------------------------- */
-
-@media print {
-    div.document,
-    div.documentwrapper,
-    div.bodywrapper {
-        margin: 0 !important;
-        width: 100%;
-    }
-
-    div.sphinxsidebar,
-    div.related,
-    div.footer,
-    #top-link {
-        display: none;
-    }
-}

+ 0 - 556
doc/tutorial/html/_static/searchtools.js

@@ -1,556 +0,0 @@
-/*
- * searchtools.js_t
- * ~~~~~~~~~~~~~~~~
- *
- * Sphinx JavaScript utilties for the full-text search.
- *
- * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-/**
- * helper function to return a node containing the
- * search summary for a given text. keywords is a list
- * of stemmed words, hlwords is the list of normal, unstemmed
- * words. the first one is used to find the occurance, the
- * latter for highlighting it.
- */
-
-jQuery.makeSearchSummary = function(text, keywords, hlwords) {
-  var textLower = text.toLowerCase();
-  var start = 0;
-  $.each(keywords, function() {
-    var i = textLower.indexOf(this.toLowerCase());
-    if (i > -1)
-      start = i;
-  });
-  start = Math.max(start - 120, 0);
-  var excerpt = ((start > 0) ? '...' : '') +
-  $.trim(text.substr(start, 240)) +
-  ((start + 240 - text.length) ? '...' : '');
-  var rv = $('<div class="context"></div>').text(excerpt);
-  $.each(hlwords, function() {
-    rv = rv.highlightText(this, 'highlighted');
-  });
-  return rv;
-}
-
-
-/**
- * Porter Stemmer
- */
-var Stemmer = function() {
-
-  var step2list = {
-    ational: 'ate',
-    tional: 'tion',
-    enci: 'ence',
-    anci: 'ance',
-    izer: 'ize',
-    bli: 'ble',
-    alli: 'al',
-    entli: 'ent',
-    eli: 'e',
-    ousli: 'ous',
-    ization: 'ize',
-    ation: 'ate',
-    ator: 'ate',
-    alism: 'al',
-    iveness: 'ive',
-    fulness: 'ful',
-    ousness: 'ous',
-    aliti: 'al',
-    iviti: 'ive',
-    biliti: 'ble',
-    logi: 'log'
-  };
-
-  var step3list = {
-    icate: 'ic',
-    ative: '',
-    alize: 'al',
-    iciti: 'ic',
-    ical: 'ic',
-    ful: '',
-    ness: ''
-  };
-
-  var c = "[^aeiou]";          // consonant
-  var v = "[aeiouy]";          // vowel
-  var C = c + "[^aeiouy]*";    // consonant sequence
-  var V = v + "[aeiou]*";      // vowel sequence
-
-  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
-  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
-  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
-  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
-
-  this.stemWord = function (w) {
-    var stem;
-    var suffix;
-    var firstch;
-    var origword = w;
-
-    if (w.length < 3)
-      return w;
-
-    var re;
-    var re2;
-    var re3;
-    var re4;
-
-    firstch = w.substr(0,1);
-    if (firstch == "y")
-      w = firstch.toUpperCase() + w.substr(1);
-
-    // Step 1a
-    re = /^(.+?)(ss|i)es$/;
-    re2 = /^(.+?)([^s])s$/;
-
-    if (re.test(w))
-      w = w.replace(re,"$1$2");
-    else if (re2.test(w))
-      w = w.replace(re2,"$1$2");
-
-    // Step 1b
-    re = /^(.+?)eed$/;
-    re2 = /^(.+?)(ed|ing)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      re = new RegExp(mgr0);
-      if (re.test(fp[1])) {
-        re = /.$/;
-        w = w.replace(re,"");
-      }
-    }
-    else if (re2.test(w)) {
-      var fp = re2.exec(w);
-      stem = fp[1];
-      re2 = new RegExp(s_v);
-      if (re2.test(stem)) {
-        w = stem;
-        re2 = /(at|bl|iz)$/;
-        re3 = new RegExp("([^aeiouylsz])\\1$");
-        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
-        if (re2.test(w))
-          w = w + "e";
-        else if (re3.test(w)) {
-          re = /.$/;
-          w = w.replace(re,"");
-        }
-        else if (re4.test(w))
-          w = w + "e";
-      }
-    }
-
-    // Step 1c
-    re = /^(.+?)y$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      re = new RegExp(s_v);
-      if (re.test(stem))
-        w = stem + "i";
-    }
-
-    // Step 2
-    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      suffix = fp[2];
-      re = new RegExp(mgr0);
-      if (re.test(stem))
-        w = stem + step2list[suffix];
-    }
-
-    // Step 3
-    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      suffix = fp[2];
-      re = new RegExp(mgr0);
-      if (re.test(stem))
-        w = stem + step3list[suffix];
-    }
-
-    // Step 4
-    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
-    re2 = /^(.+?)(s|t)(ion)$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      re = new RegExp(mgr1);
-      if (re.test(stem))
-        w = stem;
-    }
-    else if (re2.test(w)) {
-      var fp = re2.exec(w);
-      stem = fp[1] + fp[2];
-      re2 = new RegExp(mgr1);
-      if (re2.test(stem))
-        w = stem;
-    }
-
-    // Step 5
-    re = /^(.+?)e$/;
-    if (re.test(w)) {
-      var fp = re.exec(w);
-      stem = fp[1];
-      re = new RegExp(mgr1);
-      re2 = new RegExp(meq1);
-      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
-      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
-        w = stem;
-    }
-    re = /ll$/;
-    re2 = new RegExp(mgr1);
-    if (re.test(w) && re2.test(w)) {
-      re = /.$/;
-      w = w.replace(re,"");
-    }
-
-    // and turn initial Y back to y
-    if (firstch == "y")
-      w = firstch.toLowerCase() + w.substr(1);
-    return w;
-  }
-}
-
-
-/**
- * Search Module
- */
-var Search = {
-
-  _index : null,
-  _queued_query : null,
-  _pulse_status : -1,
-
-  init : function() {
-      var params = $.getQueryParameters();
-      if (params.q) {
-          var query = params.q[0];
-          $('input[name="q"]')[0].value = query;
-          this.performSearch(query);
-      }
-  },
-
-  loadIndex : function(url) {
-    $.ajax({type: "GET", url: url, data: null, success: null,
-            dataType: "script", cache: true});
-  },
-
-  setIndex : function(index) {
-    var q;
-    this._index = index;
-    if ((q = this._queued_query) !== null) {
-      this._queued_query = null;
-      Search.query(q);
-    }
-  },
-
-  hasIndex : function() {
-      return this._index !== null;
-  },
-
-  deferQuery : function(query) {
-      this._queued_query = query;
-  },
-
-  stopPulse : function() {
-      this._pulse_status = 0;
-  },
-
-  startPulse : function() {
-    if (this._pulse_status >= 0)
-        return;
-    function pulse() {
-      Search._pulse_status = (Search._pulse_status + 1) % 4;
-      var dotString = '';
-      for (var i = 0; i < Search._pulse_status; i++)
-        dotString += '.';
-      Search.dots.text(dotString);
-      if (Search._pulse_status > -1)
-        window.setTimeout(pulse, 500);
-    };
-    pulse();
-  },
-
-  /**
-   * perform a search for something
-   */
-  performSearch : function(query) {
-    // create the required interface elements
-    this.out = $('#search-results');
-    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
-    this.dots = $('<span></span>').appendTo(this.title);
-    this.status = $('<p style="display: none"></p>').appendTo(this.out);
-    this.output = $('<ul class="search"/>').appendTo(this.out);
-
-    $('#search-progress').text(_('Preparing search...'));
-    this.startPulse();
-
-    // index already loaded, the browser was quick!
-    if (this.hasIndex())
-      this.query(query);
-    else
-      this.deferQuery(query);
-  },
-
-  query : function(query) {
-    var stopwords = ["and","then","into","it","as","are","in","if","for","no","there","their","was","is","be","to","that","but","they","not","such","with","by","a","on","these","of","will","this","near","the","or","at"];
-
-    // Stem the searchterms and add them to the correct list
-    var stemmer = new Stemmer();
-    var searchterms = [];
-    var excluded = [];
-    var hlterms = [];
-    var tmp = query.split(/\s+/);
-    var objectterms = [];
-    for (var i = 0; i < tmp.length; i++) {
-      if (tmp[i] != "") {
-          objectterms.push(tmp[i].toLowerCase());
-      }
-
-      if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
-          tmp[i] == "") {
-        // skip this "word"
-        continue;
-      }
-      // stem the word
-      var word = stemmer.stemWord(tmp[i]).toLowerCase();
-      // select the correct list
-      if (word[0] == '-') {
-        var toAppend = excluded;
-        word = word.substr(1);
-      }
-      else {
-        var toAppend = searchterms;
-        hlterms.push(tmp[i].toLowerCase());
-      }
-      // only add if not already in the list
-      if (!$.contains(toAppend, word))
-        toAppend.push(word);
-    };
-    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
-
-    // console.debug('SEARCH: searching for:');
-    // console.info('required: ', searchterms);
-    // console.info('excluded: ', excluded);
-
-    // prepare search
-    var filenames = this._index.filenames;
-    var titles = this._index.titles;
-    var terms = this._index.terms;
-    var fileMap = {};
-    var files = null;
-    // different result priorities
-    var importantResults = [];
-    var objectResults = [];
-    var regularResults = [];
-    var unimportantResults = [];
-    $('#search-progress').empty();
-
-    // lookup as object
-    for (var i = 0; i < objectterms.length; i++) {
-      var others = Array.concat(objectterms.slice(0,i),
-                                objectterms.slice(i+1, objectterms.length))
-      var results = this.performObjectSearch(objectterms[i], others);
-      // Assume first word is most likely to be the object,
-      // other words more likely to be in description.
-      // Therefore put matches for earlier words first.
-      // (Results are eventually used in reverse order).
-      objectResults = results[0].concat(objectResults);
-      importantResults = results[1].concat(importantResults);
-      unimportantResults = results[2].concat(unimportantResults);
-    }
-
-    // perform the search on the required terms
-    for (var i = 0; i < searchterms.length; i++) {
-      var word = searchterms[i];
-      // no match but word was a required one
-      if ((files = terms[word]) == null)
-        break;
-      if (files.length == undefined) {
-        files = [files];
-      }
-      // create the mapping
-      for (var j = 0; j < files.length; j++) {
-        var file = files[j];
-        if (file in fileMap)
-          fileMap[file].push(word);
-        else
-          fileMap[file] = [word];
-      }
-    }
-
-    // now check if the files don't contain excluded terms
-    for (var file in fileMap) {
-      var valid = true;
-
-      // check if all requirements are matched
-      if (fileMap[file].length != searchterms.length)
-        continue;
-
-      // ensure that none of the excluded terms is in the
-      // search result.
-      for (var i = 0; i < excluded.length; i++) {
-        if (terms[excluded[i]] == file ||
-            $.contains(terms[excluded[i]] || [], file)) {
-          valid = false;
-          break;
-        }
-      }
-
-      // if we have still a valid result we can add it
-      // to the result list
-      if (valid)
-        regularResults.push([filenames[file], titles[file], '', null]);
-    }
-
-    // delete unused variables in order to not waste
-    // memory until list is retrieved completely
-    delete filenames, titles, terms;
-
-    // now sort the regular results descending by title
-    regularResults.sort(function(a, b) {
-      var left = a[1].toLowerCase();
-      var right = b[1].toLowerCase();
-      return (left > right) ? -1 : ((left < right) ? 1 : 0);
-    });
-
-    // combine all results
-    var results = unimportantResults.concat(regularResults)
-      .concat(objectResults).concat(importantResults);
-
-    // print the results
-    var resultCount = results.length;
-    function displayNextItem() {
-      // results left, load the summary and display it
-      if (results.length) {
-        var item = results.pop();
-        var listItem = $('<li style="display:none"></li>');
-        if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
-          // dirhtml builder
-          var dirname = item[0] + '/';
-          if (dirname.match(/\/index\/$/)) {
-            dirname = dirname.substring(0, dirname.length-6);
-          } else if (dirname == 'index/') {
-            dirname = '';
-          }
-          listItem.append($('<a/>').attr('href',
-            DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
-            highlightstring + item[2]).html(item[1]));
-        } else {
-          // normal html builders
-          listItem.append($('<a/>').attr('href',
-            item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
-            highlightstring + item[2]).html(item[1]));
-        }
-        if (item[3]) {
-          listItem.append($('<span> (' + item[3] + ')</span>'));
-          Search.output.append(listItem);
-          listItem.slideDown(5, function() {
-            displayNextItem();
-          });
-        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
-          $.get(DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' +
-                item[0] + '.txt', function(data) {
-            if (data != '') {
-              listItem.append($.makeSearchSummary(data, searchterms, hlterms));
-              Search.output.append(listItem);
-            }
-            listItem.slideDown(5, function() {
-              displayNextItem();
-            });
-          }, "text");
-        } else {
-          // no source available, just display title
-          Search.output.append(listItem);
-          listItem.slideDown(5, function() {
-            displayNextItem();
-          });
-        }
-      }
-      // search finished, update title and status message
-      else {
-        Search.stopPulse();
-        Search.title.text(_('Search Results'));
-        if (!resultCount)
-          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
-        else
-            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
-        Search.status.fadeIn(500);
-      }
-    }
-    displayNextItem();
-  },
-
-  performObjectSearch : function(object, otherterms) {
-    var filenames = this._index.filenames;
-    var objects = this._index.objects;
-    var objnames = this._index.objnames;
-    var titles = this._index.titles;
-
-    var importantResults = [];
-    var objectResults = [];
-    var unimportantResults = [];
-
-    for (var prefix in objects) {
-      for (var name in objects[prefix]) {
-        var fullname = (prefix ? prefix + '.' : '') + name;
-        if (fullname.toLowerCase().indexOf(object) > -1) {
-          var match = objects[prefix][name];
-          var objname = objnames[match[1]];
-          var title = titles[match[0]];
-          // If more than one term searched for, we require other words to be
-          // found in the name/title/description
-          if (otherterms.length > 0) {
-            var haystack = (prefix + ' ' + name + ' ' + objname + ' ' + title).toLowerCase();
-            var allfound = true;
-            for (var i = 0; i < otherterms.length; i++) {
-              if (haystack.indexOf(otherterms[i]) == -1) {
-                allfound = false;
-                break;
-              }
-            }
-            if (!allfound) {
-              continue;
-            }
-          }
-          var descr = objname + _(', in ') + title;
-          // XXX the generated anchors are not generally correct
-          // XXX there may be custom prefixes
-          result = [filenames[match[0]], fullname, '#'+fullname, descr];
-          switch (match[2]) {
-          case 1: objectResults.push(result); break;
-          case 0: importantResults.push(result); break;
-          case 2: unimportantResults.push(result); break;
-          }
-        }
-      }
-    }
-
-    // sort results descending
-    objectResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-    importantResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-    unimportantResults.sort(function(a, b) {
-      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
-    });
-
-    return [importantResults, objectResults, unimportantResults]
-  }
-}
-
-$(document).ready(function() {
-  Search.init();
-});

+ 0 - 4
doc/tutorial/html/html/.buildinfo

@@ -1,4 +0,0 @@
-# Sphinx build info version 1
-# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 8734583df8ee10fba2867e926fcad8b4
-tags: fbb0d17656682115ca4d033fb2f83ba1

BIN
doc/tutorial/html/html/_images/Vehicle0_hier2.png


BIN
doc/tutorial/html/html/_images/vehicle0.png


BIN
doc/tutorial/html/html/_images/vehicle0_dim.png


BIN
doc/tutorial/html/html/_images/vehicle0_hier1.png


BIN
doc/tutorial/html/html/_images/vehicle1.png


BIN
doc/tutorial/html/html/_images/wheel_on_inclined_plane.png


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 1383
doc/tutorial/html/html/_sources/wrap_sketcher.txt


BIN
doc/tutorial/html/html/_static/ajax-loader.gif


BIN
doc/tutorial/html/html/_static/comment-bright.png


BIN
doc/tutorial/html/html/_static/comment-close.png


BIN
doc/tutorial/html/html/_static/comment.png


BIN
doc/tutorial/html/html/_static/dialog-note.png


BIN
doc/tutorial/html/html/_static/dialog-seealso.png


BIN
doc/tutorial/html/html/_static/dialog-topic.png


BIN
doc/tutorial/html/html/_static/dialog-warning.png


+ 0 - 247
doc/tutorial/html/html/_static/doctools.js

@@ -1,247 +0,0 @@
-/*
- * doctools.js
- * ~~~~~~~~~~~
- *
- * Sphinx JavaScript utilties for all documentation.
- *
- * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
- * :license: BSD, see LICENSE for details.
- *
- */
-
-/**
- * select a different prefix for underscore
- */
-$u = _.noConflict();
-
-/**
- * make the code below compatible with browsers without
- * an installed firebug like debugger
-if (!window.console || !console.firebug) {
-  var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
-    "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
-    "profile", "profileEnd"];
-  window.console = {};
-  for (var i = 0; i < names.length; ++i)
-    window.console[names[i]] = function() {};
-}
- */
-
-/**
- * small helper function to urldecode strings
- */
-jQuery.urldecode = function(x) {
-  return decodeURIComponent(x).replace(/\+/g, ' ');
-}
-
-/**
- * small helper function to urlencode strings
- */
-jQuery.urlencode = encodeURIComponent;
-
-/**
- * This function returns the parsed url parameters of the
- * current request. Multiple values per key are supported,
- * it will always return arrays of strings for the value parts.
- */
-jQuery.getQueryParameters = function(s) {
-  if (typeof s == 'undefined')
-    s = document.location.search;
-  var parts = s.substr(s.indexOf('?') + 1).split('&');
-  var result = {};
-  for (var i = 0; i < parts.length; i++) {
-    var tmp = parts[i].split('=', 2);
-    var key = jQuery.urldecode(tmp[0]);
-    var value = jQuery.urldecode(tmp[1]);
-    if (key in result)
-      result[key].push(value);
-    else
-      result[key] = [value];
-  }
-  return result;
-};
-
-/**
- * small function to check if an array contains
- * a given item.
- */
-jQuery.contains = function(arr, item) {
-  for (var i = 0; i < arr.length; i++) {
-    if (arr[i] == item)
-      return true;
-  }
-  return false;
-};
-
-/**
- * highlight a given string on a jquery object by wrapping it in
- * span elements with the given class name.
- */
-jQuery.fn.highlightText = function(text, className) {
-  function highlight(node) {
-    if (node.nodeType == 3) {
-      var val = node.nodeValue;
-      var pos = val.toLowerCase().indexOf(text);
-      if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
-        var span = document.createElement("span");
-        span.className = className;
-        span.appendChild(document.createTextNode(val.substr(pos, text.length)));
-        node.parentNode.insertBefore(span, node.parentNode.insertBefore(
-          document.createTextNode(val.substr(pos + text.length)),
-          node.nextSibling));
-        node.nodeValue = val.substr(0, pos);
-      }
-    }
-    else if (!jQuery(node).is("button, select, textarea")) {
-      jQuery.each(node.childNodes, function() {
-        highlight(this);
-      });
-    }
-  }
-  return this.each(function() {
-    highlight(this);
-  });
-};
-
-/**
- * Small JavaScript module for the documentation.
- */
-var Documentation = {
-
-  init : function() {
-    this.fixFirefoxAnchorBug();
-    this.highlightSearchWords();
-    this.initIndexTable();
-  },
-
-  /**
-   * i18n support
-   */
-  TRANSLATIONS : {},
-  PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
-  LOCALE : 'unknown',
-
-  // gettext and ngettext don't access this so that the functions
-  // can safely bound to a different name (_ = Documentation.gettext)
-  gettext : function(string) {
-    var translated = Documentation.TRANSLATIONS[string];
-    if (typeof translated == 'undefined')
-      return string;
-    return (typeof translated == 'string') ? translated : translated[0];
-  },
-
-  ngettext : function(singular, plural, n) {
-    var translated = Documentation.TRANSLATIONS[singular];
-    if (typeof translated == 'undefined')
-      return (n == 1) ? singular : plural;
-    return translated[Documentation.PLURALEXPR(n)];
-  },
-
-  addTranslations : function(catalog) {
-    for (var key in catalog.messages)
-      this.TRANSLATIONS[key] = catalog.messages[key];
-    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
-    this.LOCALE = catalog.locale;
-  },
-
-  /**
-   * add context elements like header anchor links
-   */
-  addContextElements : function() {
-    $('div[id] > :header:first').each(function() {
-      $('<a class="headerlink">\u00B6</a>').
-      attr('href', '#' + this.id).
-      attr('title', _('Permalink to this headline')).
-      appendTo(this);
-    });
-    $('dt[id]').each(function() {
-      $('<a class="headerlink">\u00B6</a>').
-      attr('href', '#' + this.id).
-      attr('title', _('Permalink to this definition')).
-      appendTo(this);
-    });
-  },
-
-  /**
-   * workaround a firefox stupidity
-   */
-  fixFirefoxAnchorBug : function() {
-    if (document.location.hash && $.browser.mozilla)
-      window.setTimeout(function() {
-        document.location.href += '';
-      }, 10);
-  },
-
-  /**
-   * highlight the search words provided in the url in the text
-   */
-  highlightSearchWords : function() {
-    var params = $.getQueryParameters();
-    var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
-    if (terms.length) {
-      var body = $('div.body');
-      window.setTimeout(function() {
-        $.each(terms, function() {
-          body.highlightText(this.toLowerCase(), 'highlighted');
-        });
-      }, 10);
-      $('<li class="highlight-link"><a href="javascript:Documentation.' +
-        'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>')
-          .appendTo($('.sidebar .this-page-menu'));
-    }
-  },
-
-  /**
-   * init the domain index toggle buttons
-   */
-  initIndexTable : function() {
-    var togglers = $('img.toggler').click(function() {
-      var src = $(this).attr('src');
-      var idnum = $(this).attr('id').substr(7);
-      $('tr.cg-' + idnum).toggle();
-      if (src.substr(-9) == 'minus.png')
-        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
-      else
-        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
-    }).css('display', '');
-    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
-        togglers.click();
-    }
-  },
-
-  /**
-   * helper function to hide the search marks again
-   */
-  hideSearchWords : function() {
-    $('.sidebar .this-page-menu li.highlight-link').fadeOut(300);
-    $('span.highlighted').removeClass('highlighted');
-  },
-
-  /**
-   * make the url absolute
-   */
-  makeURL : function(relativeURL) {
-    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
-  },
-
-  /**
-   * get the current relative url
-   */
-  getCurrentURL : function() {
-    var path = document.location.pathname;
-    var parts = path.split(/\//);
-    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
-      if (this == '..')
-        parts.pop();
-    });
-    var url = parts.join('/');
-    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
-  }
-};
-
-// quick alias for translations
-_ = Documentation.gettext;
-
-$(document).ready(function() {
-  Documentation.init();
-});

BIN
doc/tutorial/html/html/_static/down-pressed.png


+ 0 - 0
doc/tutorial/html/html/_static/down.png


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio