diff options
author | erik-loeffler <100943759+erik-loeffler@users.noreply.github.com> | 2022-08-15 09:54:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 09:54:10 +0200 |
commit | 504d47a5a03f60cd54425cfd97fbff750a3f9061 (patch) | |
tree | 74aef248a603bad26b825371af8526b008807950 /buch/papers/lambertw/Bilder/lambertAbstandBauchgefühl.py | |
parent | Merge pull request #3 from haddoucher/sturmliouville/erik-branch (diff) | |
parent | Merge pull request #49 from HeadAndToes/master (diff) | |
download | SeminarSpezielleFunktionen-504d47a5a03f60cd54425cfd97fbff750a3f9061.tar.gz SeminarSpezielleFunktionen-504d47a5a03f60cd54425cfd97fbff750a3f9061.zip |
Merge branch 'AndreasFMueller:master' into master
Diffstat (limited to '')
-rw-r--r-- | buch/papers/lambertw/Bilder/lambertAbstandBauchgefühl.py | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/buch/papers/lambertw/Bilder/lambertAbstandBauchgefühl.py b/buch/papers/lambertw/Bilder/lambertAbstandBauchgefühl.py new file mode 100644 index 0000000..3a90afa --- /dev/null +++ b/buch/papers/lambertw/Bilder/lambertAbstandBauchgefühl.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +""" +Created on Sun Jul 31 13:32:53 2022 + +@author: yanik +""" + +import numpy as np +import matplotlib.pyplot as plt +import scipy.special as sci + +W = sci.lambertw + + +t = np.linspace(0, 1.2, 1000) +x0 = 1 +y0 = 1 + +r0 = np.sqrt(x0**2+y0**2) +chi = (r0+y0)/(r0-y0) + +x = x0*np.sqrt(1/chi*W(chi*np.exp(chi-4*t/(r0-y0)))) +eta = (x/x0)**2 +y = 1/4*((y0+r0)*eta+(y0-r0)*np.log(eta)-r0+3*y0) + +ymin= (min(y)).real +xmin = (x[np.where(y == ymin)][0]).real + + +#Verfolger +plt.plot(x, y, 'r--') +plt.plot(xmin, ymin, 'bo', markersize=10) + +#Ziel +plt.plot(np.zeros_like(t), t, 'g--') +plt.plot(0, ymin, 'bo', markersize=10) + + +plt.plot([0, xmin], [ymin, ymin], 'k--') +#plt.xlim(-0.1, 1) +#plt.ylim(1, 2) +plt.ylabel("y") +plt.xlabel("x") +plt.grid(True) +plt.quiver(xmin, ymin, -0.2, 0, scale=1) + +plt.text(xmin+0.1, ymin-0.1, "Verfolgungskurve", size=20, rotation=20, color='r') +plt.text(0.01, 0.02, "Fluchtkurve", size=20, rotation=90, color='g') + +plt.rcParams.update({ + "text.usetex": True, + "font.family": "serif", + "font.serif": ["New Century Schoolbook"], +}) + +plt.text(xmin-0.11, ymin-0.08, r"$\dot{v}$", size=20) +plt.text(xmin-0.02, ymin+0.05, r"$V$", size=20, c='b') +plt.text(0.02, ymin+0.05, r"$Z$", size=20, c='b')
\ No newline at end of file |