diff --git a/src/build.js b/src/build.js index f1b84fa..ef07030 100644 --- a/src/build.js +++ b/src/build.js @@ -9,6 +9,7 @@ "../../node_modules/reveal.js/plugin/math/math.js": "build/js/", "../../src/static/css/style.css": "build/css/", "../../src/static/video/oscillator.mp4": "build/video", + "../../src/static/video/oscillator_simple.mp4": "build/video", "../../src/static/video/travelling.mp4": "build/video", "../../src/static/video/photon.mp4": "build/video", "../../src/static/video/doubleSlit.mp4": "build/video", diff --git a/src/build.js b/src/build.js index f1b84fa..ef07030 100644 --- a/src/build.js +++ b/src/build.js @@ -9,6 +9,7 @@ "../../node_modules/reveal.js/plugin/math/math.js": "build/js/", "../../src/static/css/style.css": "build/css/", "../../src/static/video/oscillator.mp4": "build/video", + "../../src/static/video/oscillator_simple.mp4": "build/video", "../../src/static/video/travelling.mp4": "build/video", "../../src/static/video/photon.mp4": "build/video", "../../src/static/video/doubleSlit.mp4": "build/video", diff --git a/src/presentation/main.md b/src/presentation/main.md index fc09d86..d7d71e2 100644 --- a/src/presentation/main.md +++ b/src/presentation/main.md @@ -7,6 +7,15 @@ ### Die harmonische Schwingung + + + +--- + +### Die harmonische Schwingung + $$ a = \frac{d v}{dt} = \frac{F}{m} = -\frac{D*x}{m} = \frac{d^2 x}{d^2 t}$$ ;$$ x = A*\cos(\omega * t) \Leftrightarrow \frac{d^2 x}{d^2 t} = -\frac{D*x}{m} = -\omega^2 * x $$ ;$$\omega = \sqrt{\frac{D}{m}}$$ @@ -193,7 +202,7 @@ $$ V = 0 \forall x \in [0; l], V = \infty \forall x \notin [0; l] $$ -;$$ \Psi = 0 \forall x \notin [0, l], \Psi \in \mathbb{C} \forall x \in [0, l] $$ +;$$ \Psi \in \mathbb{C} \forall x \in [0, l], \Psi = 0 \forall x \notin [0, l] $$ ;$$ \Psi = \Psi_x * \Psi_t $$ --- @@ -283,45 +292,14 @@ ;$$ \Psi = \int_{-\infty}^{\infty} \psi* \circlearrowleft(k*x)* dk \textcolor{red}{=\int_{-\infty}^{\infty} \psi* e^{i*k*x}*dk}$$ -;$$ \Psi = \int \int \circlearrowleft(-k*x)*dx * \circlearrowleft(k*x)*dk * \Psi$$ -;$$ \psi = \int \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} \Psi* +;$$ \Psi = \int_{-\infty}^{\infty} \circlearrowleft(k*x)*dk * \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx $$ +;$$ \psi = \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} \Psi* e^{-i*k*x}*dk}$$ --- ### Impulsraum -$$ \Psi = \int_{-\infty}^{\infty} \psi* \circlearrowleft(k*x)* dk \textcolor{red}{=\int_{-\infty}^{\infty} \psi* -e^{i*k*x}*dk}$$ - -;$$ \frac{\partial \Psi}{\partial k} = \psi* \circlearrowleft(k*x) \textcolor{red}{= \psi* e^{i*k*x}}$$ -;$$ \psi = \frac{\partial}{\partial k}* \circlearrowleft(-k*x)* \Psi \textcolor{red}{= \frac{\partial -}{\partial k}* e^{-i*k*x} * \Psi}$$ -;$$ \psi = \circlearrowleft(-90\degree) * \circlearrowleft(-k*x)* \Psi \textcolor{red}{= -i*x* e^{-i*k*x} * \Psi}$$ -;$$ \int \psi *dx = \int \circlearrowleft(-90\degree) * \circlearrowleft(-k*x)* \Psi * dx \textcolor{red}{= \int -i*x* -e^{-i*k*x} * \Psi *dx}$$ -;$$ F(x*\Psi) = \circlearrowleft(90\degree) * F(\Psi)\textcolor{red}{= i*F(\Psi)} $$ - ---- - -### Impulsraum - -$$ \Psi = \int_{-\infty}^{\infty} \psi* \circlearrowleft(k*x)* dk \textcolor{red}{=\int_{-\infty}^{\infty} \psi* -e^{i*k*x}*dk}$$ - -$$ \psi = F(\Psi) = \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} -\Psi*e^{-i*k*x}*dk}$$ - -$$ \frac{\partial \psi}{\partial k} = \int \frac{\partial}{\partial k}\circlearrowleft(-k*x)*\Psi*dx -\textcolor{red}{=\int_{-\infty}^{\infty} \Psi*\frac{\partial}{\partial k}e^{-i*k*x}*dk} $$ -;$$ \frac{\partial \psi}{\partial k} = \int x*\circlearrowleft(-90\degree) * \circlearrowleft(-k*x)*\Psi*dx -\textcolor{red}{=\int_{-\infty}^{\infty} -i*x*\Psi*e^{-i*k*x}*dk} $$ -;$$ \frac{\partial \psi}{\partial k} = \circlearrowleft(-90\degree)*F^{-1}(\Psi*k)\textcolor{red}{=-i*F^{-1}(\Psi*k)} $$ - ---- - -### Impulsraum - $$ \psi = F(\Psi) = \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} \Psi*e^{-i*k*x}*dk}$$ diff --git a/src/build.js b/src/build.js index f1b84fa..ef07030 100644 --- a/src/build.js +++ b/src/build.js @@ -9,6 +9,7 @@ "../../node_modules/reveal.js/plugin/math/math.js": "build/js/", "../../src/static/css/style.css": "build/css/", "../../src/static/video/oscillator.mp4": "build/video", + "../../src/static/video/oscillator_simple.mp4": "build/video", "../../src/static/video/travelling.mp4": "build/video", "../../src/static/video/photon.mp4": "build/video", "../../src/static/video/doubleSlit.mp4": "build/video", diff --git a/src/presentation/main.md b/src/presentation/main.md index fc09d86..d7d71e2 100644 --- a/src/presentation/main.md +++ b/src/presentation/main.md @@ -7,6 +7,15 @@ ### Die harmonische Schwingung + + + +--- + +### Die harmonische Schwingung + $$ a = \frac{d v}{dt} = \frac{F}{m} = -\frac{D*x}{m} = \frac{d^2 x}{d^2 t}$$ ;$$ x = A*\cos(\omega * t) \Leftrightarrow \frac{d^2 x}{d^2 t} = -\frac{D*x}{m} = -\omega^2 * x $$ ;$$\omega = \sqrt{\frac{D}{m}}$$ @@ -193,7 +202,7 @@ $$ V = 0 \forall x \in [0; l], V = \infty \forall x \notin [0; l] $$ -;$$ \Psi = 0 \forall x \notin [0, l], \Psi \in \mathbb{C} \forall x \in [0, l] $$ +;$$ \Psi \in \mathbb{C} \forall x \in [0, l], \Psi = 0 \forall x \notin [0, l] $$ ;$$ \Psi = \Psi_x * \Psi_t $$ --- @@ -283,45 +292,14 @@ ;$$ \Psi = \int_{-\infty}^{\infty} \psi* \circlearrowleft(k*x)* dk \textcolor{red}{=\int_{-\infty}^{\infty} \psi* e^{i*k*x}*dk}$$ -;$$ \Psi = \int \int \circlearrowleft(-k*x)*dx * \circlearrowleft(k*x)*dk * \Psi$$ -;$$ \psi = \int \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} \Psi* +;$$ \Psi = \int_{-\infty}^{\infty} \circlearrowleft(k*x)*dk * \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx $$ +;$$ \psi = \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} \Psi* e^{-i*k*x}*dk}$$ --- ### Impulsraum -$$ \Psi = \int_{-\infty}^{\infty} \psi* \circlearrowleft(k*x)* dk \textcolor{red}{=\int_{-\infty}^{\infty} \psi* -e^{i*k*x}*dk}$$ - -;$$ \frac{\partial \Psi}{\partial k} = \psi* \circlearrowleft(k*x) \textcolor{red}{= \psi* e^{i*k*x}}$$ -;$$ \psi = \frac{\partial}{\partial k}* \circlearrowleft(-k*x)* \Psi \textcolor{red}{= \frac{\partial -}{\partial k}* e^{-i*k*x} * \Psi}$$ -;$$ \psi = \circlearrowleft(-90\degree) * \circlearrowleft(-k*x)* \Psi \textcolor{red}{= -i*x* e^{-i*k*x} * \Psi}$$ -;$$ \int \psi *dx = \int \circlearrowleft(-90\degree) * \circlearrowleft(-k*x)* \Psi * dx \textcolor{red}{= \int -i*x* -e^{-i*k*x} * \Psi *dx}$$ -;$$ F(x*\Psi) = \circlearrowleft(90\degree) * F(\Psi)\textcolor{red}{= i*F(\Psi)} $$ - ---- - -### Impulsraum - -$$ \Psi = \int_{-\infty}^{\infty} \psi* \circlearrowleft(k*x)* dk \textcolor{red}{=\int_{-\infty}^{\infty} \psi* -e^{i*k*x}*dk}$$ - -$$ \psi = F(\Psi) = \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} -\Psi*e^{-i*k*x}*dk}$$ - -$$ \frac{\partial \psi}{\partial k} = \int \frac{\partial}{\partial k}\circlearrowleft(-k*x)*\Psi*dx -\textcolor{red}{=\int_{-\infty}^{\infty} \Psi*\frac{\partial}{\partial k}e^{-i*k*x}*dk} $$ -;$$ \frac{\partial \psi}{\partial k} = \int x*\circlearrowleft(-90\degree) * \circlearrowleft(-k*x)*\Psi*dx -\textcolor{red}{=\int_{-\infty}^{\infty} -i*x*\Psi*e^{-i*k*x}*dk} $$ -;$$ \frac{\partial \psi}{\partial k} = \circlearrowleft(-90\degree)*F^{-1}(\Psi*k)\textcolor{red}{=-i*F^{-1}(\Psi*k)} $$ - ---- - -### Impulsraum - $$ \psi = F(\Psi) = \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} \Psi*e^{-i*k*x}*dk}$$ diff --git a/src/python/oscillator.py b/src/python/oscillator.py index c2885de..e99ccfd 100644 --- a/src/python/oscillator.py +++ b/src/python/oscillator.py @@ -63,4 +63,20 @@ ani = animation.FuncAnimation( fig, animate, interval=1000/framerate, blit=True, save_count = framerate * totalTime) ani.save(f"{outputFolder}oscillator.mp4") -plt.show() + +fig, diagrammAx = plt.subplots() + +diagrammAx.axis("equal") +diagrammAx.set_ylim(-1.5*A, 1.5*A) +diagrammAx.set_xlim(-1.5*A, 1.5*A) +diagrammAx.set_xlabel("x") +diagrammGraph, = diagrammAx.plot([0, 1], [0, 0], "o-") + +def animate(i): + t = i/framerate + x = position(t) + diagrammGraph.set_data([0, x], [0, 0]) + return diagrammGraph, +ani = animation.FuncAnimation( + fig, animate, interval=1000/framerate, blit=True, save_count = framerate * totalTime) +ani.save(f"{outputFolder}oscillator_simple.mp4") diff --git a/src/build.js b/src/build.js index f1b84fa..ef07030 100644 --- a/src/build.js +++ b/src/build.js @@ -9,6 +9,7 @@ "../../node_modules/reveal.js/plugin/math/math.js": "build/js/", "../../src/static/css/style.css": "build/css/", "../../src/static/video/oscillator.mp4": "build/video", + "../../src/static/video/oscillator_simple.mp4": "build/video", "../../src/static/video/travelling.mp4": "build/video", "../../src/static/video/photon.mp4": "build/video", "../../src/static/video/doubleSlit.mp4": "build/video", diff --git a/src/presentation/main.md b/src/presentation/main.md index fc09d86..d7d71e2 100644 --- a/src/presentation/main.md +++ b/src/presentation/main.md @@ -7,6 +7,15 @@ ### Die harmonische Schwingung + + + +--- + +### Die harmonische Schwingung + $$ a = \frac{d v}{dt} = \frac{F}{m} = -\frac{D*x}{m} = \frac{d^2 x}{d^2 t}$$ ;$$ x = A*\cos(\omega * t) \Leftrightarrow \frac{d^2 x}{d^2 t} = -\frac{D*x}{m} = -\omega^2 * x $$ ;$$\omega = \sqrt{\frac{D}{m}}$$ @@ -193,7 +202,7 @@ $$ V = 0 \forall x \in [0; l], V = \infty \forall x \notin [0; l] $$ -;$$ \Psi = 0 \forall x \notin [0, l], \Psi \in \mathbb{C} \forall x \in [0, l] $$ +;$$ \Psi \in \mathbb{C} \forall x \in [0, l], \Psi = 0 \forall x \notin [0, l] $$ ;$$ \Psi = \Psi_x * \Psi_t $$ --- @@ -283,45 +292,14 @@ ;$$ \Psi = \int_{-\infty}^{\infty} \psi* \circlearrowleft(k*x)* dk \textcolor{red}{=\int_{-\infty}^{\infty} \psi* e^{i*k*x}*dk}$$ -;$$ \Psi = \int \int \circlearrowleft(-k*x)*dx * \circlearrowleft(k*x)*dk * \Psi$$ -;$$ \psi = \int \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} \Psi* +;$$ \Psi = \int_{-\infty}^{\infty} \circlearrowleft(k*x)*dk * \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx $$ +;$$ \psi = \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} \Psi* e^{-i*k*x}*dk}$$ --- ### Impulsraum -$$ \Psi = \int_{-\infty}^{\infty} \psi* \circlearrowleft(k*x)* dk \textcolor{red}{=\int_{-\infty}^{\infty} \psi* -e^{i*k*x}*dk}$$ - -;$$ \frac{\partial \Psi}{\partial k} = \psi* \circlearrowleft(k*x) \textcolor{red}{= \psi* e^{i*k*x}}$$ -;$$ \psi = \frac{\partial}{\partial k}* \circlearrowleft(-k*x)* \Psi \textcolor{red}{= \frac{\partial -}{\partial k}* e^{-i*k*x} * \Psi}$$ -;$$ \psi = \circlearrowleft(-90\degree) * \circlearrowleft(-k*x)* \Psi \textcolor{red}{= -i*x* e^{-i*k*x} * \Psi}$$ -;$$ \int \psi *dx = \int \circlearrowleft(-90\degree) * \circlearrowleft(-k*x)* \Psi * dx \textcolor{red}{= \int -i*x* -e^{-i*k*x} * \Psi *dx}$$ -;$$ F(x*\Psi) = \circlearrowleft(90\degree) * F(\Psi)\textcolor{red}{= i*F(\Psi)} $$ - ---- - -### Impulsraum - -$$ \Psi = \int_{-\infty}^{\infty} \psi* \circlearrowleft(k*x)* dk \textcolor{red}{=\int_{-\infty}^{\infty} \psi* -e^{i*k*x}*dk}$$ - -$$ \psi = F(\Psi) = \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} -\Psi*e^{-i*k*x}*dk}$$ - -$$ \frac{\partial \psi}{\partial k} = \int \frac{\partial}{\partial k}\circlearrowleft(-k*x)*\Psi*dx -\textcolor{red}{=\int_{-\infty}^{\infty} \Psi*\frac{\partial}{\partial k}e^{-i*k*x}*dk} $$ -;$$ \frac{\partial \psi}{\partial k} = \int x*\circlearrowleft(-90\degree) * \circlearrowleft(-k*x)*\Psi*dx -\textcolor{red}{=\int_{-\infty}^{\infty} -i*x*\Psi*e^{-i*k*x}*dk} $$ -;$$ \frac{\partial \psi}{\partial k} = \circlearrowleft(-90\degree)*F^{-1}(\Psi*k)\textcolor{red}{=-i*F^{-1}(\Psi*k)} $$ - ---- - -### Impulsraum - $$ \psi = F(\Psi) = \int_{-\infty}^{\infty} \circlearrowleft(-k*x)*\Psi*dx \textcolor{red}{=\int_{-\infty}^{\infty} \Psi*e^{-i*k*x}*dk}$$ diff --git a/src/python/oscillator.py b/src/python/oscillator.py index c2885de..e99ccfd 100644 --- a/src/python/oscillator.py +++ b/src/python/oscillator.py @@ -63,4 +63,20 @@ ani = animation.FuncAnimation( fig, animate, interval=1000/framerate, blit=True, save_count = framerate * totalTime) ani.save(f"{outputFolder}oscillator.mp4") -plt.show() + +fig, diagrammAx = plt.subplots() + +diagrammAx.axis("equal") +diagrammAx.set_ylim(-1.5*A, 1.5*A) +diagrammAx.set_xlim(-1.5*A, 1.5*A) +diagrammAx.set_xlabel("x") +diagrammGraph, = diagrammAx.plot([0, 1], [0, 0], "o-") + +def animate(i): + t = i/framerate + x = position(t) + diagrammGraph.set_data([0, x], [0, 0]) + return diagrammGraph, +ani = animation.FuncAnimation( + fig, animate, interval=1000/framerate, blit=True, save_count = framerate * totalTime) +ani.save(f"{outputFolder}oscillator_simple.mp4") diff --git a/src/python/photon.py b/src/python/photon.py index eb6a715..632f808 100644 --- a/src/python/photon.py +++ b/src/python/photon.py @@ -4,7 +4,7 @@ outputFolder = "src/static/video/" -totalTime = 12 +totalTime = 4 * 2 / 3 framerate = 20 psi = lambda x,t,n: np.sin(n*np.pi*x) * np.exp(-0.25j*n**2*np.pi*t)