From 88031a6a5bad428cb3bf03dea6f0f95d79484723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 16 Jun 2022 17:02:24 +0200 Subject: new plots --- buch/chapters/110-elliptisch/images/Makefile | 13 ++- .../chapters/110-elliptisch/images/jacobiplots.pdf | Bin 56975 -> 59737 bytes buch/chapters/110-elliptisch/images/kegelpara.pdf | Bin 202828 -> 203620 bytes buch/chapters/110-elliptisch/images/lemnispara.cpp | 126 +++++++++++++++++++++ buch/chapters/110-elliptisch/images/lemnispara.pdf | Bin 0 -> 28447 bytes buch/chapters/110-elliptisch/images/lemnispara.tex | 90 +++++++++++++++ buch/chapters/110-elliptisch/images/slcl.pdf | Bin 28233 -> 31823 bytes .../110-elliptisch/images/torusschnitt.pdf | Bin 301677 -> 302496 bytes buch/chapters/110-elliptisch/lemniskate.tex | 92 +++++++++++---- 9 files changed, 295 insertions(+), 26 deletions(-) create mode 100644 buch/chapters/110-elliptisch/images/lemnispara.cpp create mode 100644 buch/chapters/110-elliptisch/images/lemnispara.pdf create mode 100644 buch/chapters/110-elliptisch/images/lemnispara.tex (limited to 'buch/chapters') diff --git a/buch/chapters/110-elliptisch/images/Makefile b/buch/chapters/110-elliptisch/images/Makefile index c8f98cb..3094877 100644 --- a/buch/chapters/110-elliptisch/images/Makefile +++ b/buch/chapters/110-elliptisch/images/Makefile @@ -5,7 +5,7 @@ # all: lemniskate.pdf ellipsenumfang.pdf unvollstaendig.pdf rechteck.pdf \ ellipse.pdf pendel.pdf jacobiplots.pdf jacobidef.pdf jacobi12.pdf \ - sncnlimit.pdf slcl.pdf torusschnitt.pdf kegelpara.pdf + sncnlimit.pdf slcl.pdf torusschnitt.pdf kegelpara.pdf lemnispara.pdf lemniskate.pdf: lemniskate.tex pdflatex lemniskate.tex @@ -102,3 +102,14 @@ torusschnitt.jpg: torusschnitt.png Makefile torusschnitt.pdf: torusschnitt.tex torusschnitt.jpg pdflatex torusschnitt.tex +lemnispara: lemnispara.cpp + g++ -O2 -Wall -g -o lemnispara `pkg-config --cflags gsl` \ + lemnispara.cpp `pkg-config --libs gsl` + +lemnisparadata.tex: lemnispara + ./lemnispara + +lemnispara.pdf: lemnispara.tex lemnisparadata.tex + pdflatex lemnispara.tex + +ltest: lemnispara.pdf diff --git a/buch/chapters/110-elliptisch/images/jacobiplots.pdf b/buch/chapters/110-elliptisch/images/jacobiplots.pdf index c11affc..fdd3d1f 100644 Binary files a/buch/chapters/110-elliptisch/images/jacobiplots.pdf and b/buch/chapters/110-elliptisch/images/jacobiplots.pdf differ diff --git a/buch/chapters/110-elliptisch/images/kegelpara.pdf b/buch/chapters/110-elliptisch/images/kegelpara.pdf index 2f76593..2dbe39d 100644 Binary files a/buch/chapters/110-elliptisch/images/kegelpara.pdf and b/buch/chapters/110-elliptisch/images/kegelpara.pdf differ diff --git a/buch/chapters/110-elliptisch/images/lemnispara.cpp b/buch/chapters/110-elliptisch/images/lemnispara.cpp new file mode 100644 index 0000000..6f4d55d --- /dev/null +++ b/buch/chapters/110-elliptisch/images/lemnispara.cpp @@ -0,0 +1,126 @@ +/* + * lemnispara.cpp -- Display parametrisation of the lemniskate + * + * (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +const static double s = sqrt(2); +const static double k = 1 / s; +const static double m = k * k; + +typedef std::pair point_t; + +point_t operator*(const point_t& p, double s) { + return point_t(s * p.first, s * p.second); +} + +static double norm(const point_t& p) { + return hypot(p.first, p.second); +} + +static point_t normalize(const point_t& p) { + return p * (1/norm(p)); +} + +static point_t normal(const point_t& p) { + return std::make_pair(p.second, -p.first); +} + +class lemniscate : public point_t { + double sn, cn, dn; +public: + lemniscate(double t) { + gsl_sf_elljac_e(t, m, &sn, &cn, &dn); + first = s * cn * dn; + second = cn * sn; + } + point_t tangent() const { + return std::make_pair(-s * sn * (1.5 - sn * sn), + dn * (1 - 2 * sn * sn)); + } + point_t unittangent() const { + return normalize(tangent()); + } + point_t normal() const { + return ::normal(tangent()); + } + point_t unitnormal() const { + return ::normal(unittangent()); + } +}; + +std::ostream& operator<<(std::ostream& out, const point_t& p) { + char b[1024]; + snprintf(b, sizeof(b), "({%.4f*\\dx},{%.4f*\\dy})", p.first, p.second); + out << b; + return out; +} + +int main(int argc, char *argv[]) { + std::ofstream out("lemnisparadata.tex"); + + // the curve + double tstep = 0.01; + double tmax = 4.05; + out << "\\def\\lemnispath{ "; + out << lemniscate(0); + for (double t = tstep; t < tmax; t += tstep) { + out << std::endl << "\t" << "-- " << lemniscate(t); + } + out << std::endl; + out << "}" << std::endl; + + out << "\\def\\lemnispathmore{ "; + out << lemniscate(tmax); + double tmax2 = 7.5; + for (double t = tmax + tstep; t < tmax2; t += tstep) { + out << std::endl << "\t" << "-- " << lemniscate(t); + } + out << std::endl; + out << "}" << std::endl; + + // individual points + tstep = 0.2; + int i = 0; + char name[3]; + strcpy(name, "L0"); + for (double t = 0; t <= tmax; t += tstep) { + char c = 'A' + i++; + char buffer[128]; + lemniscate l(t); + name[0] = 'L'; + name[1] = c; + out << "\\coordinate (" << name << ") at "; + out << l << ";" << std::endl; + name[0] = 'T'; + out << "\\coordinate (" << name << ") at "; + out << l.unittangent() << ";" << std::endl; + name[0] = 'N'; + out << "\\coordinate (" << name << ") at "; + out << l.unitnormal() << ";" << std::endl; + name[0] = 'C'; + out << "\\def\\" << name << "{ "; + out << "\\node[color=red] at ($(L" << c << ")+0.06*(N" << c << ")$) "; + out << "[rotate={"; + double w = 180 * atan2(l.unitnormal().second, + l.unitnormal().first) / M_PI; + snprintf(buffer, sizeof(buffer), "%.1f", w); + out << buffer; + out << "-90}]"; + snprintf(buffer, sizeof(buffer), "%.1f", t); + out << " {$\\scriptstyle " << buffer << "$};" << std::endl; + out << "}" << std::endl; + } + + out.close(); + return EXIT_SUCCESS; +} diff --git a/buch/chapters/110-elliptisch/images/lemnispara.pdf b/buch/chapters/110-elliptisch/images/lemnispara.pdf new file mode 100644 index 0000000..b03997e Binary files /dev/null and b/buch/chapters/110-elliptisch/images/lemnispara.pdf differ diff --git a/buch/chapters/110-elliptisch/images/lemnispara.tex b/buch/chapters/110-elliptisch/images/lemnispara.tex new file mode 100644 index 0000000..48557cf --- /dev/null +++ b/buch/chapters/110-elliptisch/images/lemnispara.tex @@ -0,0 +1,90 @@ +% +% lemnispara.tex -- parametrization of the lemniscate +% +% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +% +\documentclass[tikz]{standalone} +\usepackage{amsmath} +\usepackage{times} +\usepackage{txfonts} +\usepackage{pgfplots} +\usepackage{csvsimple} +\usetikzlibrary{arrows,intersections,math,calc} +\begin{document} +\def\skala{1} + +\begin{tikzpicture}[>=latex,thick,scale=\skala] +\def\dx{4} +\def\dy{4} +\input{lemnisparadata.tex} + +% add image content here +\draw[color=red!20,line width=1.4pt] \lemnispathmore; +\draw[color=red,line width=1.4pt] \lemnispath; + +\draw[->] ({-1.6*\dx},0) -- ({1.6*\dx},0) coordinate[label={$X$}]; +\draw[->] (0,{-0.7*\dy}) -- (0,{0.7*\dy}) coordinate[label={right:$Y$}]; +\draw ({1.5*\dx},-0.05) -- ({1.5*\dx},0.05); +\draw ({\dx},-0.05) -- ({\dx},0.05); +\draw ({0.5*\dx},-0.05) -- ({0.5*\dx},0.05); +\draw ({-0.5*\dx},-0.05) -- ({-0.5*\dx},0.05); +\draw ({-\dx},-0.05) -- ({-\dx},0.05); +\draw ({-1.5*\dx},-0.05) -- ({-1.5*\dx},0.05); +\draw (-0.05,{0.5*\dy}) -- (0.05,{0.5*\dy}); +\draw (-0.05,{-0.5*\dy}) -- (0.05,{-0.5*\dy}); + +\node at ({\dx},0) [above] {$1$}; +\node at ({-\dx},0) [above] {$-1$}; +\node at ({-0.5*\dx},0) [above] {$-\frac12$}; +\node at ({0.5*\dx},0) [above] {$\frac12$}; +\node at (0,{0.5*\dy}) [left] {$\frac12$}; +\node at (0,{-0.5*\dy}) [left] {$-\frac12$}; + +\def\s{0.02} + +\draw[color=red] ($(LA)-\s*(NA)$) -- ($(LA)+\s*(NA)$); +\draw[color=red] ($(LB)-\s*(NB)$) -- ($(LB)+\s*(NB)$); +\draw[color=red] ($(LC)-\s*(NC)$) -- ($(LC)+\s*(NC)$); +\draw[color=red] ($(LD)-\s*(ND)$) -- ($(LD)+\s*(ND)$); +\draw[color=red] ($(LE)-\s*(NE)$) -- ($(LE)+\s*(NE)$); +\draw[color=red] ($(LF)-\s*(NF)$) -- ($(LF)+\s*(NF)$); +\draw[color=red] ($(LG)-\s*(NG)$) -- ($(LG)+\s*(NG)$); +\draw[color=red] ($(LH)-\s*(NH)$) -- ($(LH)+\s*(NH)$); +\draw[color=red] ($(LI)-\s*(NI)$) -- ($(LI)+\s*(NI)$); +\draw[color=red] ($(LJ)-\s*(NJ)$) -- ($(LJ)+\s*(NJ)$); +\draw[color=red] ($(LK)-\s*(NK)$) -- ($(LK)+\s*(NK)$); +\draw[color=red] ($(LL)-\s*(NL)$) -- ($(LL)+\s*(NL)$); +\draw[color=red] ($(LM)-\s*(NM)$) -- ($(LM)+\s*(NM)$); +\draw[color=red] ($(LN)-\s*(NN)$) -- ($(LN)+\s*(NN)$); +\draw[color=red] ($(LO)-\s*(NO)$) -- ($(LO)+\s*(NO)$); +\draw[color=red] ($(LP)-\s*(NP)$) -- ($(LP)+\s*(NP)$); +\draw[color=red] ($(LQ)-\s*(NQ)$) -- ($(LQ)+\s*(NQ)$); +\draw[color=red] ($(LR)-\s*(NR)$) -- ($(LR)+\s*(NR)$); +\draw[color=red] ($(LS)-\s*(NS)$) -- ($(LS)+\s*(NS)$); +\draw[color=red] ($(LT)-\s*(NT)$) -- ($(LT)+\s*(NT)$); +\draw[color=red] ($(LU)-\s*(NU)$) -- ($(LU)+\s*(NU)$); + +\CB +\CC +\CD +\CE +\CF +\CG +\CH +\CI +\CJ +\CK +\CL +\CM +\CN +\CO +\CP +\CQ +\CR +\CS +\CT +\CU + +\end{tikzpicture} +\end{document} + diff --git a/buch/chapters/110-elliptisch/images/slcl.pdf b/buch/chapters/110-elliptisch/images/slcl.pdf index c15051b..71645e3 100644 Binary files a/buch/chapters/110-elliptisch/images/slcl.pdf and b/buch/chapters/110-elliptisch/images/slcl.pdf differ diff --git a/buch/chapters/110-elliptisch/images/torusschnitt.pdf b/buch/chapters/110-elliptisch/images/torusschnitt.pdf index 11bd353..fde5268 100644 Binary files a/buch/chapters/110-elliptisch/images/torusschnitt.pdf and b/buch/chapters/110-elliptisch/images/torusschnitt.pdf differ diff --git a/buch/chapters/110-elliptisch/lemniskate.tex b/buch/chapters/110-elliptisch/lemniskate.tex index fceaadf..fd998b3 100644 --- a/buch/chapters/110-elliptisch/lemniskate.tex +++ b/buch/chapters/110-elliptisch/lemniskate.tex @@ -86,9 +86,11 @@ eines geraden Kreiskegels (grün) mit einem Rotationsparaboloid (hellblau). \label{buch:elliptisch:lemniskate:kegelpara}} \end{figure}% +\index{Kegel}% +\index{Paraboloid}% Schreibt man in der Gleichung~\eqref{buch:elliptisch:eqn:lemniskate} für die Klammer auf der rechten Seite $Z^2 = X^2 - Y^2$, dann wird die -Lemniskate die Projektion in die $X$-$Y$-Ebene der Schnittmenge der Flächen, +Lemniskate die Projektion in die $X$-$Y$-Ebene der Schnittkurve der Flächen, die durch die Gleichungen \begin{equation} X^2-Y^2 = Z^2 @@ -112,14 +114,18 @@ mit einer zur Torusachse parallelen Ebene (blau), die den inneren Äquator des Torus berührt, ist eine Lemniskate. \label{buch:elliptisch:lemniskate:torusschnitt}} \end{figure} +\index{Torus}% Schneidet man einen Torus mit einer Ebene, die zur Achse des Torus parallel ist und den inneren Äquator des Torus berührt, entsteht ebenfalls eine Lemniskate. Die Situation ist in Abbildung~\ref{buch:elliptisch:lemniskate:torusschnitt} dargestellt. -Der Torus kann mit den Radien $2$ und $1$ mit der $y$-Achse als Torusachse -kann mit der Parametrisierung +Der in Abbildung~\ref{buch:elliptisch:lemniskate:torusschnitt} +dargestellte Torus mit den Radien $2$ und $1$ hat als Achse die +um eine Einheit in $Z$-Richtung verschobene $Y$-Achse und die +$X$-$Z$-Ebene als Äquatorebene. +Sie kann mit \[ (s,t) \mapsto @@ -129,9 +135,10 @@ kann mit der Parametrisierung (2+\cos s) \sin t + 1 \end{pmatrix} \] -beschrieben werden. -Die Gleichung $z=1$ beschreibt eine -achsparallele Ebene, die den inneren Äquator berührt. +parametrisiert werden, die $s$- und $t$-Koordinatenlinien sind +in der Abbildung gelb eingezeichnet. +Die Gleichung $Z=0$ beschreibt eine achsparallele Ebene, die den +inneren Äquator berührt. Die Schnittkurve erfüllt daher \[ (2+\cos s)\sin t + 1 = 0, @@ -141,7 +148,8 @@ Wir müssen nachprüfen dass die Koordinaten $X=(2+\cos s)\cos t$ und $Y=\sin s$ die Gleichung einer Lemniskate erfüllen. -Zunächst können wir in der $X$-Koordinate den Klammerausdruck durch +Zunächst können wir in der $X$-Koordinate den Klammerausdruck durch +$\sin t$ ausdrücken und erhalten \begin{equation} X = @@ -155,10 +163,9 @@ X^2 = \frac{\cos^2t}{\sin^2 t} = -\frac{1-\sin^2t}{\sin^2 t} +\frac{1-\sin^2t}{\sin^2 t}. \label{buch:elliptisch:lemniskate:Xsin} \end{equation} -ersetzen. Auch die $Y$-Koordinaten können wir durch $t$ ausdrücken, nämlich \begin{equation} @@ -218,7 +225,7 @@ X^2-Y^2 Die Berechnung des Quadrates von $X^2+Y^2$ ergibt die Gleichung \[ -(X^2+Y^2) +(X^2+Y^2)^2 = 16 \biggl(\frac{1-S}{S}\biggr)^2 @@ -226,7 +233,7 @@ die Gleichung 8 \cdot 2 \biggl(\frac{1-S}{S}\biggr)^2 = -2\cdot 2^2\cdot (X-Y)^2. +2\cdot 2^2\cdot (X^2-Y^2). \] Sie ist eine Lemniskaten-Gleichung für $a=2$. @@ -279,7 +286,7 @@ Kettenregel berechnen kann: &&\Rightarrow& \dot{y}(r)^2 &= -\frac{1-r^2}{2} -r^2 + \frac{r^4}{2(1-r^2)} +\frac{1-r^2}{2} -r^2 + \frac{r^4}{2(1-r^2)}. \end{align*} Die Summe der Quadrate ist \begin{align*} @@ -342,6 +349,13 @@ $\varpi/2$. % Bogenlängenparametrisierung % \subsection{Bogenlängenparametrisierung} +\begin{figure} +\centering +\includegraphics{chapters/110-elliptisch/images/lemnispara.pdf} +\caption{Parametrisierung der Lemniskate mit Jacobischen elliptischen +Funktion wie in \eqref{buch:elliptisch:lemniskate:bogeneqn} +\label{buch:elliptisch:lemniskate:bogenpara}} +\end{figure} Die Lemniskate mit der Gleichung \[ (X^2+Y^2)^2=2(X^2-Y^2) @@ -350,7 +364,7 @@ Die Lemniskate mit der Gleichung kann mit Jacobischen elliptischen Funktionen parametrisiert werden. Dazu schreibt man -\[ +\begin{equation} \left. \begin{aligned} X(t) @@ -364,9 +378,17 @@ Y(t) \end{aligned} \quad\right\} \qquad\text{mit $k=\displaystyle\frac{1}{\sqrt{2}}$} -\] -und berechnet die beiden Seiten der definierenden Gleichung der -Lemniskate. +\label{buch:elliptisch:lemniskate:bogeneqn} +\end{equation} +Abbildung~\ref{buch:elliptisch:lemniskate:bogenpara} zeigt die +Parametrisierung. +Dem Parameterwert $t=0$ entspricht der Punkt +$(\sqrt{2},0)$ der Lemniskate. + +Dass \eqref{buch:elliptisch:lemniskate:bogeneqn} +tatsächlich eine Parametrisierung ist kann nachgewiesen werden dadurch, +dass man die beiden Seiten der definierenden Gleichung der +Lemniskate berechnet. Zunächst ist \begin{align*} X(t)^2 @@ -436,7 +458,7 @@ Dazu berechnen wir die Ableitungen &= -\sqrt{2}\operatorname{sn}(t,k)\bigl( 1-{\textstyle\frac12}\operatorname{sn}(t,k)^2 -+{\textstyle\frac12}-{\textstyle\frac12}\operatorname{sn}(u,t)^2 ++{\textstyle\frac12}-{\textstyle\frac12}\operatorname{sn}(t,k)^2 \bigr) \\ &= @@ -507,6 +529,7 @@ Gleichung \] hat daher eine Bogenlängenparametrisierung mit \begin{equation} +\left. \begin{aligned} x(t) &= @@ -515,8 +538,13 @@ x(t) \\ y(t) &= -\frac{1}{\sqrt{2}}\operatorname{cn}(\sqrt{2}t,k)\operatorname{sn}(\sqrt{2}t,k) +\frac{1}{\sqrt{2}} +\operatorname{cn}(\sqrt{2}t,k)\operatorname{sn}(\sqrt{2}t,k) \end{aligned} +\quad +\right\} +\qquad +\text{mit $\displaystyle k=\frac{1}{\sqrt{2}}$} \label{buch:elliptisch:lemniskate:bogenlaenge} \end{equation} @@ -527,7 +555,7 @@ die Bogenlänge zuordnet. Daher ist es naheliegend, die Umkehrfunktion von $s(r)$ in \eqref{buch:elliptisch:eqn:lemniskatebogenlaenge} den {\em lemniskatischen Sinus} zu nennen mit der Bezeichnung -$r=\operatorname{sl} s$. +$r=r(s)=\operatorname{sl} s$. Der Kosinus ist der Sinus des komplementären Winkels. Auch für die lemniskatische Bogenlänge $s(r)$ lässt sich eine @@ -537,9 +565,9 @@ Da die Bogenlänge zwischen $(0,0)$ und $(1,0)$ in in \eqref{buch:elliptisch:eqn:varpi} bereits bereichnet wurde. ist sie $\varpi/2-s$. Der {\em lemniskatische Kosinus} ist daher -$\operatorname{cl}(s) = \operatorname{sl}(\varpi/2-s)$ +$\operatorname{cl}(s) = \operatorname{sl}(\varpi/2-s)$. Graphen des lemniskatische Sinus und Kosinus sind in -Abbildung~\label{buch:elliptisch:figure:slcl} dargestellt. +Abbildung~\ref{buch:elliptisch:figure:slcl} dargestellt. Da die Parametrisierung~\eqref{buch:elliptisch:lemniskate:bogenlaenge} eine Bogenlängenparametrisierung ist, darf man $t=s$ schreiben. @@ -551,18 +579,32 @@ r(s)^2 x(s)^2 + y(s)^2 = \operatorname{cn}(s\sqrt{2},k)^2 -\qquad\Rightarrow\qquad +\biggl( +\operatorname{dn}(\sqrt{2}t,k)^2 ++ +\frac12 +\operatorname{sn}(\sqrt{2}t,k)^2 +\biggr) += +\operatorname{cn}(s\sqrt{2},k)^2. +\] +Die Wurzel ist +\[ r(s) = -\operatorname{cn}(s\sqrt{2},k) +\operatorname{sl} s += +\operatorname{cn}(s\sqrt{2},{\textstyle\frac{1}{\sqrt{2}}}). \] +Damit ist der lemniskatische Sinus durch eine Jacobische elliptische +Funktion darstellbar. \begin{figure} \centering \includegraphics[width=\textwidth]{chapters/110-elliptisch/images/slcl.pdf} \caption{ Lemniskatischer Sinus und Kosinus sowie Sinus und Kosinus -mit derart skaliertem Argument, dass die Funktionen die gleichen Nullstellen -haben. +mit derart skaliertem Argument, dass die Funktionen die +gleichen Nullstellen haben. \label{buch:elliptisch:figure:slcl}} \end{figure} -- cgit v1.2.1