diff --git a/build/doctrees/environment.pickle b/build/doctrees/environment.pickle
index d30fa6c..43b8398 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 c2e94fa..f1f9ddb 100644
--- a/build/doctrees/nbsphinx/notebooks/L1/1_ray_optics.ipynb
+++ b/build/doctrees/nbsphinx/notebooks/L1/1_ray_optics.ipynb
@@ -130,7 +130,7 @@
},
{
"cell_type": "code",
- "execution_count": 102,
+ "execution_count": 105,
"id": "fbf42d2d-ba72-4d79-b251-bf343a9c054c",
"metadata": {
"tags": []
@@ -196,6 +196,18 @@
"metadata": {},
"output_type": "display_data"
},
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/html": [
@@ -220,7 +232,7 @@
},
{
"cell_type": "code",
- "execution_count": 103,
+ "execution_count": 106,
"id": "a7043a8d-8a5a-4b0a-9ec3-3c61e77665b1",
"metadata": {
"tags": []
@@ -312,13 +324,11 @@
},
{
"data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "81c9708e657a43299356d6d746905d25",
- "version_major": 2,
- "version_minor": 0
- },
+ "text/html": [
+ ""
+ ],
"text/plain": [
- "interactive(children=(FloatSlider(value=50.0, continuous_update=False, description='Radius:', min=10.0, step=1…"
+ ""
]
},
"metadata": {},
@@ -328,75 +338,57 @@
"data": {
"text/html": [
"\n",
- "\n",
+ "\n",
"\n",
"\n"
],
"text/plain": [
""
]
},
+ "execution_count": 106,
"metadata": {},
- "output_type": "display_data"
+ "output_type": "execute_result"
}
],
"source": [
- "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",
+ "from IPython.display import HTML\n",
+ "\n",
+ "HTML(\"\"\"\n",
+ "\n",
"\n",
"\n",
- "\"\"\"\n",
+ " .attr(\"r\", 20)\n",
+ " .style(\"fill\", \"steelblue\");\n",
"\n",
- "# Display the initial D3.js circle\n",
- "display(HTML(html_code))"
+ " circle.transition()\n",
+ " .duration(2000)\n",
+ " .attr(\"cx\", 380)\n",
+ " .on(\"end\", function() { d3.select(this).style(\"fill\", \"tomato\"); });\n",
+ "\n",
+ "\"\"\")\n"
]
},
{
diff --git a/build/doctrees/notebooks/L1/1_ray_optics.doctree b/build/doctrees/notebooks/L1/1_ray_optics.doctree
index 45c6383..0cb6833 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 68ee434..51213c7 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 c2e94fa..f1f9ddb 100644
--- a/build/html/_sources/notebooks/L1/1_ray_optics.ipynb.txt
+++ b/build/html/_sources/notebooks/L1/1_ray_optics.ipynb.txt
@@ -130,7 +130,7 @@
},
{
"cell_type": "code",
- "execution_count": 102,
+ "execution_count": 105,
"id": "fbf42d2d-ba72-4d79-b251-bf343a9c054c",
"metadata": {
"tags": []
@@ -196,6 +196,18 @@
"metadata": {},
"output_type": "display_data"
},
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
{
"data": {
"text/html": [
@@ -220,7 +232,7 @@
},
{
"cell_type": "code",
- "execution_count": 103,
+ "execution_count": 106,
"id": "a7043a8d-8a5a-4b0a-9ec3-3c61e77665b1",
"metadata": {
"tags": []
@@ -312,13 +324,11 @@
},
{
"data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "81c9708e657a43299356d6d746905d25",
- "version_major": 2,
- "version_minor": 0
- },
+ "text/html": [
+ ""
+ ],
"text/plain": [
- "interactive(children=(FloatSlider(value=50.0, continuous_update=False, description='Radius:', min=10.0, step=1…"
+ ""
]
},
"metadata": {},
@@ -328,75 +338,57 @@
"data": {
"text/html": [
"\n",
- "\n",
+ "\n",
"\n",
"\n"
],
"text/plain": [
""
]
},
+ "execution_count": 106,
"metadata": {},
- "output_type": "display_data"
+ "output_type": "execute_result"
}
],
"source": [
- "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",
+ "from IPython.display import HTML\n",
+ "\n",
+ "HTML(\"\"\"\n",
+ "\n",
"\n",
"\n",
- "\"\"\"\n",
+ " .attr(\"r\", 20)\n",
+ " .style(\"fill\", \"steelblue\");\n",
"\n",
- "# Display the initial D3.js circle\n",
- "display(HTML(html_code))"
+ " circle.transition()\n",
+ " .duration(2000)\n",
+ " .attr(\"cx\", 380)\n",
+ " .on(\"end\", function() { d3.select(this).style(\"fill\", \"tomato\"); });\n",
+ "\n",
+ "\"\"\")\n"
]
},
{
diff --git a/build/html/notebooks/L1/1_ray_optics.html b/build/html/notebooks/L1/1_ray_optics.html
index 6740b77..5eb23cb 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