290 lines
128 KiB
Plaintext
290 lines
128 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Description\n",
|
||
|
"\n",
|
||
|
"This notebook intends to gather all the functionalities you'll have to implement for assignment 2.2.\n",
|
||
|
"\n",
|
||
|
"# Load libraries"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 13,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import numpy as np\n",
|
||
|
"import igl\n",
|
||
|
"import meshplot as mp\n",
|
||
|
"import time\n",
|
||
|
"\n",
|
||
|
"import sys as _sys\n",
|
||
|
"_sys.path.append(\"../src\")\n",
|
||
|
"from elasticsolid import *\n",
|
||
|
"from elasticenergy import *\n",
|
||
|
"from matplotlib import gridspec\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"\n",
|
||
|
"shadingOptions = {\n",
|
||
|
" \"flat\":True,\n",
|
||
|
" \"wireframe\":False, \n",
|
||
|
"}\n",
|
||
|
"\n",
|
||
|
"rot = np.array(\n",
|
||
|
" [[1, 0, 0 ],\n",
|
||
|
" [0, 0, 1],\n",
|
||
|
" [0, -1, 0 ]]\n",
|
||
|
")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Load mesh\n",
|
||
|
"\n",
|
||
|
"Several meshes are available for you to play with under `data/`: `ball.obj`, `dinosaur.obj`, and `beam.obj`. You can also uncomment the few commented lines below to manipulate a simple mesh made out of 2 tetrahedra."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 14,
|
||
|
"metadata": {
|
||
|
"scrolled": false
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"v, _, _, t, _, _ = igl.read_obj(\"../data/beam.obj\")\n",
|
||
|
"aabb = np.max(v, axis=0) - np.min(v, axis=0)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Linear/Non-Linear Elastic Solid\n",
|
||
|
"\n",
|
||
|
"## Instantiation\n",
|
||
|
"\n",
|
||
|
"We first specify the elasticity model to use for the elastic solid, as well as pinned vertices, and volumetric forces."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 15,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"rho = 131 # [kg.m-3]\n",
|
||
|
"young = 10e6 # [Pa] \n",
|
||
|
"poisson = 0.2\n",
|
||
|
"force_mass = np.zeros(shape = (3,))\n",
|
||
|
"force_mass[2] = - rho * 9.81\n",
|
||
|
"\n",
|
||
|
"minX = np.min(v[:, 0])\n",
|
||
|
"pin_idx = np.arange(v.shape[0])[v[:, 0] < minX + 0.2*aabb[0]]\n",
|
||
|
"\n",
|
||
|
"ee = LinearElasticEnergy(young, poisson)\n",
|
||
|
"neo_ee = NeoHookeanElasticEnergy(young, poisson)\n",
|
||
|
"solid = ElasticSolid(v, t, ee, rho=rho, pin_idx=pin_idx, f_mass=force_mass)\n",
|
||
|
"neo_solid = ElasticSolid(v, t, neo_ee, rho=rho, pin_idx=pin_idx, f_mass=force_mass)\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Validate Elastic Energy Gradient (Elastic Forces) using Finite Differences on Elastic Energy"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 16,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD8CAYAAACRkhiPAAAAOXRFWHRTb2Z0d2FyZQBNY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SfPGth3touOAQ8fNPYk7ZqKoqQnqgQAEbGayA2P0t4/QnGOiwx76v7XlOdlRlQNt/aNcMvfv8bR5r7QtuAoyjuutFpRn2yNrQS8Y35GffG/1R9rsWIMb9R3zGjdiqIsPuZVCYjIChF5UkQeFJFvzudagk3k2vo8KQsKB6nMz2TQ66N/xGpV8eKRVo429/HA62dCx+w7102GTbjt0mVk2CRmcPi1k+186L6X+W///n5c9+4Z8obSU9+s70xMEEVR0p5EJos9KCJtInJowvabReS4iNTH8WBfDzxjjPkKsHm2a0kGBdlOeodGae0fSVlQOMjEuQJvnrLeyJ8+cIG+gGLYf66bi5blkZfpYHVJDicmWAI+v+F7L57gtx58hyGvj2cONMflMgpaARsr3LzX0M2QVwPEirKUScQSeAi4OXyDiNiBHwK3YD3U7xCRzSKyVUSenvCvDHgPuF1EXgF+lcBaEqYgy+ofNBeWQEVY1bDfb3jzVCcXLctjZNTPE+9fwDvm54OGHrattPoTrS93c7It0hK45+F3+YeXT/Lpy6p44b9fjzPDFmFJxOJ4QAncde1qRn0m6mxkRVGWDrOuEzDG7BaRVRM27wDqjTGnAUTkUeA2Y8x9wK0TryEi3wC+HbjW48BPohxzN3A3QHl5OXV1dbNdMgMDAzHPH+nzcKHLR/eIYbirNaH7TEfbkOW/r3v7fU4
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEBCAYAAAB7Wx7VAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAABAOklEQVR4nO3dd3yb1b348c+RLFneeySOEzt7hyQmYeO0UKBl3FJoWf21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Z8jeReJO2/wkE2fOzeLR9ysoO1BHSVEGidY4ZmQk0O1w0dTZC0BjZy/tPU6uWD0DkDy+EFOF1ppb/r6Lw3Ud/PGqlUxLS4h2k8adIQN+pFy3dhbVrXYO1nZwzvwcAGZkJAJ9SzN96ZySWZnMyUli8zHJ4wsxFfztveM8vbOa73xsAWfNy452cyZETAf88xbnkZsSD8DZ3jd0RobnU9wX8I95A35RdhJrirPYWt6Myy3r8YWIZdsrmvn5s3v56MJcbjp3TrSbM2FiOuBbzCZuKp3DKYXpLMpPBfoCfqV3pU55Yydmk2JGRgJrizNp73Gy72Rb1NoshBhfjR09fO2R7eSn2fjdp0/BZIqtm6tGEtMBH+ALZxbzz6+d6X9TU2wW0hMt/qWZ5Q1dFGYkYDGbWFPsqZmxWW7AEiImudyab67fQWNnL/dcu5q0xNi7uWokMR/wA5mRkTAgpVPk3cFmenoChZkJvC95fCFi0v+8epC3DzfwX5ctZWnB1Cu/PmEBXylVqpR6Syl1r1KqdKJeN5AZ6X1LM8sbOynK6tuybE1RFpuPNY1aV+dvm8qHlGgQQhjXa/tqufP1w1x1aiGfPrU
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"fd_validation_elastic(solid)\n",
|
||
|
"fd_validation_elastic(neo_solid)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Validate External Energy Gradient (External Forces) using Finite Differences on External Energy"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 17,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD8CAYAAACRkhi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eBd6xZMKgBgrfxZUV0UyQsYYzjUMRiTFA5TV5ZHW68mhhVFyQzSLQJtQEPU63og5Qb96egdBNbqILBWCI1vHhfN6tqxZO6tFy6c0tibGst47XA3/7WrnTODowx4/JHlodHUl+bR1qs5AUVRMoN0h4O2AStEZAnQDtyOlfTNCMKeQP+Ib0LLiGiWVxditwkLS11saCid0thfuG4Vhzrc/M0ju7hmtZXzjucJ1JflcXrAgy8QJNc+r8o0FEXJQJJ+ConIw8BmYJWItInIncYYP/BZ4GlgH/CoMWZPqpNMWzgoxxKBMU8gN+55rlw7t1/cwGevWo7I5KGgMGUFDh76xCV8YGM9z++3qoKX18QPBwUNnO73JGmFoihK+khlddAdCY4/BTyV9IziICK3ALcsX748pXHCz/yBET+9w17WhArD4nH3e9ZNe3xnjp2vv389qxcUs+/UAFWFzgnn1JdZ9QFtvSM0lGutgKIos0u6w0EzgjHmCeCJTZs2fTKVcaI9gb5hX8xeAulCRLjz8iUJ368rtWoFrLxARdrvryiKMh3mVVA6khMY9k3YUOZcsaDUhQi09+kKIUVRZp+sEIF0rQ7KyyHyAA6aiX2DzgXOHDvVRU5dJqooSkaQFSKQrsSwTYRCZw7Hu609gROtDppp6svyaVcRUBQlA8gKEUiXJwDWXsPHe6x1+olWB800daV5tKWxf1AgaAgEJ29Pfbx7iC0t3Wm7p6Ioc4OsEIF0eQJg7TXcFmrlPHueQB6n+jxnfXB
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD8CAYAAACRkhiPAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEA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znu/eDeeryRogzHqOtD0TvgorHTM1Kppauf1CFzFZRSKpBIB4EdQKmILACqgVuB28O9qTHmBeCFtWvX3hXuvSbix5+9gK3Hmqhq6aayuYeLFqT5P2AznXaK0hPYeaqFyuZuCtMSAt4jNzl+2Lf81w+ewRj4248uAqA4w8G8pDi2HWvis+sKJ1TOoUHmRFOXBgGl1DlNOAiIyFNAGZAhIlV4EryPi8jXgFcBK/CEMWZ/uIWczpYAQEmWk5IsZ9DnLyhMZfPhBrr7XaxfmBHwnNyUeN453uR//E5FE0vmOUlPtAOe5SXWl6Tz5qF63G4TsDVxLkO7m040dPlbKUopFcyEcwLGmNuMMTnGmFhjTL4x5nHv8ZeNMYuMMQuNMQ9EopDTmRMIxdrCNJq6+ukZcI2aKOaTmxJHR98g7b0D9A262HmyhUsWpg8759KFGbR0D3Cwrn1C5RjaEjjpXchOKaXGEhXjCKdjP4HxWFN49ht3QdAgcHauwAenW+kbdHNJ8YggUOJpRWw71jTq+lBUt/RgEc8KqBWNGgSUUucWFUFgprcESrMSccZ5etaK0gMndYcGgXeONyEC6xYMDwLzkuMoznSw9XjjhMpR1drDvKQ4SrISOalBQCkVgqgIAjO9JWCxCBcUpPq/hQfiO17d2ss
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"fd_validation_ext(solid)\n",
|
||
|
"fd_validation_ext(neo_solid)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Validate Elastic Energy Force Differentials (Elastic Forces) using Finite Differences on Elastic Forces"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 18,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAD8CAYAAACRkhiPAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAotklEQVR4nO3dd3xV9f3H8dfnZpPFCAkjQECGRKYgUXAERMG6R1UcratW66jWbR211h+21WodddVRF1TROhA3BhRwsPcIO+yVQBZZ398fiWEGss/Nve/n45HH457vuffm/TGYT77nnPs95pxDRESCk8/rACIi4h01ARGRIKYmICISxNQERESCmJqAiEgQUxMQEQlioV4HqImEhASXkpLidYxDysvLIzo62usY9SJQagmUOkC1+KOmUMeMGTO2OudaH2xfk2oCKSkpTJ8+3esYh5SRkUF6errXMepFoNQSKHWAavFHTaEOM1td1T4dDhIRCWJqAiIiQUxNQEQkiKkJiIgEMTUBEZEgpiYgIhLEgqIJbM8r4rP5G8gpKPY6ioiIXwmKJrBw/U6ue3MmC9bneB1FRMSvBEUT6Ny6/NN8K7bkeZxERMS/BEUTaBsXSWSYT01ARGQ/QdEEfD6jc0IMs9fu8DqKiIhfCYomANCzTSwz12Rz57g5rNiS63UcERG/EDRN4KGzj6JNXCTvTM9i2OOTKCwu9TqSiIjngqYJxEaG8Y8L+1ZuP/tNJo9/sYQnvlzqYSoREW81qaWk62pw1wRWPXo61785g6cnZlaOp/doTfekWKIjguo/h4hI8MwE9vbERf1I69yycvvcf00l7f++JnOzzhWISHAJyiYQGRbCf64axNhrj60cy91dwguTlnuYSkSk8QVlE4DyRnBsl1bcNKwrEaE+LknryAez17ExpxCAV75bScrdn+gEsogENE8PgpvZCcClFTlSnXODGzvDbaf24Nbh3VmXXcC709dy7OivSYgJZ2tuEQBZO/Lpmhjb2LFERBpFrWcCZvaKmW02s/n7jY80syVmlmlmdx/qPZxz3zrnrgPGA/+pbZa68vmMDi2b8dgvy68e+rkBAGTtKPAqlohIg6v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nQRBUVaklpEqqaZQIDpnhTL7pIy+v75CwCOSIjhwmM6eJxKRPyVpzMBM0s1s3fM7Dkzu8DLLIGi6173MAbIKyrxKImINAW1bgJm9oqZbTaz+fuNjzSzJWaWaWZ3H+ZtTgOeds5dD/yqtllkj55t4uiauKcRPPTxQq75z3TyK5rB8i25rN6W51U8EfEzdTkc9BrwDPD6zwNmFgI8C5wCZAE/mdlHQAgwer/XXwW8ATxoZmcBreqQRSpEhYfw1R9OYtXWPNIfywDgq0WbSH3gc/omxzMnKweAVY+e7mFKEfEX5lztlxswsxRgvHOuV8X2ccCfnHMjKrbvAXDO7d8A9n+fEOB959zZB9l3LXAtQFJS0oCxY8fWOm9jyM3NJSYm5vBPbAS3ZeSzrdBxfd8Inpuze599r4xohs/skK/3p1rqIlDqANXij5pCHUOHDp3hnBt4sH31fWK4PbB2r+0sIK2K5/7cRO4FooG/H+w5zrkXgRcBBg4c6NLT0+spasPIyMjAXzJ+enQhu3aXcETrGM4/OZc7x81h5ppsALr0HkRKQvQhX+9PtdRFoNQBqsUfNfU66rsJHOxPyyqnGs65VVT8lS/1LzEuksSKx10TY3jv+sFMWrqFK179iTlZ2YSF+mgdE0F4qK4UFglW9d0EsoC9r0dMBtbX8/eQWjIzTujWmvioMH4/djYAQ3u05tUrB3kbTEQ8U99/Av4EdDOzzmYWDlwMfFTP30PqIMRnHL/XaqPfLNnC/01YxA8rtnmYSkS8UpdLRMcA04AeZpZlZlc750qAG4HPgUXAO865BfUTVerLbad2586RPbhlePk
|
||
|
"text/plain": [
|
||
|
"<Figure size 432x288 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"name": "stderr",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"/opt/notebooks/assignment_2_3/notebook/../src/elasticenergy.py:145: RuntimeWarning: invalid value encountered in log\n",
|
||
|
" self.logJ = np.log(np.linalg.det(jac))\n",
|
||
|
"/opt/notebooks/assignment_2_3/notebook/../src/elasticenergy.py:131: RuntimeWarning: invalid value encountered in log\n",
|
||
|
" j = np.log(np.linalg.det(jac))\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAnvklEQVR4nO3deXhU1cHH8e/JTgIkhEBYEkxYZQfJIiiKFSuKu7igsiNqa9XWvn21tWrf1mrd61IVZJFFEBULKgU3okAxJGFHCIQ9YQkJWwJkP+8fIEVKQkhmcmcmv8/z+DzOdXLnN4fw88yde8811lpERMT3+TkdQERE6oYKX0SknlDhi4jUEyp8EZF6QoUvIlJPqPBFROqJAKcDVCUqKsrGxcU5HcMljh49SlhYmNMxPJLGpnIam6ppfM4uIyMjz1rb7MztHl34cXFxpKenOx3DJVJSUhgwYIDTMTySxqZyGpuqaXzOzhiz42zbdUhHRKSeUOGLiNQTKnwRkXpChS8iUk+o8EVE6gkVvohIPaHCFxHxIPmFxXyxfi+HjpW4fN8qfBERD7Im5zDjpmWwZf9Rl+9bhS8i4kHyC0/M7KMaBrl83yp8EREPkldYDEBUw2CX71uFLyLiQfILiwkJ9CM0yN/l+1bhi4h4kLzCEpqGBWOMcfm+VfgiIh4kr7CYqEauP5wDKnwREY+SX1hCVJjrv7AFFb6IiEfJKyx2yxe2oMIXEfEYFRWWA0dLaOqGUzJBhS8i4jEOHy+lrMLSVDN8ERHftvPAMQBahYe4Zf8qfBERD7Em+xAA3WPC3bJ/Fb6IiIdYnX2YpmFBtI5o4Jb9q/BFRDzE6l2H6Bkb4ZaLrkCFLyLiEfYXFJO1v5DesRFuew0VvoiIB1iwfi/Wws+7tnDba6jw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
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"%run ../src/Utils.py\n",
|
||
|
"\n",
|
||
|
"v_def = v.copy()\n",
|
||
|
"v_def[:, 0] *= 2.\n",
|
||
|
"solid.update_def_shape(v_def)\n",
|
||
|
"neo_solid.update_def_shape(v_def)\n",
|
||
|
"\n",
|
||
|
"fd_validation_elastic_differentials(solid)\n",
|
||
|
"fd_validation_elastic_differentials(neo_solid)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 3 (ipykernel)",
|
||
|
"language": "python",
|
||
|
"name": "python3"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 3
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython3",
|
||
|
"version": "3.9.7"
|
||
|
},
|
||
|
"toc": {
|
||
|
"base_numbering": 1,
|
||
|
"nav_menu": {},
|
||
|
"number_sections": true,
|
||
|
"sideBar": true,
|
||
|
"skip_h1_title": false,
|
||
|
"title_cell": "Table of Contents",
|
||
|
"title_sidebar": "Contents",
|
||
|
"toc_cell": false,
|
||
|
"toc_position": {},
|
||
|
"toc_section_display": true,
|
||
|
"toc_window_display": false
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 4
|
||
|
}
|