diff --git a/build/doctrees/environment.pickle b/build/doctrees/environment.pickle
index 69cd059..d30fa6c 100644
Binary files a/build/doctrees/environment.pickle and b/build/doctrees/environment.pickle differ
diff --git a/build/doctrees/nbsphinx/notebooks/L1/1_ray_optics.ipynb b/build/doctrees/nbsphinx/notebooks/L1/1_ray_optics.ipynb
index ec85e02..c2e94fa 100644
--- a/build/doctrees/nbsphinx/notebooks/L1/1_ray_optics.ipynb
+++ b/build/doctrees/nbsphinx/notebooks/L1/1_ray_optics.ipynb
@@ -130,12 +130,48 @@
},
{
"cell_type": "code",
- "execution_count": 89,
+ "execution_count": 102,
"id": "fbf42d2d-ba72-4d79-b251-bf343a9c054c",
"metadata": {
"tags": []
},
"outputs": [
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/html": [
@@ -184,7 +220,7 @@
},
{
"cell_type": "code",
- "execution_count": 92,
+ "execution_count": 103,
"id": "a7043a8d-8a5a-4b0a-9ec3-3c61e77665b1",
"metadata": {
"tags": []
@@ -241,33 +277,70 @@
{
"data": {
"text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "81c9708e657a43299356d6d746905d25",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "interactive(children=(FloatSlider(value=50.0, continuous_update=False, description='Radius:', min=10.0, step=1…"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
"\n",
+ "\n",
"\n"
],
"text/plain": [
@@ -279,35 +352,51 @@
}
],
"source": [
- "%%html\n",
+ "from ipywidgets import interact, FloatSlider\n",
+ "from IPython.display import display, HTML, Javascript\n",
+ "\n",
+ "# Define the function to update the circle radius\n",
+ "def update_circle_radius(radius):\n",
+ " display(Javascript(f\"\"\"\n",
+ " (function() {{\n",
+ " var circle = d3.select(\"#d3-circle\");\n",
+ " if(circle) circle.attr(\"r\", {radius});\n",
+ " }})();\n",
+ " \"\"\"))\n",
+ "\n",
+ "# Create the slider widget\n",
+ "slider = FloatSlider(\n",
+ " value=50,\n",
+ " min=10,\n",
+ " max=100,\n",
+ " step=1,\n",
+ " description='Radius:',\n",
+ " continuous_update=False\n",
+ ")\n",
+ "\n",
+ "# Display the slider and pass the update function as the callback\n",
+ "interact(update_circle_radius, radius=slider)\n",
+ "\n",
+ "# Define the HTML and JavaScript code for the initial D3.js circle\n",
+ "html_code = \"\"\"\n",
"\n",
+ "\n",
""
+ "\n",
+ "\"\"\"\n",
+ "\n",
+ "# Display the initial D3.js circle\n",
+ "display(HTML(html_code))"
]
},
{
diff --git a/build/doctrees/notebooks/L1/1_ray_optics.doctree b/build/doctrees/notebooks/L1/1_ray_optics.doctree
index 5b29daf..45c6383 100644
Binary files a/build/doctrees/notebooks/L1/1_ray_optics.doctree and b/build/doctrees/notebooks/L1/1_ray_optics.doctree differ
diff --git a/build/doctrees/notebooks/L1/Lecture1.doctree b/build/doctrees/notebooks/L1/Lecture1.doctree
index 319f1fc..68ee434 100644
Binary files a/build/doctrees/notebooks/L1/Lecture1.doctree and b/build/doctrees/notebooks/L1/Lecture1.doctree differ
diff --git a/build/html/_sources/notebooks/L1/1_ray_optics.ipynb.txt b/build/html/_sources/notebooks/L1/1_ray_optics.ipynb.txt
index ec85e02..c2e94fa 100644
--- a/build/html/_sources/notebooks/L1/1_ray_optics.ipynb.txt
+++ b/build/html/_sources/notebooks/L1/1_ray_optics.ipynb.txt
@@ -130,12 +130,48 @@
},
{
"cell_type": "code",
- "execution_count": 89,
+ "execution_count": 102,
"id": "fbf42d2d-ba72-4d79-b251-bf343a9c054c",
"metadata": {
"tags": []
},
"outputs": [
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/html": [
@@ -184,7 +220,7 @@
},
{
"cell_type": "code",
- "execution_count": 92,
+ "execution_count": 103,
"id": "a7043a8d-8a5a-4b0a-9ec3-3c61e77665b1",
"metadata": {
"tags": []
@@ -241,33 +277,70 @@
{
"data": {
"text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "81c9708e657a43299356d6d746905d25",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "interactive(children=(FloatSlider(value=50.0, continuous_update=False, description='Radius:', min=10.0, step=1…"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
"\n",
+ "\n",
"\n"
],
"text/plain": [
@@ -279,35 +352,51 @@
}
],
"source": [
- "%%html\n",
+ "from ipywidgets import interact, FloatSlider\n",
+ "from IPython.display import display, HTML, Javascript\n",
+ "\n",
+ "# Define the function to update the circle radius\n",
+ "def update_circle_radius(radius):\n",
+ " display(Javascript(f\"\"\"\n",
+ " (function() {{\n",
+ " var circle = d3.select(\"#d3-circle\");\n",
+ " if(circle) circle.attr(\"r\", {radius});\n",
+ " }})();\n",
+ " \"\"\"))\n",
+ "\n",
+ "# Create the slider widget\n",
+ "slider = FloatSlider(\n",
+ " value=50,\n",
+ " min=10,\n",
+ " max=100,\n",
+ " step=1,\n",
+ " description='Radius:',\n",
+ " continuous_update=False\n",
+ ")\n",
+ "\n",
+ "# Display the slider and pass the update function as the callback\n",
+ "interact(update_circle_radius, radius=slider)\n",
+ "\n",
+ "# Define the HTML and JavaScript code for the initial D3.js circle\n",
+ "html_code = \"\"\"\n",
"\n",
+ "\n",
""
+ "\n",
+ "\"\"\"\n",
+ "\n",
+ "# Display the initial D3.js circle\n",
+ "display(HTML(html_code))"
]
},
{
diff --git a/build/html/notebooks/L1/1_ray_optics.html b/build/html/notebooks/L1/1_ray_optics.html
index 90e783d..6740b77 100644
--- a/build/html/notebooks/L1/1_ray_optics.html
+++ b/build/html/notebooks/L1/1_ray_optics.html
@@ -217,7 +217,7 @@ Ray Optics