From cb562f607b18540df333d6d9a911cf51c91884d0 Mon Sep 17 00:00:00 2001 From: Roy Seitz Date: Thu, 15 Apr 2021 23:49:49 +0200 Subject: Mehr Folien und einige Typos. --- vorlesungen/slides/10/vektorfelder.mp | 266 ++++++++++++++++++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 vorlesungen/slides/10/vektorfelder.mp (limited to 'vorlesungen/slides/10/vektorfelder.mp') diff --git a/vorlesungen/slides/10/vektorfelder.mp b/vorlesungen/slides/10/vektorfelder.mp new file mode 100644 index 0000000..f488327 --- /dev/null +++ b/vorlesungen/slides/10/vektorfelder.mp @@ -0,0 +1,266 @@ +% +% Stroemungsfelder linearer Differentialgleichungen +% +% (c) 2015 Prof Dr Andreas Mueller, Hochschule Rapperswil +% 2021-04-14, Roy Seitz, Copied for SeminarMatrizen +% +verbatimtex +\documentclass{book} +\usepackage{times} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{amsfonts} +\usepackage{txfonts} +\begin{document} +etex; + +input TEX; + +TEXPRE("%&latex" & char(10) & +"\documentclass{book}" & +"\usepackage{times}" & +"\usepackage{amsmath}" & +"\usepackage{amssymb}" & +"\usepackage{amsfonts}" & +"\usepackage{txfonts}" & +"\begin{document}"); +TEXPOST("\end{document}"); + +% +% Vektorfeld in der Ebene mit Lösungskurve +% so(2) +% +beginfig(1) + +% Scaling parameter +numeric unit; +unit := 150; + +% Some points +z1 = (-1.5, 0) * unit; +z2 = ( 1.5, 0) * unit; +z3 = ( 0, -1.5) * unit; +z4 = ( 0, 1.5) * unit; + +pickup pencircle scaled 1pt; +drawarrow (z1 shifted (-10,0))--(z2 shifted (10,0)); +drawarrow (z3 shifted (0,-10))--(z4 shifted (0,10)); +label.top(btex $x_1$ etex, z2 shifted (10,0)); +label.rt(btex $x_2$ etex, z4 shifted (0,10)); + +% Draw circles +for x = 0.2 step 0.2 until 1.4: + path p; + p = (x,0); + for a = 5 step 5 until 355: + p := p--(x*cosd(a), x*sind(a)); + endfor; + p := p--cycle; + pickup pencircle scaled 1pt; + draw p scaled unit withcolor red; +endfor; + +% Define DGL +def dglField(expr x, y) = + %(-0.5 * (x + y), -0.5 * (y - x)) + (-y, x) +enddef; + +% Draw arrows for each grid point +pickup pencircle scaled 0.5pt; +for x = -1.5 step 0.1 until 1.55: + for y = -1.5 step 0.1 until 1.55: + drawarrow ((x, y) * unit) + --(((x,y) * unit) shifted (8 * dglField(x,y))) + withcolor blue; + endfor; +endfor; + +endfig; + + + +% +% Vektorfeld in der Ebene mit Lösungskurve +% X \in sl(2, R) +% +beginfig(2) + +numeric unit; +unit := 150; + +z0 = ( 0, 0); +z1 = (-1.5, 0) * unit; +z2 = ( 1.5, 0) * unit; +z3 = ( 0, -1.5) * unit; +z4 = ( 0, 1.5) * unit; + +pickup pencircle scaled 1pt; +drawarrow (z1 shifted (-10,0))--(z2 shifted (10,0)); +drawarrow (z3 shifted (0,-10))--(z4 shifted (0,10)); +label.top(btex $x_1$ etex, z2 shifted (10,0)); +label.rt(btex $x_2$ etex, z4 shifted (0,10)); + +% Draw flow lines +for y = -1.4 step 0.2 until 1.4: + path p; + p = (-1.5,y) -- (1.5, y); + pickup pencircle scaled 1pt; + draw p scaled unit withcolor red; +endfor; + +def dglField(expr x, y) = + (y, 0) +enddef; + +% Draw arrows for each grid point +pickup pencircle scaled 0.5pt; +for x = -1.5 step 0.1 until 1.55: + for y = -1.5 step 0.1 until 1.55: + drawarrow ((x, y) * unit) + --(((x,y) * unit) shifted (8 * dglField(x,y))) + withcolor blue; + endfor; +endfor; + +endfig; + + + + +% +% Vektorfeld in der Ebene mit Lösungskurve +% Y \in sl(2, R) +% +beginfig(3) + +numeric unit; +unit := 150; + +z0 = ( 0, 0); +z1 = (-1.5, 0) * unit; +z2 = ( 1.5, 0) * unit; +z3 = ( 0, -1.5) * unit; +z4 = ( 0, 1.5) * unit; + +pickup pencircle scaled 1pt; +drawarrow (z1 shifted (-10,0))--(z2 shifted (10,0)); +drawarrow (z3 shifted (0,-10))--(z4 shifted (0,10)); +label.top(btex $x_1$ etex, z2 shifted (10,0)); +label.rt(btex $x_2$ etex, z4 shifted (0,10)); + +% Draw flow lines +for x = -1.4 step 0.2 until 1.4: + path p; + p = (x, -1.5) -- (x, 1.5); + pickup pencircle scaled 1pt; + draw p scaled unit withcolor red; +endfor; + +def dglField(expr x, y) = + (0, x) +enddef; + +% def dglFieldp(expr z) = +% dglField(xpart z, ypart z) +% enddef; +% +% def curve(expr z, l) = +% path p; +% p := z; +% for t = 0 step 1 until l: +% p := p--((point (length p) of p) shifted (0.01 * dglFieldp(point (length p) of p))); +% endfor; +% draw p scaled unit withcolor red; +% enddef; +% +% numeric outerlength; +% outerlength = 200; +% curve(( 0.1, 0), outerlength); +% curve(( 0.2, 0), outerlength); +% +% numeric innerlength; +% innerlength = 500; +% +% for a = 0 step 30 until 330: +% curve(0.05 * (cosd(a), sind(a)), innerlength); +% endfor; + +% Draw arrows for each grid point +pickup pencircle scaled 0.5pt; +for x = -1.5 step 0.1 until 1.55: + for y = -1.5 step 0.1 until 1.55: + drawarrow ((x, y) * unit) + --(((x,y) * unit) shifted (8 * dglField(x,y))) + withcolor blue; + endfor; +endfor; + +endfig; + + +% +% Vektorfeld in der Ebene mit Lösungskurve +% H \in sl(2, R) +% +beginfig(4) + +numeric unit; +unit := 150; + +z0 = ( 0, 0); +z1 = (-1.5, 0) * unit; +z2 = ( 1.5, 0) * unit; +z3 = ( 0, -1.5) * unit; +z4 = ( 0, 1.5) * unit; + +pickup pencircle scaled 1pt; +drawarrow (z1 shifted (-25,0))--(z2 shifted (25,0)); +drawarrow (z3 shifted (0,-10))--(z4 shifted (0,10)); +label.top(btex $x_1$ etex, z2 shifted (25,0)); +label.rt(btex $x_2$ etex, z4 shifted (0,10)); + +def dglField(expr x, y) = + (x, -y) +enddef; + +def dglFieldp(expr z) = + dglField(xpart z, ypart z) +enddef; + +def curve(expr z, l) = + path p; + p := z; + for t = 0 step 1 until l: + p := p--((point (length p) of p) shifted (0.01 * dglFieldp(point (length p) of p))); + endfor; + draw p scaled unit withcolor red; +enddef; + +for i = -1 step 2 until 1: + for k = -1 step 2 until 1: + curve((1.3 * i, 1.5 * k), 18); + curve((1.1 * i, 1.5 * k), 35); + curve((0.9 * i, 1.5 * k), 55); + curve((0.7 * i, 1.5 * k), 80); + curve((0.5 * i, 1.5 * k), 114); + curve((0.3 * i, 1.5 * k), 165); + curve((0.1 * i, 1.5 * k), 275); + endfor; +endfor; + +% Draw arrows for each grid point +pickup pencircle scaled 0.5pt; +for x = -1.5 step 0.1 until 1.55: + for y = -1.5 step 0.1 until 1.55: + drawarrow ((x, y) * unit) + --(((x,y) * unit) shifted (8 * dglField(x,y))) + withcolor blue; + endfor; +endfor; + +endfig; + + + +end; -- cgit v1.2.1 From 4313f2c207d5d60171898ccfd4c3b3d0d2fb4a75 Mon Sep 17 00:00:00 2001 From: Roy Seitz Date: Sun, 18 Apr 2021 17:49:56 +0200 Subject: =?UTF-8?q?Pr=C3=A4sentation=20feritg.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vorlesungen/slides/10/vektorfelder.mp | 241 ++++++++++++++++++++++++---------- 1 file changed, 168 insertions(+), 73 deletions(-) (limited to 'vorlesungen/slides/10/vektorfelder.mp') diff --git a/vorlesungen/slides/10/vektorfelder.mp b/vorlesungen/slides/10/vektorfelder.mp index f488327..e63b2d5 100644 --- a/vorlesungen/slides/10/vektorfelder.mp +++ b/vorlesungen/slides/10/vektorfelder.mp @@ -48,17 +48,17 @@ drawarrow (z3 shifted (0,-10))--(z4 shifted (0,10)); label.top(btex $x_1$ etex, z2 shifted (10,0)); label.rt(btex $x_2$ etex, z4 shifted (0,10)); -% Draw circles -for x = 0.2 step 0.2 until 1.4: - path p; - p = (x,0); - for a = 5 step 5 until 355: - p := p--(x*cosd(a), x*sind(a)); - endfor; - p := p--cycle; - pickup pencircle scaled 1pt; - draw p scaled unit withcolor red; -endfor; +% % Draw circles +% for x = 0.2 step 0.2 until 1.4: +% path p; +% p = (x,0); +% for a = 5 step 5 until 355: +% p := p--(x*cosd(a), x*sind(a)); +% endfor; +% p := p--cycle; +% pickup pencircle scaled 1pt; +% draw p scaled unit withcolor red; +% endfor; % Define DGL def dglField(expr x, y) = @@ -66,6 +66,10 @@ def dglField(expr x, y) = (-y, x) enddef; +pair A; +A := (1, 0); +draw A scaled unit withpen pencircle scaled 8bp withcolor red; + % Draw arrows for each grid point pickup pencircle scaled 0.5pt; for x = -1.5 step 0.1 until 1.55: @@ -78,11 +82,9 @@ endfor; endfig; - - % % Vektorfeld in der Ebene mit Lösungskurve -% X \in sl(2, R) +% Euler(1) % beginfig(2) @@ -101,18 +103,28 @@ drawarrow (z3 shifted (0,-10))--(z4 shifted (0,10)); label.top(btex $x_1$ etex, z2 shifted (10,0)); label.rt(btex $x_2$ etex, z4 shifted (0,10)); -% Draw flow lines -for y = -1.4 step 0.2 until 1.4: +def dglField(expr x, y) = + (-y, x) +enddef; + +def dglFieldp(expr z) = + dglField(xpart z, ypart z) +enddef; + +def curve(expr z, l, s) = path p; - p = (-1.5,y) -- (1.5, y); - pickup pencircle scaled 1pt; + p := z; + for t = 0 step 1 until l: + p := p--((point (length p) of p) shifted (s * dglFieldp(point (length p) of p))); + endfor; draw p scaled unit withcolor red; -endfor; - -def dglField(expr x, y) = - (y, 0) enddef; +pair A; +A := (1, 0); +draw A scaled unit withpen pencircle scaled 8bp withcolor red; +curve(A, 0, 1); + % Draw arrows for each grid point pickup pencircle scaled 0.5pt; for x = -1.5 step 0.1 until 1.55: @@ -125,12 +137,9 @@ endfor; endfig; - - - % % Vektorfeld in der Ebene mit Lösungskurve -% Y \in sl(2, R) +% Euler(2) % beginfig(3) @@ -149,42 +158,82 @@ drawarrow (z3 shifted (0,-10))--(z4 shifted (0,10)); label.top(btex $x_1$ etex, z2 shifted (10,0)); label.rt(btex $x_2$ etex, z4 shifted (0,10)); -% Draw flow lines -for x = -1.4 step 0.2 until 1.4: +def dglField(expr x, y) = + (-y, x) +enddef; + +def dglFieldp(expr z) = + dglField(xpart z, ypart z) +enddef; + +def curve(expr z, l, s) = path p; - p = (x, -1.5) -- (x, 1.5); - pickup pencircle scaled 1pt; + p := z; + for t = 0 step 1 until l: + p := p--((point (length p) of p) shifted (s * dglFieldp(point (length p) of p))); + endfor; draw p scaled unit withcolor red; +enddef; + +pair A; +A := (1, 0); +draw A scaled unit withpen pencircle scaled 8bp withcolor red; +curve(A, 1, 0.5); + +% Draw arrows for each grid point +pickup pencircle scaled 0.5pt; +for x = -1.5 step 0.1 until 1.55: + for y = -1.5 step 0.1 until 1.55: + drawarrow ((x, y) * unit) + --(((x,y) * unit) shifted (8 * dglField(x,y))) + withcolor blue; + endfor; endfor; -def dglField(expr x, y) = - (0, x) -enddef; +endfig; -% def dglFieldp(expr z) = -% dglField(xpart z, ypart z) -% enddef; -% -% def curve(expr z, l) = -% path p; -% p := z; -% for t = 0 step 1 until l: -% p := p--((point (length p) of p) shifted (0.01 * dglFieldp(point (length p) of p))); -% endfor; -% draw p scaled unit withcolor red; -% enddef; % -% numeric outerlength; -% outerlength = 200; -% curve(( 0.1, 0), outerlength); -% curve(( 0.2, 0), outerlength); +% Vektorfeld in der Ebene mit Lösungskurve +% Euler(3) % -% numeric innerlength; -% innerlength = 500; -% -% for a = 0 step 30 until 330: -% curve(0.05 * (cosd(a), sind(a)), innerlength); -% endfor; +beginfig(4) + +numeric unit; +unit := 150; + +z0 = ( 0, 0); +z1 = (-1.5, 0) * unit; +z2 = ( 1.5, 0) * unit; +z3 = ( 0, -1.5) * unit; +z4 = ( 0, 1.5) * unit; + +pickup pencircle scaled 1pt; +drawarrow (z1 shifted (-10,0))--(z2 shifted (10,0)); +drawarrow (z3 shifted (0,-10))--(z4 shifted (0,10)); +label.top(btex $x_1$ etex, z2 shifted (10,0)); +label.rt(btex $x_2$ etex, z4 shifted (0,10)); + +def dglField(expr x, y) = + (-y, x) +enddef; + +def dglFieldp(expr z) = + dglField(xpart z, ypart z) +enddef; + +def curve(expr z, l, s) = + path p; + p := z; + for t = 0 step 1 until l: + p := p--((point (length p) of p) shifted (s * dglFieldp(point (length p) of p))); + endfor; + draw p scaled unit withcolor red; +enddef; + +pair A; +A := (1, 0); +draw A scaled unit withpen pencircle scaled 8bp withcolor red; +curve(A, 3, 0.25); % Draw arrows for each grid point pickup pencircle scaled 0.5pt; @@ -198,12 +247,11 @@ endfor; endfig; - % % Vektorfeld in der Ebene mit Lösungskurve -% H \in sl(2, R) +% Euler(4) % -beginfig(4) +beginfig(5) numeric unit; unit := 150; @@ -215,40 +263,88 @@ z3 = ( 0, -1.5) * unit; z4 = ( 0, 1.5) * unit; pickup pencircle scaled 1pt; -drawarrow (z1 shifted (-25,0))--(z2 shifted (25,0)); +drawarrow (z1 shifted (-10,0))--(z2 shifted (10,0)); drawarrow (z3 shifted (0,-10))--(z4 shifted (0,10)); -label.top(btex $x_1$ etex, z2 shifted (25,0)); +label.top(btex $x_1$ etex, z2 shifted (10,0)); label.rt(btex $x_2$ etex, z4 shifted (0,10)); def dglField(expr x, y) = - (x, -y) + (-y, x) enddef; def dglFieldp(expr z) = dglField(xpart z, ypart z) enddef; -def curve(expr z, l) = +def curve(expr z, l, s) = path p; p := z; for t = 0 step 1 until l: - p := p--((point (length p) of p) shifted (0.01 * dglFieldp(point (length p) of p))); + p := p--((point (length p) of p) shifted (s * dglFieldp(point (length p) of p))); endfor; draw p scaled unit withcolor red; enddef; -for i = -1 step 2 until 1: - for k = -1 step 2 until 1: - curve((1.3 * i, 1.5 * k), 18); - curve((1.1 * i, 1.5 * k), 35); - curve((0.9 * i, 1.5 * k), 55); - curve((0.7 * i, 1.5 * k), 80); - curve((0.5 * i, 1.5 * k), 114); - curve((0.3 * i, 1.5 * k), 165); - curve((0.1 * i, 1.5 * k), 275); +pair A; +A := (1, 0); +draw A scaled unit withpen pencircle scaled 8bp withcolor red; +curve(A, 7, 0.125); + +% Draw arrows for each grid point +pickup pencircle scaled 0.5pt; +for x = -1.5 step 0.1 until 1.55: + for y = -1.5 step 0.1 until 1.55: + drawarrow ((x, y) * unit) + --(((x,y) * unit) shifted (8 * dglField(x,y))) + withcolor blue; endfor; endfor; +endfig; + +% +% Vektorfeld in der Ebene mit Lösungskurve +% Euler(5) +% +beginfig(6) + +numeric unit; +unit := 150; + +z0 = ( 0, 0); +z1 = (-1.5, 0) * unit; +z2 = ( 1.5, 0) * unit; +z3 = ( 0, -1.5) * unit; +z4 = ( 0, 1.5) * unit; + +pickup pencircle scaled 1pt; +drawarrow (z1 shifted (-10,0))--(z2 shifted (10,0)); +drawarrow (z3 shifted (0,-10))--(z4 shifted (0,10)); +label.top(btex $x_1$ etex, z2 shifted (10,0)); +label.rt(btex $x_2$ etex, z4 shifted (0,10)); + +def dglField(expr x, y) = + (-y, x) +enddef; + +def dglFieldp(expr z) = + dglField(xpart z, ypart z) +enddef; + +def curve(expr z, l, s) = + path p; + p := z; + for t = 0 step 1 until l: + p := p--((point (length p) of p) shifted (s * dglFieldp(point (length p) of p))); + endfor; + draw p scaled unit withcolor red; +enddef; + +pair A; +A := (1, 0); +draw A scaled unit withpen pencircle scaled 8bp withcolor red; +curve(A, 99, 0.01); + % Draw arrows for each grid point pickup pencircle scaled 0.5pt; for x = -1.5 step 0.1 until 1.55: @@ -262,5 +358,4 @@ endfor; endfig; - end; -- cgit v1.2.1