aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/090-pde
diff options
context:
space:
mode:
Diffstat (limited to 'buch/chapters/090-pde')
-rw-r--r--buch/chapters/090-pde/kugel/Makefile18
-rw-r--r--buch/chapters/090-pde/kugel/common.inc227
-rw-r--r--buch/chapters/090-pde/kugel/spherical30.pngbin0 -> 124276 bytes
-rw-r--r--buch/chapters/090-pde/kugel/spherical30.pov11
-rw-r--r--buch/chapters/090-pde/kugel/spherical31.pngbin0 -> 237355 bytes
-rw-r--r--buch/chapters/090-pde/kugel/spherical31.pov11
-rw-r--r--buch/chapters/090-pde/kugel/spherical32.pngbin0 -> 212436 bytes
-rw-r--r--buch/chapters/090-pde/kugel/spherical32.pov11
-rw-r--r--buch/chapters/090-pde/kugel/spherical33.pngbin0 -> 146173 bytes
-rw-r--r--buch/chapters/090-pde/kugel/spherical33.pov11
-rw-r--r--buch/chapters/090-pde/membran/Makefile15
-rw-r--r--buch/chapters/090-pde/membran/membran.m109
-rw-r--r--buch/chapters/090-pde/membran/membran.pngbin0 -> 2527711 bytes
-rw-r--r--buch/chapters/090-pde/membran/membran.pov163
14 files changed, 576 insertions, 0 deletions
diff --git a/buch/chapters/090-pde/kugel/Makefile b/buch/chapters/090-pde/kugel/Makefile
new file mode 100644
index 0000000..4daf173
--- /dev/null
+++ b/buch/chapters/090-pde/kugel/Makefile
@@ -0,0 +1,18 @@
+#
+# Makefile -- build images for cover
+#
+# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+#
+all: spherical30.png spherical31.png spherical32.png spherical33.png
+
+spherical30.png: common.inc spherical30.pov
+ povray +A0.1 +UA +W1080 +H1080 -Ospherical30.png spherical30.pov
+
+spherical31.png: common.inc spherical31.pov
+ povray +A0.1 +UA +W1080 +H1080 -Ospherical31.png spherical31.pov
+
+spherical32.png: common.inc spherical32.pov
+ povray +A0.1 +UA +W1080 +H1080 -Ospherical32.png spherical32.pov
+
+spherical33.png: common.inc spherical33.pov
+ povray +A0.1 +UA +W1080 +H1080 -Ospherical33.png spherical33.pov
diff --git a/buch/chapters/090-pde/kugel/common.inc b/buch/chapters/090-pde/kugel/common.inc
new file mode 100644
index 0000000..ed5f78c
--- /dev/null
+++ b/buch/chapters/090-pde/kugel/common.inc
@@ -0,0 +1,227 @@
+//
+// common.inc
+//
+// (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+//
+#include "colors.inc"
+#include "math.inc"
+
+global_settings {
+ assumed_gamma 1
+}
+
+#declare imagescale = 0.035;
+#declare thetasteps = 100;
+ #declare phisteps = 200;
+
+#declare PositiveColor = rgb<1.0,0.6,0.2>;
+#declare NegativeColor = rgb<0.6,0.2,0.6>;
+
+camera {
+ location <-33, 20, 50>
+ look_at <0, 0, 0>
+ right x * imagescale
+ up y * imagescale
+}
+
+background { color rgbt <0,0,0,1> }
+
+light_source {
+ <10, 5, 40> color White
+ area_light <1,0,0> <0,0,1>, 10, 10
+ adaptive 1
+ jitter
+}
+
+//sky_sphere {
+// pigment {
+// color rgb<1,1,1>
+// }
+//}
+
+//
+// draw an arrow from <from> to <to> with thickness <arrowthickness> with
+// color <c>
+//
+#macro arrow(from, to, arrowthickness, c)
+#declare arrowdirection = vnormalize(to - from);
+#declare arrowlength = vlength(to - from);
+union {
+ sphere {
+ from, 1.1 * arrowthickness
+ }
+ cylinder {
+ from,
+ from + (arrowlength - 5 * arrowthickness) * arrowdirection,
+ arrowthickness
+ }
+ cone {
+ from + (arrowlength - 5 * arrowthickness) * arrowdirection,
+ 2 * arrowthickness,
+ to,
+ 0
+ }
+ pigment {
+ color c
+ }
+ finish {
+ specular 0.9
+ metallic
+ }
+}
+#end
+
+//arrow(<-1.1,0,0>, <1.1,0,0>, 0.01, White)
+//arrow(<0,-1.1,0>, <0,1.1,0>, 0.01, White)
+//arrow(<0,0,-1.1>, <0,0,1.1>, 0.01, White)
+
+#declare P33 = function(X) { (1-X*X) * sqrt(1-X*X) };
+#declare P33abl = function(X) { -3*X*sqrt(1-X*X) };
+#declare P32 = function(X) { 2.7 * (1-X*X) * X };
+#declare P32abl = function(X) { 2.7 * (1-3*X*X) };
+#declare P31 = function(X) { (0.75) * (5*X*X-1) * sqrt(1-X*X) };
+#declare P31abl = function(X) { 0.75 * (15*X*X-11)*X / sqrt(1-0.9999*X*X) };
+#declare P30 = function(X) { (1/2) * (5*X*X-3)*X };
+#declare P30abl = function(X) { (1/2) * 15*X*X-3 };
+
+#macro kugel0(phi,theta)
+<cos(phi)*sin(theta), cos(theta), sin(phi)*sin(theta)>
+#end
+#macro kugelphi(phi,theta)
+<-sin(phi)*sin(theta), 0, cos(phi)*sin(theta)>
+#end
+#macro kugeltheta(phi,theta)
+<cos(phi)*cos(theta), -sin(theta), sin(phi)*cos(theta)>
+#end
+
+#declare fcos = function(phi,eps) { abs(cos(phi)) * (1+eps*sgn(cos(phi))) }
+#declare fradius = function(r,eps) { sqrt(abs(r)) * (1+eps*sgn(r)) }
+
+#macro kugel(phi, theta, m, eps)
+ #switch (m)
+ #case (0)
+ fradius(P30(cos(theta)) * cos(m*phi),eps) * kugel0(phi,theta)
+ #break
+ #case (1)
+ fradius(P31(cos(theta)) * cos(m*phi),eps) * kugel0(phi,theta)
+ #break
+ #case (2)
+ fradius(P32(cos(theta)) * cos(m*phi),eps) * kugel0(phi,theta)
+ #break
+ #case (3)
+ fradius(P33(cos(theta)) * cos(m*phi),eps) * kugel0(phi,theta)
+ #end
+#end
+
+#macro normale(phi, theta, m, eps)
+ #switch (m)
+ #case (0)
+ vnormalize(vcross(
+ P30(cos(theta))*(-m)*sin(m*phi)*kugelphi(phi,theta)
+ +
+ fradius(P30(cos(theta))*cos(m*phi),eps) * kugelphi(phi,theta),
+ P30abl(cos(theta))*(-sin(theta))*cos(m*phi) * kugel0(phi,theta)
+ +
+ fradius(P30(cos(theta))*cos(m*phi),eps) * kugeltheta(phi,theta)
+
+ ))
+ #break
+ #case (1)
+ vnormalize(vcross(
+ P31(cos(theta))*(-m)*sin(m*phi)*kugelphi(phi,theta)
+ +
+ fradius(P31(cos(theta))*cos(m*phi),eps) * kugelphi(phi,theta),
+ P31abl(cos(theta))*(-sin(theta))*cos(m*phi) * kugel0(phi,theta)
+ +
+ fradius(P31(cos(theta))*cos(m*phi),eps) * kugeltheta(phi,theta)
+
+ ))
+ #break
+ #case (2)
+ vnormalize(vcross(
+ P32(cos(theta))*(-m)*sin(m*phi)*kugelphi(phi,theta)
+ +
+ fradius(P32(cos(theta))*cos(m*phi),eps) * kugelphi(phi,theta),
+ P32abl(cos(theta))*(-sin(theta))*cos(m*phi) * kugel0(phi,theta)
+ +
+ fradius(P32(cos(theta))*cos(m*phi),eps) * kugeltheta(phi,theta)
+
+ ))
+ #break
+ #case (3)
+ vnormalize(vcross(
+ P33(cos(theta))*(-m)*sin(m*phi)*kugelphi(phi,theta)
+ +
+ fradius(P33(cos(theta))*cos(m*phi),eps) * kugelphi(phi,theta),
+ P33abl(cos(theta))*(-sin(theta))*cos(m*phi) * kugel0(phi,theta)
+ +
+ fradius(P33(cos(theta))*cos(m*phi),eps) * kugeltheta(phi,theta)
+
+ ))
+ #break
+ #end
+#end
+
+#macro kugelflaeche(m, eps, farbe)
+mesh {
+ #declare thetastep = pi / thetasteps;
+ #declare thetamin = thetastep;
+ #declare thetamax = pi - thetastep;
+
+ #declare phistep = pi / phisteps;
+ #declare phimin = 0;
+ #declare phimax = 2 * pi;
+
+ #declare phi = phimin;
+ #while (phi < phimax - phistep/2)
+ triangle {
+ kugel(0, 0, m, eps),
+ kugel(phi, thetamin, m, eps),
+ kugel(phi + phistep, thetamin, m, eps)
+ }
+
+ #declare theta = thetamin;
+ #while (theta < thetamax - thetastep/2)
+ triangle {
+ kugel(phi, theta, m, eps),
+ kugel(phi + phistep, theta, m, eps),
+ kugel(phi + phistep, theta + thetastep, m, eps)
+ }
+ triangle {
+ kugel(phi, theta, m, eps),
+ kugel(phi, theta + thetastep, m, eps),
+ kugel(phi + phistep, theta + thetastep, m, eps)
+ }
+ #declare theta = theta + thetastep;
+ #end
+
+ triangle {
+ kugel(0, pi, m, eps),
+ kugel(phi, thetamax, m, eps),
+ kugel(phi + phistep, thetamax, m, eps)
+ }
+
+ #declare phi = phi + phistep;
+ #end
+ pigment {
+ color farbe
+ }
+ finish {
+ specular 0.95
+ metallic
+ }
+}
+#end
+
+//sphere {
+// <0,0,0>, 1
+// pigment {
+// color rgbt<1,1,1,0.7>
+// }
+// finish {
+// specular 0.95
+// metallic
+// }
+//}
+
+
diff --git a/buch/chapters/090-pde/kugel/spherical30.png b/buch/chapters/090-pde/kugel/spherical30.png
new file mode 100644
index 0000000..d24d786
--- /dev/null
+++ b/buch/chapters/090-pde/kugel/spherical30.png
Binary files differ
diff --git a/buch/chapters/090-pde/kugel/spherical30.pov b/buch/chapters/090-pde/kugel/spherical30.pov
new file mode 100644
index 0000000..1a7d979
--- /dev/null
+++ b/buch/chapters/090-pde/kugel/spherical30.pov
@@ -0,0 +1,11 @@
+//
+// spherical30.pov
+//
+// (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+//
+
+#version 3.7;
+#include "common.inc"
+
+kugelflaeche(0, 0.001, PositiveColor)
+kugelflaeche(0, -0.001, NegativeColor)
diff --git a/buch/chapters/090-pde/kugel/spherical31.png b/buch/chapters/090-pde/kugel/spherical31.png
new file mode 100644
index 0000000..95d9789
--- /dev/null
+++ b/buch/chapters/090-pde/kugel/spherical31.png
Binary files differ
diff --git a/buch/chapters/090-pde/kugel/spherical31.pov b/buch/chapters/090-pde/kugel/spherical31.pov
new file mode 100644
index 0000000..bc161f0
--- /dev/null
+++ b/buch/chapters/090-pde/kugel/spherical31.pov
@@ -0,0 +1,11 @@
+//
+// spherical30.pov
+//
+// (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+//
+
+#version 3.7;
+#include "common.inc"
+
+kugelflaeche(1, 0.001, PositiveColor)
+kugelflaeche(1, -0.001, NegativeColor)
diff --git a/buch/chapters/090-pde/kugel/spherical32.png b/buch/chapters/090-pde/kugel/spherical32.png
new file mode 100644
index 0000000..1ba6bd0
--- /dev/null
+++ b/buch/chapters/090-pde/kugel/spherical32.png
Binary files differ
diff --git a/buch/chapters/090-pde/kugel/spherical32.pov b/buch/chapters/090-pde/kugel/spherical32.pov
new file mode 100644
index 0000000..6cb20c8
--- /dev/null
+++ b/buch/chapters/090-pde/kugel/spherical32.pov
@@ -0,0 +1,11 @@
+//
+// spherical30.pov
+//
+// (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+//
+
+#version 3.7;
+#include "common.inc"
+
+kugelflaeche(2, 0.001, PositiveColor)
+kugelflaeche(2, -0.001, NegativeColor)
diff --git a/buch/chapters/090-pde/kugel/spherical33.png b/buch/chapters/090-pde/kugel/spherical33.png
new file mode 100644
index 0000000..fb9de45
--- /dev/null
+++ b/buch/chapters/090-pde/kugel/spherical33.png
Binary files differ
diff --git a/buch/chapters/090-pde/kugel/spherical33.pov b/buch/chapters/090-pde/kugel/spherical33.pov
new file mode 100644
index 0000000..8a9a53a
--- /dev/null
+++ b/buch/chapters/090-pde/kugel/spherical33.pov
@@ -0,0 +1,11 @@
+//
+// spherical30.pov
+//
+// (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+//
+
+#version 3.7;
+#include "common.inc"
+
+kugelflaeche(3, 0.001, PositiveColor)
+kugelflaeche(3, -0.001, NegativeColor)
diff --git a/buch/chapters/090-pde/membran/Makefile b/buch/chapters/090-pde/membran/Makefile
new file mode 100644
index 0000000..35dfd14
--- /dev/null
+++ b/buch/chapters/090-pde/membran/Makefile
@@ -0,0 +1,15 @@
+#
+# Makefile
+#
+# (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+#
+all: membran.png
+
+membran.inc: membran.m
+ octave membran.m
+
+size="+W1920 +H540"
+size="+W3840 +H1080"
+
+membran.png: membran.pov membran.inc
+ povray +A0.1 +UA $(size) -Omembran.png membran.pov
diff --git a/buch/chapters/090-pde/membran/membran.m b/buch/chapters/090-pde/membran/membran.m
new file mode 100644
index 0000000..acc45b9
--- /dev/null
+++ b/buch/chapters/090-pde/membran/membran.m
@@ -0,0 +1,109 @@
+#
+# membran.m
+#
+# (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+#
+global n;
+n = 3;
+global A;
+A = 0.2;
+global nullstelle;
+nullstelle = 13.0152;
+global skala;
+skala = 1 / nullstelle;
+phisteps = 628;
+phistep = 2 * pi / phisteps;
+rsteps = 200;
+rstep = 1 / rsteps;
+
+fn = fopen("membran.inc", "w");
+fprintf(fn, "#macro flaeche()\n");
+
+function retval = punkt(fn, phi, r, n)
+ global nullstelle;
+ global skala;
+ global A;
+ fprintf(fn, "\n\t <%.4f, %.4f, %.4f>",
+ r * cos(phi),
+ A * besselj(n, nullstelle * r) * cos(n * phi),
+ r * sin(phi)
+ );
+endfunction
+
+for i = (0:phisteps)
+ phi = i * phistep;
+ r = rstep;
+ fprintf(fn, "\ttriangle {");
+ punkt(fn, 0, 0, n); fprintf(fn, ",");
+ punkt(fn, phi, rstep, n); fprintf(fn, ",");
+ punkt(fn, phi+phistep, rstep, n);
+ fprintf(fn, "\n\t}\n");
+
+ for j = (1:rsteps-1)
+ r = j * rstep;
+ fprintf(fn, "\ttriangle {");
+ punkt(fn, phi, r, n); fprintf(fn, ",");
+ punkt(fn, phi+phistep, r, n); fprintf(fn, ",");
+ punkt(fn, phi+phistep, r+rstep, n);
+ fprintf(fn, "\n\t}\n");
+ fprintf(fn, "\ttriangle {");
+ punkt(fn, phi, r, n); fprintf(fn, ",");
+ punkt(fn, phi+phistep, r+rstep, n); fprintf(fn, ",");
+ punkt(fn, phi, r+rstep, n);
+ fprintf(fn, "\n\t}\n");
+ end
+end
+
+fprintf(fn, "#end\n");
+
+function retval = ring(fn, r, n)
+ phisteps = 100;
+ phistep = 2 * pi / phisteps;
+ for i = (1:phisteps)
+ phi = phistep * i;
+ fprintf(fn, "\tcylinder {");
+ punkt(fn, phi - phistep, r, n); fprintf(fn, ",");
+ punkt(fn, phi, r, n); fprintf(fn, ",");
+ fprintf(fn, "\n\t r");
+ fprintf(fn, "\n\t}\n")
+ fprintf(fn, "\tsphere {");
+ punkt(fn, phi - phistep, r, n); fprintf(fn, ",");
+ fprintf(fn, "\n\t r");
+ fprintf(fn, "\n\t}\n")
+ end
+end
+
+function retval = radius(fn, phi, n)
+ rsteps = 100;
+ rstep = 1 / rsteps;
+ for i = (0:rsteps-1)
+ r = i * rstep;
+ fprintf(fn, "\tcylinder {");
+ punkt(fn, phi, r, n); fprintf(fn, ",");
+ punkt(fn, phi, r+rstep, n); fprintf(fn, ",");
+ fprintf(fn, "\n\t r");
+ fprintf(fn, "\n\t}\n")
+ fprintf(fn, "\tsphere {");
+ punkt(fn, phi, r, n); fprintf(fn, ",");
+ fprintf(fn, "\n\t r");
+ fprintf(fn, "\n\t}\n")
+ end
+end
+
+fprintf(fn, "#macro phigitter()\n");
+rsteps = 20;
+rstep = 1 / rsteps;
+for j = (1:rsteps-1)
+ ring(fn, rstep * j, n);
+end
+fprintf(fn, "#end\n");
+
+fprintf(fn, "#macro rgitter()\n");
+phisteps = 72;
+phistep = 2 * pi / phisteps;
+for i = (0:phisteps-1)
+ radius(fn, phistep * i, n);
+end
+fprintf(fn, "#end\n");
+
+fclose(fn);
diff --git a/buch/chapters/090-pde/membran/membran.png b/buch/chapters/090-pde/membran/membran.png
new file mode 100644
index 0000000..154a4a7
--- /dev/null
+++ b/buch/chapters/090-pde/membran/membran.png
Binary files differ
diff --git a/buch/chapters/090-pde/membran/membran.pov b/buch/chapters/090-pde/membran/membran.pov
new file mode 100644
index 0000000..d64294f
--- /dev/null
+++ b/buch/chapters/090-pde/membran/membran.pov
@@ -0,0 +1,163 @@
+//
+// membran.pov
+//
+// (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+//
+#version 3.7;
+#include "colors.inc"
+#include "math.inc"
+#include "membran.inc"
+
+global_settings {
+ assumed_gamma 1
+}
+
+#declare imagescale = 0.037;
+
+camera {
+ location <-33, 20, 50>
+ look_at <0, -0.005, 0>
+ right x * imagescale
+ up (9/32) * y * imagescale
+}
+
+background { color rgbt <0,0,0,1> }
+
+light_source {
+ <10, 15, 40> color White
+ area_light <1,0,0> <0,0,1>, 10, 10
+ adaptive 1
+ jitter
+}
+
+//sky_sphere {
+// pigment {
+// color rgb<1,1,1>
+// }
+//}
+
+//
+// draw an arrow from <from> to <to> with thickness <arrowthickness> with
+// color <c>
+//
+#macro arrow(from, to, arrowthickness, c)
+#declare arrowdirection = vnormalize(to - from);
+#declare arrowlength = vlength(to - from);
+union {
+ sphere {
+ from, 1.1 * arrowthickness
+ }
+ cylinder {
+ from,
+ from + (arrowlength - 5 * arrowthickness) * arrowdirection,
+ arrowthickness
+ }
+ cone {
+ from + (arrowlength - 5 * arrowthickness) * arrowdirection,
+ 2 * arrowthickness,
+ to,
+ 0
+ }
+ pigment {
+ color c
+ }
+ finish {
+ specular 0.9
+ metallic
+ }
+}
+#end
+
+//arrow(<-1.1,0,0>, <1.1,0,0>, 0.01, White)
+//arrow(<0,-1.1,0>, <0,1.1,0>, 0.01, White)
+//arrow(<0,0,-1.1>, <0,0,1.1>, 0.01, White)
+
+mesh {
+ flaeche()
+ pigment {
+ color rgb<0.8,0.8,0.8> * 1.2
+ }
+ finish {
+ specular 0.95
+ metallic
+ }
+}
+
+#declare randr = 0.01;
+
+#macro zylinder(k,n,r)
+ cylinder {
+ < cos((2*k+1)*pi/(2*n)), 0, sin((2*k+1)*pi/(2*n)) >,
+ < -cos((2*k+1)*pi/(2*n)), 0, -sin((2*k+1)*pi/(2*n)) >,
+ r
+ }
+#end
+
+#macro ring(R,r)
+ #declare phisteps = 100;
+ #declare phistep = 2 * pi / 100;
+ #declare phimin = 0;
+ #declare phimax = 2 * pi;
+ #declare phi = phimin;
+ #while (phi < phimax - phistep/2)
+ cylinder {
+ <R*cos(phi), 0, R*sin(phi)>,
+ <R*cos(phi+phistep), 0, R*sin(phi+phistep)>,
+ r
+ }
+ sphere {
+ <R*cos(phi), 0, R*sin(phi)>, r
+ }
+ #declare phi = phi + phistep;
+ #end
+#end
+
+#declare nullstelle = 13.0152;
+
+union {
+ ring(1, randr)
+ pigment {
+ color rgb<1.0,0.8,0.6>
+ }
+ finish {
+ specular 0.95
+ metallic
+ }
+}
+
+union {
+ zylinder(0, 3, 0.5*randr)
+ zylinder(1, 3, 0.5*randr)
+ zylinder(2, 3, 0.5*randr)
+ ring(6.3802/nullstelle, 0.5*randr)
+ ring(9.7610/nullstelle, 0.5*randr)
+ pigment {
+ color rgb<1.0,0.8,0.6>
+ }
+ finish {
+ specular 0.95
+ metallic
+ }
+}
+
+#declare r = 0.2*randr;
+union {
+ phigitter()
+ pigment {
+ color rgb<0.2,0.6,1.0>
+ }
+ finish {
+ specular 0.95
+ metallic
+ }
+}
+union {
+ rgitter()
+ pigment {
+ color rgb<1.0,0.4,0.6>
+ }
+ finish {
+ specular 0.95
+ metallic
+ }
+}