|
|
@@ -16,17 +16,35 @@
|
|
|
"outputs": [
|
|
|
{
|
|
|
"data": {
|
|
|
- "application/vnd.jupyter.widget-view+json": {
|
|
|
- "model_id": "e995955f250e4a19b807f8758599660c",
|
|
|
- "version_major": 2,
|
|
|
- "version_minor": 0
|
|
|
- },
|
|
|
"text/plain": [
|
|
|
- "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
|
|
|
+ "{\n",
|
|
|
+ "'body': {\n",
|
|
|
+ " 'arc': \"181 (x,y) coords fillcolor='b' fillpattern=''\",},\n",
|
|
|
+ "'rod': {\n",
|
|
|
+ " 'line': \"2 (x,y) coords\",},\n",
|
|
|
+ "'vertical': {\n",
|
|
|
+ " 'line': \"2 (x,y) coords linecolor='k' linewidth=1 linestyle='dashed'\",},\n",
|
|
|
+ "'theta': {\n",
|
|
|
+ " 'arc': {\n",
|
|
|
+ " 'arc': \"181 (x,y) coords\",},\n",
|
|
|
+ " 'text': \"Text at (1.49593,4.58745)\",},\n",
|
|
|
+ "'path': {\n",
|
|
|
+ " 'arc': \"181 (x,y) coords linecolor='k' linewidth=1 linestyle='dashed'\",},\n",
|
|
|
+ "'g': {\n",
|
|
|
+ " 'arrow': {\n",
|
|
|
+ " 'line': \"2 (x,y) coords linecolor='k' arrow='->'\",},\n",
|
|
|
+ " 'text': \"Text at (5,4.11333)\",},\n",
|
|
|
+ "'L': {\n",
|
|
|
+ " 'arrow': {\n",
|
|
|
+ " 'arrow': {\n",
|
|
|
+ " 'line': \"2 (x,y) coords linecolor='k' linewidth=1 arrow='<->'\",},},\n",
|
|
|
+ " 'text': \"Text at (2.93892,4.31343)\",},\n",
|
|
|
+ "'m': \"Text at (4.53533,1.73676)\",}"
|
|
|
]
|
|
|
},
|
|
|
+ "execution_count": 2,
|
|
|
"metadata": {},
|
|
|
- "output_type": "display_data"
|
|
|
+ "output_type": "execute_result"
|
|
|
}
|
|
|
],
|
|
|
"source": [
|
|
|
@@ -80,8 +98,7 @@
|
|
|
" 'vertical': vertical, 'theta': angle, 'path': path,\n",
|
|
|
" 'g': gravity, 'L': length, 'm': mass_symbol})\n",
|
|
|
"\n",
|
|
|
- "fig.draw()\n",
|
|
|
- "drawing_tool.display()"
|
|
|
+ "fig.draw()"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
@@ -90,11 +107,57 @@
|
|
|
"metadata": {},
|
|
|
"outputs": [
|
|
|
{
|
|
|
- "name": "stdin",
|
|
|
- "output_type": "stream",
|
|
|
- "text": [
|
|
|
- "Press Return to make free body diagram: \n"
|
|
|
- ]
|
|
|
+ "data": {
|
|
|
+ "application/vnd.jupyter.widget-view+json": {
|
|
|
+ "model_id": "18d9de304de444c197579e4b6bd668be",
|
|
|
+ "version_major": 2,
|
|
|
+ "version_minor": 0
|
|
|
+ },
|
|
|
+ "text/plain": [
|
|
|
+ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "metadata": {},
|
|
|
+ "output_type": "display_data"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "drawing_tool.mpl.gcf().canvas"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 4,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "data": {
|
|
|
+ "text/plain": [
|
|
|
+ "{\n",
|
|
|
+ "'mg': {\n",
|
|
|
+ " 'arrow': {\n",
|
|
|
+ " 'line': \"2 (x,y) coords arrow='->'\",},\n",
|
|
|
+ " 'text': \"Text at (4.21394,0.949778)\",},\n",
|
|
|
+ "'S': {\n",
|
|
|
+ " 'arrow': {\n",
|
|
|
+ " 'line': \"2 (x,y) coords arrow='->'\",},\n",
|
|
|
+ " 'text': \"Text at (3.32263,3.45652)\",},\n",
|
|
|
+ "'rod': {\n",
|
|
|
+ " 'line': \"2 (x,y) coords linecolor='k' linewidth=1 linestyle='dashed'\",},\n",
|
|
|
+ "'vertical': {\n",
|
|
|
+ " 'line': \"2 (x,y) coords linecolor='k' linewidth=1 linestyle='dashed'\",},\n",
|
|
|
+ "'theta': {\n",
|
|
|
+ " 'arc': {\n",
|
|
|
+ " 'arc': \"181 (x,y) coords\",},\n",
|
|
|
+ " 'text': \"Text at (1.35342,4.97898)\",},\n",
|
|
|
+ "'body': {\n",
|
|
|
+ " 'arc': \"181 (x,y) coords fillcolor='b' fillpattern=''\",},\n",
|
|
|
+ "'m': \"Text at (4.53533,1.73676)\",}"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "execution_count": 4,
|
|
|
+ "metadata": {},
|
|
|
+ "output_type": "execute_result"
|
|
|
}
|
|
|
],
|
|
|
"source": [
|
|
|
@@ -128,13 +191,36 @@
|
|
|
" 'vertical': vertical2, 'theta': angle2,\n",
|
|
|
" 'body': mass, 'm': mass_symbol})\n",
|
|
|
"\n",
|
|
|
- "body_diagram.draw()\n",
|
|
|
- "drawing_tool.display('Free body diagram')"
|
|
|
+ "body_diagram.draw()"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 4,
|
|
|
+ "execution_count": 5,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "data": {
|
|
|
+ "application/vnd.jupyter.widget-view+json": {
|
|
|
+ "model_id": "18d9de304de444c197579e4b6bd668be",
|
|
|
+ "version_major": 2,
|
|
|
+ "version_minor": 0
|
|
|
+ },
|
|
|
+ "text/plain": [
|
|
|
+ "Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "metadata": {},
|
|
|
+ "output_type": "display_data"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "drawing_tool.mpl.gcf().canvas"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 6,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
@@ -144,7 +230,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 5,
|
|
|
+ "execution_count": 7,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
@@ -156,7 +242,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 6,
|
|
|
+ "execution_count": 8,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|