Kaynağa Gözat

updated documentation

Gilbert Brault 5 yıl önce
ebeveyn
işleme
d6e6c4a1a9
2 değiştirilmiş dosya ile 33 ekleme ve 3 silme
  1. 10 2
      jupysketch-doc/docs/index.md
  2. 23 1
      notebooks/DryFriction.ipynb

+ 10 - 2
jupysketch-doc/docs/index.md

@@ -2,7 +2,7 @@
 
 ## Problem solved
 
-When you need to solve a mechanical problem, sooner or later you are going to sketch a figure to capture the parameters and variables of the problem.
+When you need to solve a mechanical problem, sooner or later you are going to sketch a figure to capture problem's parameters and variables.
 
 The better documented, the easier the problem is to resolve for the designer, and the easier it is for others to understand how it is actually solved.
 
@@ -12,7 +12,7 @@ This is what jupytersketcher (name of pysketcher module) is proposing to solve.
 
 Of course, this makes even more sense when using Jupyter notebooks, because as a sketch not only the image of the solved problem can be displayed, but the dictionary of all variables processed in the notebook for solving physics is used to draw the image and at the same time to solve the equations of motion.
 
-jupytersketcher is another small step towards reusable science.
+jupytersketcher is another small step to help building reusable science.
 
 ## Getting Started
 
@@ -20,3 +20,11 @@ You can use the binder link in jupytersketcher Github to see some experiments wi
 [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/gbrault/jupytersketcher.git/master?filepath=notebooks%2FDryFriction.ipynb)
 
 ## pysketcher features
+
+* Drawing sketches on a matplotlib widget for Jupyter Notebook server or Lab
+* Defining a yaml based "grammar" to define sketches
+* Animating sketches within the notebook
+
+## Main benefit
+
+With Pysketcher for Jupyter mechanical notebooks, you get a single copy of the description of the problem and a space to simulate and show the user how the system behaves

+ 23 - 1
notebooks/DryFriction.ipynb

@@ -289,7 +289,7 @@
     {
      "data": {
       "application/vnd.jupyter.widget-view+json": {
-       "model_id": "7353158e16224023a1a98fc5f4fd2830",
+       "model_id": "b6c156cd73a94a479f9a140bf3008ff0",
        "version_major": 2,
        "version_minor": 0
       },
@@ -339,6 +339,28 @@
     "Use left and right rotation button to rotate the sketch"
    ]
   },
+  {
+   "cell_type": "code",
+   "execution_count": 20,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "{'arc': {\n",
+       " 'arc': \"181 (x,y) coords linewidth=1\",},\n",
+       " 'text': 'text \"$\\\\theta$\" at (7.86863,0.987317)'}"
+      ]
+     },
+     "execution_count": 20,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "myfig['angle'].shapes"
+   ]
+  },
   {
    "cell_type": "markdown",
    "metadata": {},