From d80e30b37d3b51fc4d47229fb3e88610fbc7a476 Mon Sep 17 00:00:00 2001 From: haddoucher Date: Mon, 22 Aug 2022 14:43:20 +0200 Subject: neuste Version --- buch/papers/kugel/Makefile | 3 +- buch/papers/kugel/figures/flux.pdf | Bin 0 -> 345665 bytes buch/papers/kugel/figures/povray/Makefile | 30 ++ buch/papers/kugel/figures/povray/curvature.jpg | Bin 0 -> 265649 bytes buch/papers/kugel/figures/povray/curvature.maxima | 6 + buch/papers/kugel/figures/povray/curvature.png | Bin 0 -> 590402 bytes buch/papers/kugel/figures/povray/curvature.pov | 139 ++++++ buch/papers/kugel/figures/povray/curvgraph.m | 140 ++++++ buch/papers/kugel/figures/povray/spherecurve.cpp | 292 ++++++++++++ buch/papers/kugel/figures/povray/spherecurve.jpg | Bin 0 -> 171287 bytes buch/papers/kugel/figures/povray/spherecurve.m | 160 +++++++ .../papers/kugel/figures/povray/spherecurve.maxima | 13 + buch/papers/kugel/figures/povray/spherecurve.png | Bin 0 -> 423490 bytes buch/papers/kugel/figures/povray/spherecurve.pov | 73 +++ buch/papers/kugel/figures/tikz/Makefile | 12 + buch/papers/kugel/figures/tikz/curvature-1d.dat | 500 +++++++++++++++++++++ buch/papers/kugel/figures/tikz/curvature-1d.pdf | Bin 0 -> 15387 bytes buch/papers/kugel/figures/tikz/curvature-1d.py | 32 ++ buch/papers/kugel/figures/tikz/curvature-1d.tex | 21 + .../kugel/figures/tikz/spherical-coordinates.pdf | Bin 0 -> 40319 bytes .../kugel/figures/tikz/spherical-coordinates.tex | 99 ++++ buch/papers/kugel/images/Makefile | 30 -- buch/papers/kugel/images/curvature.maxima | 6 - buch/papers/kugel/images/curvature.pov | 139 ------ buch/papers/kugel/images/curvgraph.m | 140 ------ buch/papers/kugel/images/spherecurve.cpp | 292 ------------ buch/papers/kugel/images/spherecurve.m | 160 ------- buch/papers/kugel/images/spherecurve.maxima | 13 - buch/papers/kugel/images/spherecurve.pov | 73 --- buch/papers/kugel/main.tex | 1 + buch/papers/kugel/packages.tex | 10 + buch/papers/kugel/preliminaries.tex | 8 +- buch/papers/kugel/proofs.tex | 245 ++++++++++ buch/papers/kugel/references.bib | 11 + buch/papers/kugel/spherical-harmonics.tex | 407 ++++++++++++++++- 35 files changed, 2192 insertions(+), 863 deletions(-) create mode 100644 buch/papers/kugel/figures/flux.pdf create mode 100644 buch/papers/kugel/figures/povray/Makefile create mode 100644 buch/papers/kugel/figures/povray/curvature.jpg create mode 100644 buch/papers/kugel/figures/povray/curvature.maxima create mode 100644 buch/papers/kugel/figures/povray/curvature.png create mode 100644 buch/papers/kugel/figures/povray/curvature.pov create mode 100644 buch/papers/kugel/figures/povray/curvgraph.m create mode 100644 buch/papers/kugel/figures/povray/spherecurve.cpp create mode 100644 buch/papers/kugel/figures/povray/spherecurve.jpg create mode 100644 buch/papers/kugel/figures/povray/spherecurve.m create mode 100644 buch/papers/kugel/figures/povray/spherecurve.maxima create mode 100644 buch/papers/kugel/figures/povray/spherecurve.png create mode 100644 buch/papers/kugel/figures/povray/spherecurve.pov create mode 100644 buch/papers/kugel/figures/tikz/Makefile create mode 100644 buch/papers/kugel/figures/tikz/curvature-1d.dat create mode 100644 buch/papers/kugel/figures/tikz/curvature-1d.pdf create mode 100644 buch/papers/kugel/figures/tikz/curvature-1d.py create mode 100644 buch/papers/kugel/figures/tikz/curvature-1d.tex create mode 100644 buch/papers/kugel/figures/tikz/spherical-coordinates.pdf create mode 100644 buch/papers/kugel/figures/tikz/spherical-coordinates.tex delete mode 100644 buch/papers/kugel/images/Makefile delete mode 100644 buch/papers/kugel/images/curvature.maxima delete mode 100644 buch/papers/kugel/images/curvature.pov delete mode 100644 buch/papers/kugel/images/curvgraph.m delete mode 100644 buch/papers/kugel/images/spherecurve.cpp delete mode 100644 buch/papers/kugel/images/spherecurve.m delete mode 100644 buch/papers/kugel/images/spherecurve.maxima delete mode 100644 buch/papers/kugel/images/spherecurve.pov create mode 100644 buch/papers/kugel/proofs.tex (limited to 'buch/papers/kugel') diff --git a/buch/papers/kugel/Makefile b/buch/papers/kugel/Makefile index f798a55..995206b 100644 --- a/buch/papers/kugel/Makefile +++ b/buch/papers/kugel/Makefile @@ -5,5 +5,6 @@ # images: - @echo "no images to be created in kugel" + $(MAKE) -C ./figures/povray/ + $(MAKE) -C ./figures/tikz/ diff --git a/buch/papers/kugel/figures/flux.pdf b/buch/papers/kugel/figures/flux.pdf new file mode 100644 index 0000000..6a87288 Binary files /dev/null and b/buch/papers/kugel/figures/flux.pdf differ diff --git a/buch/papers/kugel/figures/povray/Makefile b/buch/papers/kugel/figures/povray/Makefile new file mode 100644 index 0000000..4226dab --- /dev/null +++ b/buch/papers/kugel/figures/povray/Makefile @@ -0,0 +1,30 @@ +# +# Makefile -- build images +# +# (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +# +all: curvature.jpg spherecurve.jpg + +curvature.inc: curvgraph.m + octave curvgraph.m + +curvature.png: curvature.pov curvature.inc + povray +A0.1 +W1920 +H1080 +Ocurvature.png curvature.pov + +curvature.jpg: curvature.png + convert curvature.png -density 300 -units PixelsPerInch curvature.jpg + +spherecurve2.inc: spherecurve.m + octave spherecurve.m + +spherecurve.png: spherecurve.pov spherecurve.inc + povray +A0.1 +W1080 +H1080 +Ospherecurve.png spherecurve.pov + +spherecurve.jpg: spherecurve.png + convert spherecurve.png -density 300 -units PixelsPerInch spherecurve.jpg + +spherecurve: spherecurve.cpp + g++ -o spherecurve -g -Wall -O spherecurve.cpp + +spherecurve.inc: spherecurve + ./spherecurve diff --git a/buch/papers/kugel/figures/povray/curvature.jpg b/buch/papers/kugel/figures/povray/curvature.jpg new file mode 100644 index 0000000..6448966 Binary files /dev/null and b/buch/papers/kugel/figures/povray/curvature.jpg differ diff --git a/buch/papers/kugel/figures/povray/curvature.maxima b/buch/papers/kugel/figures/povray/curvature.maxima new file mode 100644 index 0000000..6313642 --- /dev/null +++ b/buch/papers/kugel/figures/povray/curvature.maxima @@ -0,0 +1,6 @@ + +f: exp(-r^2/sigma^2)/sigma; +laplacef: ratsimp(diff(r * diff(f,r), r) / r); +f: exp(-r^2/(2*sigma^2))/(sqrt(2)*sigma); +laplacef: ratsimp(diff(r * diff(f,r), r) / r); + diff --git a/buch/papers/kugel/figures/povray/curvature.png b/buch/papers/kugel/figures/povray/curvature.png new file mode 100644 index 0000000..20268f2 Binary files /dev/null and b/buch/papers/kugel/figures/povray/curvature.png differ diff --git a/buch/papers/kugel/figures/povray/curvature.pov b/buch/papers/kugel/figures/povray/curvature.pov new file mode 100644 index 0000000..3b15d77 --- /dev/null +++ b/buch/papers/kugel/figures/povray/curvature.pov @@ -0,0 +1,139 @@ +// +// curvature.pov +// +// (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +// + +#version 3.7; +#include "colors.inc" + +global_settings { + assumed_gamma 1 +} + +#declare imagescale = 0.09; + +camera { + location <10, 10, -40> + look_at <0, 0, 0> + right 16/9 * x * imagescale + up y * imagescale +} + +light_source { + <-10, 10, -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 to with thickness with +// color +// +#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(<-3.1,0,0>, <3.1,0,0>, 0.01, White) +arrow(<0,-1,0>, <0,1,0>, 0.01, White) +arrow(<0,0,-2.1>, <0,0,2.1>, 0.01, White) + +#include "curvature.inc" + +#declare sigma = 1; +#declare s = 1.4; +#declare N0 = 0.4; +#declare funktion = function(r) { + (exp(-r*r/(sigma*sigma)) / sigma + - + exp(-r*r/(2*sigma*sigma)) / (sqrt(2)*sigma)) / N0 +}; +#declare hypot = function(xx, yy) { sqrt(xx*xx+yy*yy) }; + +#declare Funktion = function(x,y) { funktion(hypot(x+s,y)) - funktion(hypot(x-s,y)) }; +#macro punkt(xx,yy) + +#end + +#declare griddiameter = 0.006; +union { + #declare xmin = -3; + #declare xmax = 3; + #declare ymin = -2; + #declare ymax = 2; + + + #declare xstep = 0.2; + #declare ystep = 0.02; + #declare xx = xmin; + #while (xx < xmax + xstep/2) + #declare yy = ymin; + #declare P = punkt(xx, yy); + #while (yy < ymax - ystep/2) + #declare yy = yy + ystep; + #declare Q = punkt(xx, yy); + sphere { P, griddiameter } + cylinder { P, Q, griddiameter } + #declare P = Q; + #end + sphere { P, griddiameter } + #declare xx = xx + xstep; + #end + + #declare xstep = 0.02; + #declare ystep = 0.2; + #declare yy = ymin; + #while (yy < ymax + ystep/2) + #declare xx = xmin; + #declare P = punkt(xx, yy); + #while (xx < xmax - xstep/2) + #declare xx = xx + xstep; + #declare Q = punkt(xx, yy); + sphere { P, griddiameter } + cylinder { P, Q, griddiameter } + #declare P = Q; + #end + sphere { P, griddiameter } + #declare yy = yy + ystep; + #end + + pigment { + color rgb<0.8,0.8,0.8> + } + finish { + metallic + specular 0.8 + } +} + diff --git a/buch/papers/kugel/figures/povray/curvgraph.m b/buch/papers/kugel/figures/povray/curvgraph.m new file mode 100644 index 0000000..75effd6 --- /dev/null +++ b/buch/papers/kugel/figures/povray/curvgraph.m @@ -0,0 +1,140 @@ +# +# curvature.m +# +# (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +# + +global N; +N = 10; + +global sigma2; +sigma2 = 1; + +global s; +s = 1.4; + +global cmax; +cmax = 0.9; +global cmin; +cmin = -0.9; + +global Cmax; +global Cmin; +Cmax = 0; +Cmin = 0; + +xmin = -3; +xmax = 3; +xsteps = 200; +hx = (xmax - xmin) / xsteps; + +ymin = -2; +ymax = 2; +ysteps = 200; +hy = (ymax - ymin) / ysteps; + +function retval = f0(r) + global sigma2; + retval = exp(-r^2/sigma2)/sqrt(sigma2) - exp(-r^2/(2*sigma2))/(sqrt(2*sigma2)); +end + +global N0; +N0 = f0(0) +N0 = 0.4; + +function retval = f1(x,y) + global N0; + retval = f0(hypot(x, y)) / N0; +endfunction + +function retval = f(x, y) + global s; + retval = f1(x+s, y) - f1(x-s, y); +endfunction + +function retval = curvature0(r) + global sigma2; + retval = ( + -4*(sigma2-r^2)*exp(-r^2/sigma2) + + + (2*sigma2-r^2)*exp(-r^2/(2*sigma2)) + ) / (sigma2^(5/2)); +endfunction + +function retval = curvature1(x, y) + retval = curvature0(hypot(x, y)); +endfunction + +function retval = curvature(x, y) + global s; + retval = curvature1(x+s, y) - curvature1(x-s, y); +endfunction + +function retval = farbe(x, y) + global Cmax; + global Cmin; + global cmax; + global cmin; + c = curvature(x, y); + if (c < Cmin) + Cmin = c + endif + if (c > Cmax) + Cmax = c + endif + u = (c - cmin) / (cmax - cmin); + if (u > 1) + u = 1; + endif + if (u < 0) + u = 0; + endif + color = [ u, 0.5, 1-u ]; + color = color/max(color); + color(1,4) = c/2; + retval = color; +endfunction + +function dreieck(fn, A, B, C) + fprintf(fn, "\ttriangle {\n"); + fprintf(fn, "\t <%.4f,%.4f,%.4f>,\n", A(1,1), A(1,3), A(1,2)); + fprintf(fn, "\t <%.4f,%.4f,%.4f>,\n", B(1,1), B(1,3), B(1,2)); + fprintf(fn, "\t <%.4f,%.4f,%.4f>\n", C(1,1), C(1,3), C(1,2)); + fprintf(fn, "\t}\n"); +endfunction + +function viereck(fn, punkte) + color = farbe(mean(punkte(:,1)), mean(punkte(:,2))); + fprintf(fn, " mesh {\n"); + dreieck(fn, punkte(1,:), punkte(2,:), punkte(3,:)); + dreieck(fn, punkte(2,:), punkte(3,:), punkte(4,:)); + fprintf(fn, "\tpigment { color rgb<%.4f,%.4f,%.4f> } // %.4f\n", + color(1,1), color(1,2), color(1,3), color(1,4)); + fprintf(fn, " }\n"); +endfunction + +fn = fopen("curvature.inc", "w"); +punkte = zeros(4,3); +for ix = (0:xsteps-1) + x = xmin + ix * hx; + punkte(1,1) = x; + punkte(2,1) = x; + punkte(3,1) = x + hx; + punkte(4,1) = x + hx; + for iy = (0:ysteps-1) + y = ymin + iy * hy; + punkte(1,2) = y; + punkte(2,2) = y + hy; + punkte(3,2) = y; + punkte(4,2) = y + hy; + for i = (1:4) + punkte(i,3) = f(punkte(i,1), punkte(i,2)); + endfor + viereck(fn, punkte); + end +end +#fprintf(fn, " finish { metallic specular 0.5 }\n"); +fclose(fn); + +printf("Cmax = %.4f\n", Cmax); +printf("Cmin = %.4f\n", Cmin); diff --git a/buch/papers/kugel/figures/povray/spherecurve.cpp b/buch/papers/kugel/figures/povray/spherecurve.cpp new file mode 100644 index 0000000..8ddf5e5 --- /dev/null +++ b/buch/papers/kugel/figures/povray/spherecurve.cpp @@ -0,0 +1,292 @@ +/* + * spherecurve.cpp + * + * (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule + */ +#include +#include +#include +#include +#include + +inline double sqr(double x) { return x * x; } + +/** + * \brief Class for 3d vectors (also used as colors) + */ +class vector { + double X[3]; +public: + vector() { X[0] = X[1] = X[2] = 0; } + vector(double a) { X[0] = X[1] = X[2] = a; } + vector(double x, double y, double z) { + X[0] = x; X[1] = y; X[2] = z; + } + vector(double theta, double phi) { + double s = sin(theta); + X[0] = cos(phi) * s; + X[1] = sin(phi) * s; + X[2] = cos(theta); + } + vector(const vector& other) { + for (int i = 0; i < 3; i++) { + X[i] = other.X[i]; + } + } + vector operator+(const vector& other) const { + return vector(X[0] + other.X[0], + X[1] + other.X[1], + X[2] + other.X[2]); + } + vector operator*(double l) const { + return vector(X[0] * l, X[1] * l, X[2] * l); + } + double operator*(const vector& other) const { + double s = 0; + for (int i = 0; i < 3; i++) { + s += X[i] * other.X[i]; + } + return s; + } + double norm() const { + double s = 0; + for (int i = 0; i < 3; i++) { + s += sqr(X[i]); + } + return sqrt(s); + } + vector normalize() const { + double l = norm(); + return vector(X[0]/l, X[1]/l, X[2]/l); + } + double max() const { + return std::max(X[0], std::max(X[1], X[2])); + } + double l0norm() const { + double l = 0; + for (int i = 0; i < 3; i++) { + if (fabs(X[i]) > l) { + l = fabs(X[i]); + } + } + return l; + } + vector l0normalize() const { + double l = l0norm(); + vector result(X[0]/l, X[1]/l, X[2]/l); + return result; + } + const double& operator[](int i) const { return X[i]; } + double& operator[](int i) { return X[i]; } +}; + +/** + * \brief Derived 3d vector class implementing color + * + * The constructor in this class converts a single value into a + * color on a suitable gradient. + */ +class color : public vector { +public: + static double utop; + static double ubottom; + static double green; +public: + color(double u) { + u = (u - ubottom) / (utop - ubottom); + if (u > 1) { + u = 1; + } + if (u < 0) { + u = 0; + } + u = pow(u,2); + (*this)[0] = u; + (*this)[1] = green * u * (1 - u); + (*this)[2] = 1-u; + double l = l0norm(); + for (int i = 0; i < 3; i++) { + (*this)[i] /= l; + } + } +}; + +double color::utop = 12; +double color::ubottom = -31; +double color::green = 0.5; + +/** + * \brief Surface model + * + * This class contains the definitions of the functions to plot + * and the parameters to + */ +class surfacefunction { + static vector axes[6]; + + double _a; + double _A; + + double _umin; + double _umax; +public: + double a() const { return _a; } + double A() const { return _A; } + + double umin() const { return _umin; } + double umax() const { return _umax; } + + surfacefunction(double a, double A) : _a(a), _A(A), _umin(0), _umax(0) { + } + + double f(double z) { + return A() * exp(a() * (sqr(z) - 1)); + } + + double g(double z) { + return -f(z) * 2*a() * ((2*a()*sqr(z) + (3-2*a()))*sqr(z) - 1); + } + + double F(const vector& v) { + double s = 0; + for (int i = 0; i < 6; i++) { + s += f(axes[i] * v); + } + return s / 6; + } + + double G(const vector& v) { + double s = 0; + for (int i = 0; i < 6; i++) { + s += g(axes[i] * v); + } + return s / 6; + } +protected: + color farbe(const vector& v) { + double u = G(v); + if (u < _umin) { + _umin = u; + } + if (u > _umax) { + _umax = u; + } + return color(u); + } +}; + +static double phi = (1 + sqrt(5)) / 2; +static double sl = sqrt(sqr(phi) + 1); +vector surfacefunction::axes[6] = { + vector( 0. , -1./sl, phi/sl ), + vector( 0. , 1./sl, phi/sl ), + vector( 1./sl, phi/sl, 0. ), + vector( -1./sl, phi/sl, 0. ), + vector( phi/sl, 0. , 1./sl ), + vector( -phi/sl, 0. , 1./sl ) +}; + +/** + * \brief Class to construct the plot + */ +class surface : public surfacefunction { + FILE *outfile; + + int _phisteps; + int _thetasteps; + double _hphi; + double _htheta; +public: + int phisteps() const { return _phisteps; } + int thetasteps() const { return _thetasteps; } + double hphi() const { return _hphi; } + double htheta() const { return _htheta; } + void phisteps(int s) { _phisteps = s; _hphi = 2 * M_PI / s; } + void thetasteps(int s) { _thetasteps = s; _htheta = M_PI / s; } + + surface(const std::string& filename, double a, double A) + : surfacefunction(a, A) { + outfile = fopen(filename.c_str(), "w"); + phisteps(400); + thetasteps(200); + } + + ~surface() { + fclose(outfile); + } + +private: + void triangle(const vector& v0, const vector& v1, const vector& v2) { + fprintf(outfile, " mesh {\n"); + vector c = (v0 + v1 + v2) * (1./3.); + vector color = farbe(c.normalize()); + vector V0 = v0 * (1 + F(v0)); + vector V1 = v1 * (1 + F(v1)); + vector V2 = v2 * (1 + F(v2)); + fprintf(outfile, "\ttriangle {\n"); + fprintf(outfile, "\t <%.6f,%.6f,%.6f>,\n", + V0[0], V0[2], V0[1]); + fprintf(outfile, "\t <%.6f,%.6f,%.6f>,\n", + V1[0], V1[2], V1[1]); + fprintf(outfile, "\t <%.6f,%.6f,%.6f>\n", + V2[0], V2[2], V2[1]); + fprintf(outfile, "\t}\n"); + fprintf(outfile, "\tpigment { color rgb<%.4f,%.4f,%.4f> }\n", + color[0], color[1], color[2]); + fprintf(outfile, "\tfinish { metallic specular 0.5 }\n"); + fprintf(outfile, " }\n"); + } + + void northcap() { + vector v0(0, 0, 1); + for (int i = 1; i <= phisteps(); i++) { + fprintf(outfile, " // northcap i = %d\n", i); + vector v1(htheta(), (i - 1) * hphi()); + vector v2(htheta(), i * hphi()); + triangle(v0, v1, v2); + } + } + + void southcap() { + vector v0(0, 0, -1); + for (int i = 1; i <= phisteps(); i++) { + fprintf(outfile, " // southcap i = %d\n", i); + vector v1(M_PI - htheta(), (i - 1) * hphi()); + vector v2(M_PI - htheta(), i * hphi()); + triangle(v0, v1, v2); + } + } + + void zone() { + for (int j = 1; j < thetasteps() - 1; j++) { + for (int i = 1; i <= phisteps(); i++) { + fprintf(outfile, " // zone j = %d, i = %d\n", + j, i); + vector v0( j * htheta(), (i-1) * hphi()); + vector v1((j+1) * htheta(), (i-1) * hphi()); + vector v2( j * htheta(), i * hphi()); + vector v3((j+1) * htheta(), i * hphi()); + triangle(v0, v1, v2); + triangle(v1, v2, v3); + } + } + } +public: + void draw() { + northcap(); + southcap(); + zone(); + } +}; + +/** + * \brief main function + */ +int main(int argc, char *argv[]) { + surface S("spherecurve.inc", 5, 10); + color::green = 1.0; + S.draw(); + std::cout << "umin: " << S.umin() << std::endl; + std::cout << "umax: " << S.umax() << std::endl; + return EXIT_SUCCESS; +} diff --git a/buch/papers/kugel/figures/povray/spherecurve.jpg b/buch/papers/kugel/figures/povray/spherecurve.jpg new file mode 100644 index 0000000..cd2e7c8 Binary files /dev/null and b/buch/papers/kugel/figures/povray/spherecurve.jpg differ diff --git a/buch/papers/kugel/figures/povray/spherecurve.m b/buch/papers/kugel/figures/povray/spherecurve.m new file mode 100644 index 0000000..99d5c9a --- /dev/null +++ b/buch/papers/kugel/figures/povray/spherecurve.m @@ -0,0 +1,160 @@ +# +# spherecurve.m +# +# (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +# +global a; +a = 5; +global A; +A = 10; + +phisteps = 400; +hphi = 2 * pi / phisteps; +thetasteps = 200; +htheta = pi / thetasteps; + +function retval = f(z) + global a; + global A; + retval = A * exp(a * (z^2 - 1)); +endfunction + +function retval = g(z) + global a; + retval = -f(z) * 2 * a * (2 * a * z^4 + (3 - 2*a) * z^2 - 1); + # 2 + # - a 2 4 2 2 a z + #(%o6) - %e (4 a z + (6 a - 4 a ) z - 2 a) %e +endfunction + +phi = (1 + sqrt(5)) / 2; + +global axes; +axes = [ + 0, 0, 1, -1, phi, -phi; + 1, -1, phi, phi, 0, 0; + phi, phi, 0, 0, 1, 1; +]; +axes = axes / (sqrt(phi^2+1)); + +function retval = kugel(theta, phi) + retval = [ + cos(phi) * sin(theta); + sin(phi) * sin(theta); + cos(theta) + ]; +endfunction + +function retval = F(v) + global axes; + s = 0; + for i = (1:6) + z = axes(:,i)' * v; + s = s + f(z); + endfor + retval = s / 6; +endfunction + +function retval = F2(theta, phi) + v = kugel(theta, phi); + retval = F(v); +endfunction + +function retval = G(v) + global axes; + s = 0; + for i = (1:6) + s = s + g(axes(:,i)' * v); + endfor + retval = s / 6; +endfunction + +function retval = G2(theta, phi) + v = kugel(theta, phi); + retval = G(v); +endfunction + +function retval = cnormalize(u) + utop = 11; + ubottom = -30; + retval = (u - ubottom) / (utop - ubottom); + if (retval > 1) + retval = 1; + endif + if (retval < 0) + retval = 0; + endif +endfunction + +global umin; +umin = 0; +global umax; +umax = 0; + +function color = farbe(v) + global umin; + global umax; + u = G(v); + if (u < umin) + umin = u; + endif + if (u > umax) + umax = u; + endif + u = cnormalize(u); + color = [ u, 0.5, 1-u ]; + color = color/max(color); +endfunction + +function dreieck(fn, v0, v1, v2) + fprintf(fn, " mesh {\n"); + c = (v0 + v1 + v2) / 3; + c = c / norm(c); + color = farbe(c); + v0 = v0 * (1 + F(v0)); + v1 = v1 * (1 + F(v1)); + v2 = v2 * (1 + F(v2)); + fprintf(fn, "\ttriangle {\n"); + fprintf(fn, "\t <%.6f,%.6f,%.6f>,\n", v0(1,1), v0(3,1), v0(2,1)); + fprintf(fn, "\t <%.6f,%.6f,%.6f>,\n", v1(1,1), v1(3,1), v1(2,1)); + fprintf(fn, "\t <%.6f,%.6f,%.6f>\n", v2(1,1), v2(3,1), v2(2,1)); + fprintf(fn, "\t}\n"); + fprintf(fn, "\tpigment { color rgb<%.4f,%.4f,%.4f> }\n", + color(1,1), color(1,2), color(1,3)); + fprintf(fn, "\tfinish { metallic specular 0.5 }\n"); + fprintf(fn, " }\n"); +endfunction + +fn = fopen("spherecurve2.inc", "w"); + + for i = (1:phisteps) + # Polkappe nord + v0 = [ 0; 0; 1 ]; + v1 = kugel(htheta, (i-1) * hphi); + v2 = kugel(htheta, i * hphi); + fprintf(fn, " // i = %d\n", i); + dreieck(fn, v0, v1, v2); + + # Polkappe sued + v0 = [ 0; 0; -1 ]; + v1 = kugel(pi-htheta, (i-1) * hphi); + v2 = kugel(pi-htheta, i * hphi); + dreieck(fn, v0, v1, v2); + endfor + + for j = (1:thetasteps-2) + for i = (1:phisteps) + v0 = kugel( j * htheta, (i-1) * hphi); + v1 = kugel((j+1) * htheta, (i-1) * hphi); + v2 = kugel( j * htheta, i * hphi); + v3 = kugel((j+1) * htheta, i * hphi); + fprintf(fn, " // i = %d, j = %d\n", i, j); + dreieck(fn, v0, v1, v2); + dreieck(fn, v1, v2, v3); + endfor + endfor + +fclose(fn); + +umin +umax diff --git a/buch/papers/kugel/figures/povray/spherecurve.maxima b/buch/papers/kugel/figures/povray/spherecurve.maxima new file mode 100644 index 0000000..1e9077c --- /dev/null +++ b/buch/papers/kugel/figures/povray/spherecurve.maxima @@ -0,0 +1,13 @@ +/* + * spherecurv.maxima + * + * (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule + */ +f: exp(-a * sin(theta)^2); + +g: ratsimp(diff(sin(theta) * diff(f, theta), theta)/sin(theta)); +g: subst(z, cos(theta), g); +g: subst(sqrt(1-z^2), sin(theta), g); +ratsimp(g); + +f: ratsimp(subst(sqrt(1-z^2), sin(theta), f)); diff --git a/buch/papers/kugel/figures/povray/spherecurve.png b/buch/papers/kugel/figures/povray/spherecurve.png new file mode 100644 index 0000000..ff24371 Binary files /dev/null and b/buch/papers/kugel/figures/povray/spherecurve.png differ diff --git a/buch/papers/kugel/figures/povray/spherecurve.pov b/buch/papers/kugel/figures/povray/spherecurve.pov new file mode 100644 index 0000000..b1bf4b8 --- /dev/null +++ b/buch/papers/kugel/figures/povray/spherecurve.pov @@ -0,0 +1,73 @@ +// +// curvature.pov +// +// (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +// + +#version 3.7; +#include "colors.inc" + +global_settings { + assumed_gamma 1 +} + +#declare imagescale = 0.13; + +camera { + location <10, 10, -40> + look_at <0, 0, 0> + right x * imagescale + up y * imagescale +} + +light_source { + <-10, 10, -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 to with thickness with +// color +// +#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(<-2.7,0,0>, <2.7,0,0>, 0.03, White) +arrow(<0,-2.7,0>, <0,2.7,0>, 0.03, White) +arrow(<0,0,-2.7>, <0,0,2.7>, 0.03, White) + +#include "spherecurve.inc" + diff --git a/buch/papers/kugel/figures/tikz/Makefile b/buch/papers/kugel/figures/tikz/Makefile new file mode 100644 index 0000000..4ec4e5a --- /dev/null +++ b/buch/papers/kugel/figures/tikz/Makefile @@ -0,0 +1,12 @@ +FIGURES := spherical-coordinates.pdf curvature-1d.pdf + +all: $(FIGURES) + +%.pdf: %.tex + pdflatex $< + +curvature-1d.pdf: curvature-1d.tex curvature-1d.dat + pdflatex curvature-1d.tex + +curvature-1d.dat: curvature-1d.py + python3 $< diff --git a/buch/papers/kugel/figures/tikz/curvature-1d.dat b/buch/papers/kugel/figures/tikz/curvature-1d.dat new file mode 100644 index 0000000..6622398 --- /dev/null +++ b/buch/papers/kugel/figures/tikz/curvature-1d.dat @@ -0,0 +1,500 @@ +0.000000000000000000e+00 1.000000000000000000e+00 5.000007286987066095e+02 +2.004008016032064049e-02 1.025056790958151831e+00 4.899813296957295279e+02 +4.008016032064128098e-02 1.050121598724190752e+00 4.799659543969494848e+02 +6.012024048096192147e-02 1.075186379145250948e+00 4.699586248906784931e+02 +8.016032064128256196e-02 1.100243094530689136e+00 4.599633600341078932e+02 +1.002004008016031955e-01 1.125283716879951434e+00 4.499841738393695891e+02 +1.202404809619238429e-01 1.150300231106550664e+00 4.400250738615438877e+02 +1.402805611222444904e-01 1.175284638256853809e+00 4.300900595892592833e+02 +1.603206412825651239e-01 1.200228958722394657e+00 4.201831208385332275e+02 +1.803607214428857575e-01 1.225125235444413541e+00 4.103082361504954747e+02 +2.004008016032063910e-01 1.249965537109345881e+00 4.004693711936409954e+02 +2.204408817635270523e-01 1.274741961333968554e+00 3.906704771712513775e+02 +2.404809619238476859e-01 1.299446637838927776e+00 3.809154892346260795e+02 +2.605210420841683194e-01 1.324071731609375302e+00 3.712083249027585907e+02 +2.805611222444889807e-01 1.348609446041445725e+00 3.615528824890962483e+02 +3.006012024048095865e-01 1.373052026073301457e+00 3.519530395360096122e+02 +3.206412825651302478e-01 1.397391761299501045e+00 3.424126512576057166e+02 +3.406813627254509091e-01 1.421620989067430063e+00 3.329355489915074031e+02 +3.607214428857715149e-01 1.445732097554558448e+00 3.235255386602207750e+02 +3.807615230460921762e-01 1.469717528825280173e+00 3.141863992427096832e+02 +4.008016032064127820e-01 1.493569781866116220e+00 3.049218812567906411e+02 +4.208416833667334433e-01 1.517281415598057848e+00 2.957357052529569614e+02 +4.408817635270541047e-01 1.540845051864837556e+00 2.866315603202378384e+02 +4.609218436873747105e-01 1.564253378395934257e+00 2.776131026046919601e+02 +4.809619238476953718e-01 1.587499151743118286e+00 2.686839538411309150e+02 +5.010020040080159776e-01 1.610575200189357625e+00 2.598476998986618582e+02 +5.210420841683366389e-01 1.633474426628916509e+00 2.511078893406329655e+02 +5.410821643286573002e-01 1.656189811417493107e+00 2.424680319995614752e+02 +5.611222444889779615e-01 1.678714415191247422e+00 2.339315975676150003e+02 +5.811623246492986228e-01 1.701041381653590534e+00 2.255020142032130082e+02 +6.012024048096191731e-01 1.723163940328612753e+00 2.171826671543084046e+02 +6.212424849699398344e-01 1.745075409280051337e+00 2.089768973989005474e+02 +6.412825651302604957e-01 1.766769197794693991e+00 2.008880003033277433e+02 +6.613226452905811570e-01 1.788238809029157217e+00 1.929192242988764008e+02 +6.813627254509018183e-01 1.809477842618958832e+00 1.850737695772391760e+02 +7.014028056112223686e-01 1.830479997248850577e+00 1.773547868053454408e+02 +7.214428857715430299e-01 1.851239073183373218e+00 1.697653758600805816e+02 +7.414829659318636912e-01 1.871748974756613837e+00 1.623085845834024497e+02 +7.615230460921843525e-01 1.892003712820175432e+00 1.549874075583541639e+02 +7.815631262525050138e-01 1.911997407148365635e+00 1.478047849064652723e+02 +8.016032064128255641e-01 1.931724288799645972e+00 1.407636011070246695e+02 +8.216432865731462254e-01 1.951178702433387091e+00 1.338666838386980942e+02 +8.416833667334668867e-01 1.970355108581006931e+00 1.271168028439571600e+02 +8.617234468937875480e-01 1.989248085870571892e+00 1.205166688167746969e+02 +8.817635270541082093e-01 2.007852333203973494e+00 1.140689323140332476e+02 +9.018036072144288706e-01 2.026162671885804123e+00 1.077761826910842018e+02 +9.218436873747494209e-01 2.044174047703075203e+00 1.016409470618853419e+02 +9.418837675350700822e-01 2.061881532954947804e+00 9.566568928413349227e+01 +9.619238476953907435e-01 2.079280328431652780e+00 8.985280896980044929e+01 +9.819639278557114048e-01 2.096365765341811738e+00 8.420464052146976996e+01 +1.002004008016031955e+00 2.113133307187384347e+00 7.872345219486057033e+01 +1.022044088176352616e+00 2.129578551585488810e+00 7.341144518791566043e+01 +1.042084168336673278e+00 2.145697232036356539e+00 6.827075275681968947e+01 +1.062124248496993939e+00 2.161485219636723798e+00 6.330343935930140020e+01 +1.082164328657314600e+00 2.176938524737964453e+00 5.851149982556578522e+01 +1.102204408817635262e+00 2.192053298548298113e+00 5.389685855718687435e+01 +1.122244488977955923e+00 2.206825834678430187e+00 4.946136875428519630e+01 +1.142284569138276584e+00 2.221252570630007028e+00 4.520681167129833966e+01 +1.162324649298597246e+00 2.235330089226285288e+00 4.113489590164444110e+01 +1.182364729458917685e+00 2.249055119984439521e+00 3.724725669156617869e+01 +1.202404809619238346e+00 2.262424540428958686e+00 3.354545528342948302e+01 +1.222444889779559007e+00 2.275435377345608856e+00 3.003097828874255271e+01 +1.242484969939879669e+00 2.288084807975446999e+00 2.670523709114522859e+01 +1.262525050100200330e+00 2.300370161148418191e+00 2.356956727960955078e+01 +1.282565130260520991e+00 2.312288918356074419e+00 2.062522811207871243e+01 +1.302605210420841653e+00 2.323838714762985536e+00 1.787340200976009186e+01 +1.322645290581162314e+00 2.335017340156437360e+00 1.531519408227492640e+01 +1.342685370741482975e+00 2.345822739834032333e+00 1.295163168385587404e+01 +1.362725450901803637e+00 2.356253015428841913e+00 1.078366400077049292e+01 +1.382765531062124298e+00 2.366306425671775404e+00 8.812161670136093861e+00 +1.402805611222444737e+00 2.375981387090854824e+00 7.037916430279492097e+00 +1.422845691382765398e+00 2.385276474647127998e+00 5.461640802781636772e+00 +1.442885771543086060e+00 2.394190422306948562e+00 4.083967806335150996e+00 +1.462925851703406721e+00 2.402722123550405264e+00 2.905450702529595031e+00 +1.482965931863727382e+00 2.410870631815691834e+00 1.926562773666154138e+00 +1.503006012024048044e+00 2.418635160879236246e+00 1.147697132691613664e+00 +1.523046092184368705e+00 2.426015085171442820e+00 5.691665653277303560e-01 +1.543086172344689366e+00 2.433009940027915263e+00 1.912034044591185422e-01 +1.563126252505010028e+00 2.439619421876060734e+00 1.395943683027547552e-02 +1.583166332665330689e+00 2.445843388357002546e+00 3.750584208938356756e-02 +1.603206412825651128e+00 2.451681858382752210e+00 2.618331642032580286e-01 +1.623246492985971789e+00 2.457135012128611962e+00 6.868513152547650602e-01 +1.643286573146292451e+00 2.462203190960818411e+00 1.312389611621266550e+00 +1.663326653306613112e+00 2.466886897299453096e+00 2.138196842519770602e+00 +1.683366733466933773e+00 2.471186794416676769e+00 3.163941370891084848e+00 +1.703406813627254435e+00 2.475103706170361573e+00 4.389211266582178084e+00 +1.723446893787575096e+00 2.478638616673238371e+00 5.813514471774004377e+00 +1.743486973947895757e+00 2.481792669897687542e+00 7.436278998587575018e+00 +1.763527054108216419e+00 2.484567169216326032e+00 9.256853158789395408e+00 +1.783567134268537080e+00 2.486963576878586935e+00 1.127450582550371472e+01 +1.803607214428857741e+00 2.488983513423490557e+00 1.348842672682692978e+01 +1.823647294589178181e+00 2.490628757028852114e+00 1.589772677122579658e+01 +1.843687374749498842e+00 2.491901242797179172e+00 1.850143840458866151e+01 +1.863727454909819503e+00 2.492803061978552392e+00 2.129851599878729118e+01 +1.883767535070140164e+00 2.493336461130795989e+00 2.428783627159159408e+01 +1.903807615230460826e+00 2.493503841217282080e+00 2.746819873777046439e+01 +1.923847695390781487e+00 2.493307756642720641e+00 3.083832619119621654e+01 +1.943887775551102148e+00 2.492750914227336079e+00 3.439686521775931283e+01 +1.963927855711422810e+00 2.491836172119830994e+00 3.814238673888808506e+01 +1.983967935871743471e+00 2.490566538649576334e+00 4.207338658545420174e+01 +2.004008016032063910e+00 2.488945171118494670e+00 4.618828610183413019e+01 +2.024048096192384794e+00 2.486975374533113126e+00 5.048543277988349587e+01 +2.044088176352705233e+00 2.484660600277302400e+00 5.496310092257003532e+01 +2.064128256513026116e+00 2.482004444726231274e+00 5.961949233699898087e+01 +2.084168336673346555e+00 2.479010647802090794e+00 6.445273705655124274e+01 +2.104208416833667439e+00 2.475683091472176578e+00 6.946089409184656915e+01 +2.124248496993987878e+00 2.472025798189923851e+00 7.464195221022733051e+01 +2.144288577154308317e+00 2.468042929279522735e+00 7.999383074345310263e+01 +2.164328657314629201e+00 2.463738783264768806e+00 8.551438042327842481e+01 +2.184368737474949640e+00 2.459117794142811952e+00 9.120138424458035331e+01 +2.204408817635270523e+00 2.454184529603501197e+00 9.705255835568922862e+01 +2.224448897795590963e+00 2.448943689195040463e+00 1.030655529755629374e+02 +2.244488977955911846e+00 2.443400102436689814e+00 1.092379533374396345e+02 +2.264529058116232285e+00 2.437558726879272442e+00 1.155672806585862560e+02 +2.284569138276553169e+00 2.431424646114265897e+00 1.220509931357573947e+02 +2.304609218436873608e+00 2.425003067732275142e+00 1.286864869659601709e+02 +2.324649298597194491e+00 2.418299321231706767e+00 1.354710973921206971e+02 +2.344689378757514930e+00 2.411318855878493483e+00 1.424020997732258422e+02 +2.364729458917835370e+00 2.404067238517710425e+00 1.494767106785168664e+02 +2.384769539078156253e+00 2.396550151337982548e+00 1.566920890052907680e+02 +2.404809619238476692e+00 2.388773389589562868e+00 1.640453371198620403e+02 +2.424849699398797576e+00 2.380742859257013677e+00 1.715335020212285144e+02 +2.444889779559118015e+00 2.372464574687412675e+00 1.791535765269697436e+02 +2.464929859719438898e+00 2.363944656175040571e+00 1.869025004809070936e+02 +2.484969939879759337e+00 2.355189327503528496e+00 1.947771619820341300e+02 +2.505010020040080221e+00 2.346204913446435114e+00 2.027743986342312610e+02 +2.525050100200400660e+00 2.336997837227277053e+00 2.108909988162550349e+02 +2.545090180360721543e+00 2.327574617940013191e+00 2.191237029714987443e+02 +2.565130260521041983e+00 2.317941867931036182e+00 2.274692049170012638e+02 +2.585170340681362422e+00 2.308106290143709938e+00 2.359241531711823257e+02 +2.605210420841683305e+00 2.298074675426524660e+00 2.444851522997685436e+02 +2.625250501002003745e+00 2.287853899805951663e+00 2.531487642793698569e+02 +2.645290581162324628e+00 2.277450921725090449e+00 2.619115098781609845e+02 +2.665330661322645067e+00 2.266872779249217817e+00 2.707698700531099121e+02 +2.685370741482965951e+00 2.256126587239360770e+00 2.797202873631965190e+02 +2.705410821643286390e+00 2.245219534495030533e+00 2.887591673980486462e+02 +2.725450901803607273e+00 2.234158880867263886e+00 2.978828802214276834e+02 +2.745490981963927712e+00 2.222951954343126868e+00 3.070877618289785573e+02 +2.765531062124248596e+00 2.211606148102859937e+00 3.163701156196634088e+02 +2.785571142284569035e+00 2.200128917550841834e+00 3.257262138802831259e+02 +2.805611222444889474e+00 2.188527777321561008e+00 3.351522992824964149e+02 +2.825651302605210358e+00 2.176810298261803389e+00 3.446445863917298311e+02 +2.845691382765530797e+00 2.164984104390269337e+00 3.541992631873747541e+02 +2.865731462925851680e+00 2.153056869835828113e+00 3.638124925936636487e+02 +2.885771543086172120e+00 2.141036315755658670e+00 3.734804140206049965e+02 +2.905811623246493003e+00 2.128930207234495775e+00 3.831991449143642399e+02 +2.925851703406813442e+00 2.116746350166242685e+00 3.929647823164625606e+02 +2.945891783567134325e+00 2.104492588119187158e+00 4.027734044311732191e+02 +2.965931863727454765e+00 2.092176799186097114e+00 4.126210722004783520e+02 +2.985971943887775648e+00 2.079806892820440289e+00 4.225038308859634526e+02 +3.006012024048096087e+00 2.067390806660023728e+00 4.324177116570036219e+02 +3.026052104208416527e+00 2.054936503339299669e+00 4.423587331846135839e+02 +3.046092184368737410e+00 2.042451967291644355e+00 4.523229032403145879e+02 +3.066132264529057849e+00 2.029945201542878497e+00 4.623062202993779124e+02 +3.086172344689378733e+00 2.017424224497317731e+00 4.723046751478044598e+02 +3.106212424849699172e+00 2.004897066717655107e+00 4.823142524923883343e+02 +3.126252505010020055e+00 1.992371767699953278e+00 4.923309325732264483e+02 +3.146292585170340494e+00 1.979856372645053764e+00 5.023506927780170486e+02 +3.166332665330661378e+00 1.967358929227692510e+00 5.123695092575079570e+02 +3.186372745490981817e+00 1.954887484364624450e+00 5.223833585414381560e+02 +3.206412825651302256e+00 1.942450080983050720e+00 5.323882191543301587e+02 +3.226452905811623140e+00 1.930054754790647475e+00 5.423800732304792973e+02 +3.246492985971943579e+00 1.917709531048496396e+00 5.523549081274929904e+02 +3.266533066132264462e+00 1.905422421348207829e+00 5.623087180377352752e+02 +3.286573146292584902e+00 1.893201420394537093e+00 5.722375055970223912e+02 +3.306613226452905785e+00 1.881054502794775818e+00 5.821372834899317468e+02 +3.326653306613226224e+00 1.868989619856223694e+00 5.920040760510720474e+02 +3.346693386773547108e+00 1.857014696393007203e+00 6.018339208616766882e+02 +3.366733466933867547e+00 1.845137627543546266e+00 6.116228703408767160e+02 +3.386773547094188430e+00 1.833366275599931816e+00 6.213669933310161468e+02 +3.406813627254508869e+00 1.821708466850500807e+00 6.310623766763693538e+02 +3.426853707414829309e+00 1.810171988436861001e+00 6.407051267946321786e+02 +3.446893787575150192e+00 1.798764585226647394e+00 6.502913712405503475e+02 +3.466933867735470631e+00 1.787493956703248177e+00 6.598172602610595732e+02 +3.486973947895791515e+00 1.776367753873757227e+00 6.692789683413144530e+02 +3.507014028056111954e+00 1.765393576196397918e+00 6.786726957409805436e+02 +3.527054108216432837e+00 1.754578968528644589e+00 6.879946700201794556e+02 +3.547094188376753277e+00 1.743931418097274477e+00 6.972411475544654422e+02 +3.567134268537074160e+00 1.733458351491558469e+00 7.064084150382354892e+02 +3.587174348697394599e+00 1.723167131680813480e+00 7.154927909759586555e+02 +3.607214428857715482e+00 1.713065055057490182e+00 7.244906271606341761e+02 +3.627254509018035922e+00 1.703159348507010673e+00 7.333983101388791965e+02 +3.647294589178356361e+00 1.693457166505509370e+00 7.422122626620608798e+02 +3.667334669338677244e+00 1.683965588246658651e+00 7.509289451228887629e+02 +3.687374749498997684e+00 1.674691614798728523e+00 7.595448569768896050e+02 +3.707414829659318567e+00 1.665642166293012316e+00 7.680565381481970917e+02 +3.727454909819639006e+00 1.656824079144766593e+00 7.764605704190873894e+02 +3.747494989979959890e+00 1.648244103307762831e+00 7.847535788027066701e+02 +3.767535070140280329e+00 1.639908899563566447e+00 7.929322328984358137e+02 +3.787575150300601212e+00 1.631825036846622945e+00 8.009932482293520479e+02 +3.807615230460921651e+00 1.623998989606231236e+00 8.089333875612445581e+02 +3.827655310621242535e+00 1.616437135206458375e+00 8.167494622026619027e+02 +3.847695390781562974e+00 1.609145751365050003e+00 8.244383332854611126e+02 +3.867735470941883413e+00 1.602131013632347223e+00 8.319969130253510912e+02 +3.887775551102204297e+00 1.595398992911243319e+00 8.394221659619206548e+02 +3.907815631262524736e+00 1.588955653019160641e+00 8.467111101776515625e+02 +3.927855711422845619e+00 1.582806848293030866e+00 8.538608184954326816e+02 +3.947895791583166059e+00 1.576958321238246530e+00 8.608684196540875746e+02 +3.967935871743486942e+00 1.571415700222517753e+00 8.677310994614492756e+02 +3.987975951903807381e+00 1.566184497215570515e+00 8.744461019245148918e+02 +4.008016032064127820e+00 1.561270105575586431e+00 8.810107303562293737e+02 +4.028056112224448704e+00 1.556677797883275982e+00 8.874223484584509833e+02 +4.048096192384769587e+00 1.552412723824457164e+00 8.936783813806663375e+02 +4.068136272545089582e+00 1.548479908121984883e+00 8.997763167540272207e+02 +4.088176352705410466e+00 1.544884248517864656e+00 9.057137057002989877e+02 +4.108216432865731349e+00 1.541630513806363734e+00 9.114881638153049153e+02 +4.128256513026052232e+00 1.538723341918903031e+00 9.170973721264856522e+02 +4.148296593186372228e+00 1.536167238061506124e+00 9.225390780241765469e+02 +4.168336673346693111e+00 1.533966572905543835e+00 9.278110961662381442e+02 +4.188376753507013994e+00 1.532125580832512046e+00 9.329113093556687772e+02 +4.208416833667334878e+00 1.530648358233542172e+00 9.378376693908538755e+02 +4.228456913827654873e+00 1.529538861864323529e+00 9.425881978881050145e+02 +4.248496993987975756e+00 1.528800907256105734e+00 9.471609870761637922e+02 +4.268537074148296639e+00 1.528438167183412855e+00 9.515542005623437944e+02 +4.288577154308616635e+00 1.528454170189090799e+00 9.557660740700115412e+02 +4.308617234468937518e+00 1.528852299167273276e+00 9.597949161471043453e+02 +4.328657314629258401e+00 1.529635790004841844e+00 9.636391088454030296e+02 +4.348697394789579285e+00 1.530807730281920964e+00 9.672971083702858550e+02 +4.368737474949899280e+00 1.532371058031932520e+00 9.707674457007029787e+02 +4.388777555110220163e+00 1.534328560561707189e+00 9.740487271791230341e+02 +4.408817635270541047e+00 1.536682873332125610e+00 9.771396350712136609e+02 +4.428857715430861930e+00 1.539436478899741445e+00 9.800389280950321336e+02 +4.448897795591181925e+00 1.542591705919805545e+00 9.827454419195138371e+02 +4.468937875751502808e+00 1.546150728211101333e+00 9.852580896320574766e+02 +4.488977955911823692e+00 1.550115563882954017e+00 9.875758621750194379e+02 +4.509018036072143687e+00 1.554488074524779329e+00 9.896978287509432448e+02 +4.529058116232464570e+00 1.559269964458483093e+00 9.916231371963593801e+02 +4.549098196392785454e+00 1.564462780054019841e+00 9.933510143240067691e+02 +4.569138276553106337e+00 1.570067909108384452e+00 9.948807662333381359e+02 +4.589178356713426332e+00 1.576086580288286632e+00 9.962117785891847461e+02 +4.609218436873747216e+00 1.582519862636726060e+00 9.973435168684678729e+02 +4.629258517034068099e+00 1.589368665143676473e+00 9.982755265748584179e+02 +4.649298597194388982e+00 1.596633736381040114e+00 9.990074334212996519e+02 +4.669338677354708977e+00 1.604315664202031311e+00 9.995389434803163340e+02 +4.689378757515029861e+00 1.612414875505097545e+00 9.998698433020541643e+02 +4.709418837675350744e+00 1.620931636062481251e+00 1.000000000000000000e+03 +4.729458917835670739e+00 1.629866050413486533e+00 9.999293613043465712e+02 +4.749498997995991623e+00 1.639218061822500072e+00 9.996579555829848687e+02 +4.769539078156312506e+00 1.648987452301774237e+00 9.991858918301107906e+02 +4.789579158316633389e+00 1.659173842698966617e+00 9.985133596224548000e+02 +4.809619238476953385e+00 1.669776692849408217e+00 9.976406290431494881e+02 +4.829659318637274268e+00 1.680795301793028163e+00 9.965680505732656229e+02 +4.849699398797595151e+00 1.692228808055850298e+00 9.952960549510630699e+02 +4.869739478957916035e+00 1.704076189995956891e+00 9.938251529990096742e+02 +4.889779559118236030e+00 1.716336266213768447e+00 9.921559354186391602e+02 +4.909819639278556913e+00 1.729007696026489072e+00 9.902890725533304703e+02 +4.929859719438877796e+00 1.742088980006505361e+00 9.882253141191039276e+02 +4.949899799599197792e+00 1.755578460583548051e+00 9.859654889035417682e+02 +4.969939879759518675e+00 1.769474322710359537e+00 9.835105044329535531e+02 +4.989979959919839558e+00 1.783774594591596818e+00 9.808613466079225418e+02 +5.010020040080160442e+00 1.798477148475690290e+00 9.780190793073752502e+02 +5.030060120240480437e+00 1.813579701509330233e+00 9.749848439613382425e+02 +5.050100200400801320e+00 1.829079816654240354e+00 9.717598590925483677e+02 +5.070140280561122204e+00 1.844974903665872024e+00 9.683454198271051609e+02 +5.090180360721443087e+00 1.861262220133622414e+00 9.647428973743595861e+02 +5.110220440881763082e+00 1.877938872582164631e+00 9.609537384762481906e+02 +5.130260521042083965e+00 1.895001817633443997e+00 9.569794648262927694e+02 +5.150300601202404849e+00 1.912447863228867728e+00 9.528216724585031443e+02 +5.170340681362724844e+00 1.930273669911211520e+00 9.484820311064232783e+02 +5.190380761523045727e+00 1.948475752165717889e+00 9.439622835325791357e+02 +5.210420841683366611e+00 1.967050479819845377e+00 9.392642448286025001e+02 +5.230460921843687494e+00 1.985994079501115728e+00 9.343898016863045086e+02 +5.250501002004007489e+00 2.005302636152468398e+00 9.293409116399966479e+02 +5.270541082164328373e+00 2.024972094604515771e+00 9.241196022803618462e+02 +5.290581162324649256e+00 2.044998261204058920e+00 9.187279704401921663e+02 +5.310621242484970139e+00 2.065376805498225998e+00 9.131681813523182427e+02 +5.330661322645290134e+00 2.086103261973545120e+00 9.074424677800708423e+02 +5.350701402805611018e+00 2.107173031849256084e+00 9.015531291206212927e+02 +5.370741482965931901e+00 2.128581384924137954e+00 8.955025304815651452e+02 +5.390781563126251896e+00 2.150323461476119746e+00 8.892931017311141204e+02 +5.410821643286572780e+00 2.172394274213905074e+00 8.829273365222821894e+02 +5.430861723446893663e+00 2.194788710279818922e+00 8.764077912914567605e+02 +5.450901803607214546e+00 2.217501533303093186e+00 8.697370842317545794e+02 +5.470941883767534542e+00 2.240527385502743662e+00 8.629178942415799156e+02 +5.490981963927855425e+00 2.263860789839213794e+00 8.559529598487991962e+02 +5.511022044088176308e+00 2.287496152213901457e+00 8.488450781109748959e+02 +5.531062124248497192e+00 2.311427763715702355e+00 8.415971034920893317e+02 +5.551102204408817187e+00 2.335649802913659201e+00 8.342119467162179944e+02 +5.571142284569138070e+00 2.360156338194801862e+00 8.266925735986054633e+02 +5.591182364729458953e+00 2.384941330146225447e+00 8.190420038546226351e+02 +5.611222444889778949e+00 2.409998633980471094e+00 8.112633098870738877e+02 +5.631262525050099832e+00 2.435322002003218689e+00 8.033596155523445077e+02 +5.651302605210420715e+00 2.460905086122306518e+00 7.953340949058906517e+02 +5.671342685370741599e+00 2.486741440397069347e+00 7.871899709275636496e+02 +5.691382765531061594e+00 2.512824523626973505e+00 7.789305142272897911e+02 +5.711422845691382477e+00 2.539147701978509364e+00 7.705590417316205958e+02 +5.731462925851703361e+00 2.565704251649277179e+00 7.620789153516853958e+02 +5.751503006012024244e+00 2.592487361568209359e+00 7.534935406330763499e+02 +5.771543086172344239e+00 2.619490136130837588e+00 7.448063653882098833e+02 +5.791583166332665122e+00 2.646705597968513235e+00 7.360208783117147959e+02 +5.811623246492986006e+00 2.674126690750449509e+00 7.271406075794046728e+02 +5.831663326653306001e+00 2.701746282017488454e+00 7.181691194313910955e+02 +5.851703406813626884e+00 2.729557166046437722e+00 7.091100167399115435e+02 +5.871743486973947768e+00 2.757552066743818919e+00 6.999669375624501981e+02 +5.891783567134268651e+00 2.785723640567889792e+00 6.907435536807222434e+02 +5.911823647294588646e+00 2.814064479477745628e+00 6.814435691261201100e+02 +5.931863727454909530e+00 2.842567113908326615e+00 6.720707186922043093e+02 +5.951903807615230413e+00 2.871224015770126758e+00 6.626287664348450335e+02 +5.971943887775551296e+00 2.900027601472412453e+00 6.531215041606080831e+02 +5.991983967935871291e+00 2.928970234968723663e+00 6.435527499039991426e+02 +6.012024048096192175e+00 2.958044230823453802e+00 6.339263463941722421e+02 +6.032064128256513058e+00 2.987241857298241765e+00 6.242461595117250681e+02 +6.052104208416833053e+00 3.016555339456976181e+00 6.145160767361943499e+02 +6.072144288577153937e+00 3.045976862288150677e+00 6.047400055848752345e+02 +6.092184368737474820e+00 3.075498573843291616e+00 5.949218720435990235e+02 +6.112224448897795703e+00 3.105112588390241068e+00 5.850656189900898880e+02 +6.132264529058115698e+00 3.134810989579997376e+00 5.751752046105395948e+02 +6.152304609218436582e+00 3.164585833625852995e+00 5.652546008100322297e+02 +6.172344689378757465e+00 3.194429152493549307e+00 5.553077916174643178e+02 +6.192384769539078349e+00 3.224332957101171182e+00 5.453387715855913029e+02 +6.212424849699398344e+00 3.254289240527490801e+00 5.353515441868502194e+02 +6.232464929859719227e+00 3.284289981227487498e+00 5.253501202055987278e+02 +6.252505010020040110e+00 3.314327146253717160e+00 5.153385161274204620e+02 +6.272545090180360106e+00 3.344392694482282824e+00 5.053207525261383921e+02 +6.292585170340680989e+00 3.374478579842083992e+00 4.953008524491854700e+02 +6.312625250501001872e+00 3.404576754546040807e+00 4.852828398019860288e+02 +6.332665330661322756e+00 3.434679172323020335e+00 4.752707377319885609e+02 +6.352705410821642751e+00 3.464777791649148231e+00 4.652685670130051676e+02 +6.372745490981963634e+00 3.494864578977221026e+00 4.552803444305018843e+02 +6.392785571142284518e+00 3.524931511962900554e+00 4.453100811684944347e+02 +6.412825651302604513e+00 3.554970582686421299e+00 4.353617811986907782e+02 +6.432865731462925396e+00 3.584973800868508143e+00 4.254394396725285787e+02 +6.452905811623246279e+00 3.614933197079194027e+00 4.155470413167602146e+02 +6.472945891783567163e+00 3.644840825938279849e+00 4.056885588332180532e+02 +6.492985971943887158e+00 3.674688769306128311e+00 3.958679513034139177e+02 +6.513026052104208041e+00 3.704469139463525185e+00 3.860891625986033660e+02 +6.533066132264528925e+00 3.734174082279312135e+00 3.763561197959638776e+02 +6.553106212424849808e+00 3.763795780364542765e+00 3.666727316015129077e+02 +6.573146292585169803e+00 3.793326456211875808e+00 3.570428867804062634e+02 +6.593186372745490686e+00 3.822758375318961566e+00 3.474704525952413405e+02 +6.613226452905811570e+00 3.852083849294539952e+00 3.379592732530011290e+02 +6.633266533066131565e+00 3.881295238946041781e+00 3.285131683612518714e+02 +6.653306613226452448e+00 3.910384957347420976e+00 3.191359313942206768e+02 +6.673346693386773332e+00 3.939345472885993349e+00 3.098313281693717158e+02 +6.693386773547094215e+00 3.968169312287071815e+00 3.006030953350844470e+02 +6.713426853707414210e+00 3.996849063615168340e+00 2.914549388700485792e+02 +6.733466933867735094e+00 4.025377379250564047e+00 2.823905325949738199e+02 +6.753507014028055977e+00 4.053746978840048421e+00 2.734135166972172897e+02 +6.773547094188376860e+00 4.081950652220645459e+00 2.645274962689139784e+02 +6.793587174348696855e+00 4.109981262315153927e+00 2.557360398592040838e+02 +6.813627254509017739e+00 4.137831747998339971e+00 2.470426780411323762e+02 +6.833667334669338622e+00 4.165495126932617254e+00 2.384509019938032282e+02 +6.853707414829658617e+00 4.192964498372094617e+00 2.299641621003518992e+02 +6.873747494989979501e+00 4.220233045933865057e+00 2.215858665622992305e+02 +6.893787575150300384e+00 4.247294040335392928e+00 2.133193800308498282e+02 +6.913827655310621267e+00 4.274140842096944226e+00 2.051680222556753677e+02 +6.933867735470941263e+00 4.300766904207941721e+00 1.971350667517327224e+02 +6.953907815631262146e+00 4.327165774756191574e+00 1.892237394846470409e+02 +6.973947895791583029e+00 4.353331099518909397e+00 1.814372175751938983e+02 +6.993987975951903913e+00 4.379256624514525242e+00 1.737786280233937930e+02 +7.014028056112223908e+00 4.404936198514227463e+00 1.662510464527364036e+02 +7.034068136272544791e+00 4.430363775512244473e+00 1.588574958750354824e+02 +7.054108216432865675e+00 4.455533417153866971e+00 1.516009454764152053e+02 +7.074148296593185670e+00 4.480439295120240750e+00 1.444843094249101227e+02 +7.094188376753506553e+00 4.505075693468969966e+00 1.375104457001587832e+02 +7.114228456913827436e+00 4.529437010929587615e+00 1.306821549456662126e+02 +7.134268537074148320e+00 4.553517763152981068e+00 1.240021793440882476e+02 +7.154308617234468315e+00 4.577312584913854288e+00 1.174732015159950436e+02 +7.174348697394789198e+00 4.600816232265364292e+00 1.110978434425529429e+02 +7.194388777555110082e+00 4.624023584645035712e+00 1.048786654125609346e+02 +7.214428857715430965e+00 4.646929646931139857e+00 9.881816499425976019e+01 +7.234468937875750960e+00 4.669529551448691862e+00 9.291877603233054117e+01 +7.254509018036071843e+00 4.691818559924266552e+00 8.718286767048279273e+01 +7.274549098196392727e+00 4.713792065388847874e+00 8.161274340002822214e+01 +7.294589178356712722e+00 4.735445594027945404e+00 7.621064013481766608e+01 +7.314629258517033605e+00 4.756774806978249615e+00 7.097872731291521120e+01 +7.334669338677354489e+00 4.777775502070065627e+00 6.591910602537187458e+01 +7.354709418837675372e+00 4.798443615514884186e+00 6.103380817244479317e+01 +7.374749498997995367e+00 4.818775223537352659e+00 5.632479564760383539e+01 +7.394789579158316251e+00 4.838766543951037669e+00 5.179395954965144000e+01 +7.414829659318637134e+00 4.858413937677311445e+00 4.744311942327492204e+01 +7.434869739478958017e+00 4.877713910206781023e+00 4.327402252833200436e+01 +7.454909819639278012e+00 4.896663113002647449e+00 3.928834313816695811e+01 +7.474949899799598896e+00 4.915258344845452321e+00 3.548768186723586382e+01 +7.494989979959919779e+00 4.933496553118660088e+00 3.187356502831510241e+01 +7.515030060120239774e+00 4.951374835034558330e+00 2.844744401954644530e+01 +7.535070140280560658e+00 4.968890438800001697e+00 2.521069474156775314e+01 +7.555110220440881541e+00 4.986040764721496821e+00 2.216461704496407137e+01 +7.575150300601202424e+00 5.002823366249223191e+00 1.931043420825829671e+01 +7.595190380761522420e+00 5.019235950959545889e+00 1.664929244665321662e+01 +7.615230460921843303e+00 5.035276381475634722e+00 1.418226045172094807e+01 +7.635270541082164186e+00 5.050942676325811398e+00 1.191032896222642634e+01 +7.655310621242485070e+00 5.066233010739295217e+00 9.834410366254722646e+00 +7.675350701402805065e+00 5.081145717379013327e+00 7.955338334803988332e+00 +7.695390781563125948e+00 5.095679287011193104e+00 6.273867486990178044e+00 +7.715430861723446831e+00 5.109832369111450667e+00 4.790673086998884500e+00 +7.735470941883766827e+00 5.123603772407154366e+00 3.506350772904916813e+00 +7.755511022044087710e+00 5.136992465355831428e+00 2.421416317469038848e+00 +7.775551102204408593e+00 5.149997576559419699e+00 1.536305421008269612e+00 +7.795591182364729477e+00 5.162618395114220604e+00 8.513735364222744240e-01 +7.815631262525049472e+00 5.174854370896386335e+00 3.668957264467385126e-01 +7.835671342685370355e+00 5.186705114782850679e+00 8.306655319023606432e-02 +7.855711422845691239e+00 5.198170398807591575e+00 0.000000000000000000e+00 +7.875751503006012122e+00 5.209250156253183661e+00 1.177294256871248418e-01 +7.895791583166332117e+00 5.219944481677590176e+00 4.362075511299656205e-01 +7.915831663326653000e+00 5.230253630876193327e+00 9.553064782610614092e-01 +7.935871743486973884e+00 5.240178020779059587e+00 1.674817741429812656e+00 +7.955911823647293879e+00 5.249718229283516280e+00 2.594452391120483092e+00 +7.975951903807614762e+00 5.258874995022061682e+00 3.713841109991943057e+00 +7.995991983967935646e+00 5.267649217065747180e+00 5.032534361192301020e+00 +8.016032064128255641e+00 5.276041954563106096e+00 6.550002568888864118e+00 +8.036072144288576524e+00 5.284054426314822805e+00 8.265636330941418919e+00 +8.056112224448897408e+00 5.291688010284259391e+00 1.017874666363291603e+01 +8.076152304609218291e+00 5.298944243044088509e+00 1.228856527835901602e+01 +8.096192384769539174e+00 5.305824819159209227e+00 1.459424489016658200e+01 +8.116232464929860058e+00 5.312331590506231827e+00 1.709485955801583756e+01 +8.136272545090179165e+00 5.318466565529778478e+00 1.978940505663001659e+01 +8.156312625250500048e+00 5.324231908435906213e+00 2.267679927978462828e+01 +8.176352705410820931e+00 5.329629938322985261e+00 2.575588267487045968e+01 +8.196392785571141815e+00 5.334663128250363151e+00 2.902541870856099848e+01 +8.216432865731462698e+00 5.339334104245210710e+00 3.248409436339298395e+01 +8.236472945891783581e+00 5.343645644247928317e+00 3.613052066506330817e+01 +8.256513026052104465e+00 5.347600676996553837e+00 3.996323324022881707e+01 +8.276553106212425348e+00 5.351202280850603010e+00 4.398069290458620628e+01 +8.296593186372744455e+00 5.354453682554823679e+00 4.818128628099457700e+01 +8.316633266533065338e+00 5.357358255943372782e+00 5.256332644739540427e+01 +8.336673346693386222e+00 5.359919520584902841e+00 5.712505361426364914e+01 +8.356713426853707105e+00 5.362141140369139691e+00 6.186463583132555044e+01 +8.376753507014027988e+00 5.364026922035497691e+00 6.678016972325357870e+01 +8.396793587174348872e+00 5.365580813644318603e+00 7.186968125404561647e+01 +8.416833667334669755e+00 5.366806902991370976e+00 7.713112651978079271e+01 +8.436873747494988862e+00 5.367709415966225528e+00 8.256239256943308646e+01 +8.456913827655309746e+00 5.368292714855172676e+00 8.816129825341631943e+01 +8.476953907815630629e+00 5.368561296589365206e+00 9.392559509951207986e+01 +8.496993987975951512e+00 5.368519790938893976e+00 9.985296821583851568e+01 +8.517034068136272396e+00 5.368172958653508076e+00 1.059410372204906849e+02 +8.537074148296593279e+00 5.367525689550741497e+00 1.121873571974812194e+02 +8.557114228456914162e+00 5.366583000552199501e+00 1.185894196785977641e+02 +8.577154308617233269e+00 5.365350033668812024e+00 1.251446536507811516e+02 +8.597194388777554153e+00 5.363832053935846389e+00 1.318504265886247424e+02 +8.617234468937875036e+00 5.362034447298508866e+00 1.387040455115703708e+02 +8.637274549098195919e+00 5.359962718449001073e+00 1.457027580653883660e+02 +8.657314629258516803e+00 5.357622488615882084e+00 1.528437536274986712e+02 +8.677354709418837686e+00 5.355019493306628853e+00 1.601241644356925917e+02 +8.697394789579158569e+00 5.352159580004308026e+00 1.675410667398015221e+02 +8.717434869739479453e+00 5.349048705819276606e+00 1.750914819758495753e+02 +8.737474949899798560e+00 5.345692935096859166e+00 1.827723779622187124e+02 +8.757515030060119443e+00 5.342098436981957299e+00 1.905806701173493138e+02 +8.777555110220440326e+00 5.338271482941573609e+00 1.985132226984773354e+02 +8.797595190380761210e+00 5.334218444246249469e+00 2.065668500609244802e+02 +8.817635270541082093e+00 5.329945789411409507e+00 2.147383179374249096e+02 +8.837675350701402976e+00 5.325460081599669770e+00 2.230243447369789749e+02 +8.857715430861723860e+00 5.320767975985125631e+00 2.314216028627118078e+02 +8.877755511022042967e+00 5.315876217080687027e+00 2.399267200482068745e+02 +8.897795591182363850e+00 5.310791636029545515e+00 2.485362807117820694e+02 +8.917835671342684734e+00 5.305521147861844256e+00 2.572468273281535289e+02 +8.937875751503005617e+00 5.300071748717661180e+00 2.660548618169502788e+02 +8.957915831663326500e+00 5.294450513037422645e+00 2.749568469475133838e+02 +8.977955911823647384e+00 5.288664590720861369e+00 2.839492077594163675e+02 +8.997995991983968267e+00 5.282721204255688363e+00 2.930283329981389784e+02 +9.018036072144287374e+00 5.276627645817097978e+00 3.021905765653149274e+02 +9.038076152304608257e+00 5.270391274339290000e+00 3.114322589829767480e+02 +9.058116232464929141e+00 5.264019512560196290e+00 3.207496688711975139e+02 +9.078156312625250024e+00 5.257519844040566603e+00 3.301390644385522819e+02 +9.098196392785570907e+00 5.250899810158627723e+00 3.395966749847884216e+02 +9.118236472945891791e+00 5.244167007081546927e+00 3.491187024151063270e+02 +9.138276553106212674e+00 5.237329082714865081e+00 3.587013227654414891e+02 +9.158316633266533557e+00 5.230393733631166775e+00 3.683406877381355002e+02 +9.178356713426852664e+00 5.223368701979203443e+00 3.780329262473783842e+02 +9.198396793587173548e+00 5.216261772374713779e+00 3.877741459738065259e+02 +9.218436873747494431e+00 5.209080768774191128e+00 3.975604349276194398e+02 +9.238476953907815314e+00 5.201833551332843975e+00 4.073878630196048221e+02 +9.258517034068136198e+00 5.194528013248028486e+00 4.172524836394272256e+02 +9.278557114228457081e+00 5.187172077589415231e+00 4.271503352405529768e+02 +9.298597194388777964e+00 5.179773694117139726e+00 4.370774429311730955e+02 +9.318637274549097071e+00 5.172340836089261096e+00 4.470298200704844476e+02 +9.338677354709417955e+00 5.164881497059755411e+00 4.570034698696940154e+02 +9.358717434869738838e+00 5.157403687668390191e+00 4.669943869970894639e+02 +9.378757515030059722e+00 5.149915432423705752e+00 4.769985591865493006e+02 +9.398797595190380605e+00 5.142424766480450771e+00 4.870119688488334759e+02 +9.418837675350701488e+00 5.134939732412731495e+00 4.970305946850124315e+02 +9.438877755511022372e+00 5.127468376984182008e+00 5.070504133013864703e+02 +9.458917835671341479e+00 5.120018747916452284e+00 5.170674008252445901e+02 +9.478957915831662362e+00 5.112598890657316097e+00 5.270775345208204499e+02 +9.498997995991983245e+00 5.105216845149687543e+00 5.370767944047840956e+02 +9.519038076152304129e+00 5.097880642602845569e+00 5.470611648606347899e+02 +9.539078156312625012e+00 5.090598302267177466e+00 5.570266362513380045e+02 +9.559118236472945895e+00 5.083377828213707872e+00 5.669692065295602106e+02 +9.579158316633266779e+00 5.076227206119739321e+00 5.768848828448577706e+02 +9.599198396793587662e+00 5.069154400061871790e+00 5.867696831471699852e+02 +9.619238476953906769e+00 5.062167349317696186e+00 5.966196377859761242e+02 +9.639278557114227652e+00 5.055273965177453199e+00 6.064307911044755883e+02 +9.659318637274548536e+00 5.048482127766917849e+00 6.161992030281406869e+02 +9.679358717434869419e+00 5.041799682882824207e+00 6.259209506470201632e+02 +9.699398797595190302e+00 5.035234438842048021e+00 6.355921297911449983e+02 +9.719438877755511186e+00 5.028794163345857271e+00 6.452088565984089428e+02 +9.739478957915832069e+00 5.022486580360477681e+00 6.547672690742948589e+02 +9.759519038076151176e+00 5.016319367015202424e+00 6.642635286428171639e+02 +9.779559118236472059e+00 5.010300150519331197e+00 6.736938216880639629e+02 +9.799599198396792943e+00 5.004436505099149279e+00 6.830543610857074555e+02 +9.819639278557113826e+00 4.998735948956176678e+00 6.923413877238837131e+02 +9.839679358717434710e+00 4.993205941247933488e+00 7.015511720128191655e+02 +9.859719438877755593e+00 4.987853879092396525e+00 7.106800153826006863e+02 +9.879759519038076476e+00 4.982687094597387123e+00 7.197242517684906034e+02 +9.899799599198395583e+00 4.977712851916056280e+00 7.286802490831846626e+02 +9.919839679358716467e+00 4.972938344329665306e+00 7.375444106754310951e+02 +9.939879759519037350e+00 4.968370691358828140e+00 7.463131767744092713e+02 +9.959919839679358233e+00 4.964016935904367323e+00 7.549830259193067832e+02 +9.979959919839679117e+00 4.959884041418952449e+00 7.635504763735062852e+02 +1.000000000000000000e+01 4.955978889110630448e+00 7.720120875228209343e+02 diff --git a/buch/papers/kugel/figures/tikz/curvature-1d.pdf b/buch/papers/kugel/figures/tikz/curvature-1d.pdf new file mode 100644 index 0000000..6425af6 Binary files /dev/null and b/buch/papers/kugel/figures/tikz/curvature-1d.pdf differ diff --git a/buch/papers/kugel/figures/tikz/curvature-1d.py b/buch/papers/kugel/figures/tikz/curvature-1d.py new file mode 100644 index 0000000..4710fc8 --- /dev/null +++ b/buch/papers/kugel/figures/tikz/curvature-1d.py @@ -0,0 +1,32 @@ +import numpy as np +import matplotlib.pyplot as plt + + +@np.vectorize +def fn(x): + return (x ** 2) * 2 / 100 + (1 + x / 4) + np.sin(x) + +@np.vectorize +def ddfn(x): + return 2 * 5 / 100 - np.sin(x) + +x = np.linspace(0, 10, 500) +y = fn(x) +ddy = ddfn(x) + +cmap = ddy - np.min(ddy) +cmap = cmap * 1000 / np.max(cmap) + +plt.plot(x, y) +plt.plot(x, ddy) +# plt.plot(x, cmap) + +plt.show() + +fname = "curvature-1d.dat" +np.savetxt(fname, np.array([x, y, cmap]).T, delimiter=" ") + +# with open(fname, "w") as f: +# # f.write("x y cmap\n") +# for xv, yv, cv in zip(x, y, cmap): +# f.write(f"{xv} {yv} {cv}\n") diff --git a/buch/papers/kugel/figures/tikz/curvature-1d.tex b/buch/papers/kugel/figures/tikz/curvature-1d.tex new file mode 100644 index 0000000..6983fb0 --- /dev/null +++ b/buch/papers/kugel/figures/tikz/curvature-1d.tex @@ -0,0 +1,21 @@ +% vim:ts=2 sw=2 et: +\documentclass[tikz, border=5mm]{standalone} +\usepackage{pgfplots} + +\begin{document} +\begin{tikzpicture} + \begin{axis}[ + clip = false, + width = 8cm, height = 6cm, + xtick = \empty, ytick = \empty, + colormap name = viridis, + axis lines = middle, + axis line style = {ultra thick, -latex} + ] + \addplot+[ + smooth, mark=none, line width = 3pt, mesh, + point meta=explicit, + ] file {curvature-1d.dat}; + \end{axis} +\end{tikzpicture} +\end{document} diff --git a/buch/papers/kugel/figures/tikz/spherical-coordinates.pdf b/buch/papers/kugel/figures/tikz/spherical-coordinates.pdf new file mode 100644 index 0000000..1bff016 Binary files /dev/null and b/buch/papers/kugel/figures/tikz/spherical-coordinates.pdf differ diff --git a/buch/papers/kugel/figures/tikz/spherical-coordinates.tex b/buch/papers/kugel/figures/tikz/spherical-coordinates.tex new file mode 100644 index 0000000..3a45385 --- /dev/null +++ b/buch/papers/kugel/figures/tikz/spherical-coordinates.tex @@ -0,0 +1,99 @@ +\documentclass[tikz]{standalone} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{bm} +\usepackage{lmodern} +\usepackage{tikz-3dplot} + +\usetikzlibrary{arrows} +\usetikzlibrary{intersections} +\usetikzlibrary{math} +\usetikzlibrary{positioning} +\usetikzlibrary{arrows.meta} +\usetikzlibrary{shapes.misc} +\usetikzlibrary{calc} + +\begin{document} + +\tdplotsetmaincoords{60}{130} +\pgfmathsetmacro{\l}{2} + +\begin{tikzpicture}[ + >=latex, + tdplot_main_coords, + dot/.style = { + black, fill = black, circle, + outer sep = 0, inner sep = 0, + minimum size = .8mm + }, + round/.style = { + draw = orange, thick, circle, + minimum size = 1mm, + inner sep = 0pt, outer sep = 0pt, + }, + cross/.style = { + cross out, draw = magenta, thick, + minimum size = 1mm, + inner sep = 0pt, outer sep = 0pt + }, + ] + + % origin + \coordinate (O) at (0,0,0); + + % poles + \coordinate (NP) at (0,0,\l); + \coordinate (SP) at (0,0,-\l); + + % \draw (SP) node[dot, gray] {}; + % \draw (NP) node[dot, gray] {}; + + % gray unit circle + \tdplotdrawarc[gray]{(O)}{\l}{0}{360}{}{}; + \draw[gray, dashed] (-\l, 0, 0) to (\l, 0, 0); + \draw[gray, dashed] (0, -\l, 0) to (0, \l, 0); + + % axis + \draw[->] (O) -- ++(1.25*\l,0,0) node[left] {\(\mathbf{\hat{x}}\)}; + \draw[->] (O) -- ++(0,1.25*\l,0) node[right] {\(\mathbf{\hat{y}}\)}; + \draw[->] (O) -- ++(0,0,1.25*\l) node[above] {\(\mathbf{\hat{z}}\)}; + + % meridians + \foreach \phi in {0, 30, 60, ..., 150}{ + \tdplotsetrotatedcoords{\phi}{90}{0}; + \tdplotdrawarc[lightgray, densely dotted, tdplot_rotated_coords]{(O)}{\l}{0}{360}{}{}; + } + + % dot above and its projection + \pgfmathsetmacro{\phi}{120} + \pgfmathsetmacro{\theta}{40} + + \pgfmathsetmacro{\px}{cos(\phi)*sin(\theta)*\l} + \pgfmathsetmacro{\py}{sin(\phi)*sin(\theta)*\l} + \pgfmathsetmacro{\pz}{cos(\theta)*\l}) + + % point A + \coordinate (A) at (\px,\py,\pz); + \coordinate (Ap) at (\px,\py, 0); + + % lines + \draw[red!80!black, ->] (O) -- (A); + \draw[red!80!black, densely dashed] (O) -- (Ap) -- (A) + node[above right] {\(\mathbf{\hat{r}}\)}; + + % arcs + \tdplotdrawarc[blue!80!black, ->]{(O)}{.8\l}{0}{\phi}{}{}; + \node[below right, blue!80!black] at (.8\l,0,0) {\(\bm{\hat{\varphi}}\)}; + + \tdplotsetrotatedcoords{\phi-90}{-90}{0}; + \tdplotdrawarc[blue!80!black, ->, tdplot_rotated_coords]{(O)}{.95\l}{0}{\theta}{}{}; + \node[above right = 1mm, blue!80!black] at (0,0,.8\l) {\(\bm{\hat{\vartheta}}\)}; + + + % dots + \draw (O) node[dot] {}; + \draw (A) node[dot, fill = red!80!black] {}; + +\end{tikzpicture} +\end{document} +% vim:ts=2 sw=2 et: diff --git a/buch/papers/kugel/images/Makefile b/buch/papers/kugel/images/Makefile deleted file mode 100644 index 4226dab..0000000 --- a/buch/papers/kugel/images/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# -# Makefile -- build images -# -# (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule -# -all: curvature.jpg spherecurve.jpg - -curvature.inc: curvgraph.m - octave curvgraph.m - -curvature.png: curvature.pov curvature.inc - povray +A0.1 +W1920 +H1080 +Ocurvature.png curvature.pov - -curvature.jpg: curvature.png - convert curvature.png -density 300 -units PixelsPerInch curvature.jpg - -spherecurve2.inc: spherecurve.m - octave spherecurve.m - -spherecurve.png: spherecurve.pov spherecurve.inc - povray +A0.1 +W1080 +H1080 +Ospherecurve.png spherecurve.pov - -spherecurve.jpg: spherecurve.png - convert spherecurve.png -density 300 -units PixelsPerInch spherecurve.jpg - -spherecurve: spherecurve.cpp - g++ -o spherecurve -g -Wall -O spherecurve.cpp - -spherecurve.inc: spherecurve - ./spherecurve diff --git a/buch/papers/kugel/images/curvature.maxima b/buch/papers/kugel/images/curvature.maxima deleted file mode 100644 index 6313642..0000000 --- a/buch/papers/kugel/images/curvature.maxima +++ /dev/null @@ -1,6 +0,0 @@ - -f: exp(-r^2/sigma^2)/sigma; -laplacef: ratsimp(diff(r * diff(f,r), r) / r); -f: exp(-r^2/(2*sigma^2))/(sqrt(2)*sigma); -laplacef: ratsimp(diff(r * diff(f,r), r) / r); - diff --git a/buch/papers/kugel/images/curvature.pov b/buch/papers/kugel/images/curvature.pov deleted file mode 100644 index 3b15d77..0000000 --- a/buch/papers/kugel/images/curvature.pov +++ /dev/null @@ -1,139 +0,0 @@ -// -// curvature.pov -// -// (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule -// - -#version 3.7; -#include "colors.inc" - -global_settings { - assumed_gamma 1 -} - -#declare imagescale = 0.09; - -camera { - location <10, 10, -40> - look_at <0, 0, 0> - right 16/9 * x * imagescale - up y * imagescale -} - -light_source { - <-10, 10, -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 to with thickness with -// color -// -#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(<-3.1,0,0>, <3.1,0,0>, 0.01, White) -arrow(<0,-1,0>, <0,1,0>, 0.01, White) -arrow(<0,0,-2.1>, <0,0,2.1>, 0.01, White) - -#include "curvature.inc" - -#declare sigma = 1; -#declare s = 1.4; -#declare N0 = 0.4; -#declare funktion = function(r) { - (exp(-r*r/(sigma*sigma)) / sigma - - - exp(-r*r/(2*sigma*sigma)) / (sqrt(2)*sigma)) / N0 -}; -#declare hypot = function(xx, yy) { sqrt(xx*xx+yy*yy) }; - -#declare Funktion = function(x,y) { funktion(hypot(x+s,y)) - funktion(hypot(x-s,y)) }; -#macro punkt(xx,yy) - -#end - -#declare griddiameter = 0.006; -union { - #declare xmin = -3; - #declare xmax = 3; - #declare ymin = -2; - #declare ymax = 2; - - - #declare xstep = 0.2; - #declare ystep = 0.02; - #declare xx = xmin; - #while (xx < xmax + xstep/2) - #declare yy = ymin; - #declare P = punkt(xx, yy); - #while (yy < ymax - ystep/2) - #declare yy = yy + ystep; - #declare Q = punkt(xx, yy); - sphere { P, griddiameter } - cylinder { P, Q, griddiameter } - #declare P = Q; - #end - sphere { P, griddiameter } - #declare xx = xx + xstep; - #end - - #declare xstep = 0.02; - #declare ystep = 0.2; - #declare yy = ymin; - #while (yy < ymax + ystep/2) - #declare xx = xmin; - #declare P = punkt(xx, yy); - #while (xx < xmax - xstep/2) - #declare xx = xx + xstep; - #declare Q = punkt(xx, yy); - sphere { P, griddiameter } - cylinder { P, Q, griddiameter } - #declare P = Q; - #end - sphere { P, griddiameter } - #declare yy = yy + ystep; - #end - - pigment { - color rgb<0.8,0.8,0.8> - } - finish { - metallic - specular 0.8 - } -} - diff --git a/buch/papers/kugel/images/curvgraph.m b/buch/papers/kugel/images/curvgraph.m deleted file mode 100644 index 75effd6..0000000 --- a/buch/papers/kugel/images/curvgraph.m +++ /dev/null @@ -1,140 +0,0 @@ -# -# curvature.m -# -# (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule -# - -global N; -N = 10; - -global sigma2; -sigma2 = 1; - -global s; -s = 1.4; - -global cmax; -cmax = 0.9; -global cmin; -cmin = -0.9; - -global Cmax; -global Cmin; -Cmax = 0; -Cmin = 0; - -xmin = -3; -xmax = 3; -xsteps = 200; -hx = (xmax - xmin) / xsteps; - -ymin = -2; -ymax = 2; -ysteps = 200; -hy = (ymax - ymin) / ysteps; - -function retval = f0(r) - global sigma2; - retval = exp(-r^2/sigma2)/sqrt(sigma2) - exp(-r^2/(2*sigma2))/(sqrt(2*sigma2)); -end - -global N0; -N0 = f0(0) -N0 = 0.4; - -function retval = f1(x,y) - global N0; - retval = f0(hypot(x, y)) / N0; -endfunction - -function retval = f(x, y) - global s; - retval = f1(x+s, y) - f1(x-s, y); -endfunction - -function retval = curvature0(r) - global sigma2; - retval = ( - -4*(sigma2-r^2)*exp(-r^2/sigma2) - + - (2*sigma2-r^2)*exp(-r^2/(2*sigma2)) - ) / (sigma2^(5/2)); -endfunction - -function retval = curvature1(x, y) - retval = curvature0(hypot(x, y)); -endfunction - -function retval = curvature(x, y) - global s; - retval = curvature1(x+s, y) - curvature1(x-s, y); -endfunction - -function retval = farbe(x, y) - global Cmax; - global Cmin; - global cmax; - global cmin; - c = curvature(x, y); - if (c < Cmin) - Cmin = c - endif - if (c > Cmax) - Cmax = c - endif - u = (c - cmin) / (cmax - cmin); - if (u > 1) - u = 1; - endif - if (u < 0) - u = 0; - endif - color = [ u, 0.5, 1-u ]; - color = color/max(color); - color(1,4) = c/2; - retval = color; -endfunction - -function dreieck(fn, A, B, C) - fprintf(fn, "\ttriangle {\n"); - fprintf(fn, "\t <%.4f,%.4f,%.4f>,\n", A(1,1), A(1,3), A(1,2)); - fprintf(fn, "\t <%.4f,%.4f,%.4f>,\n", B(1,1), B(1,3), B(1,2)); - fprintf(fn, "\t <%.4f,%.4f,%.4f>\n", C(1,1), C(1,3), C(1,2)); - fprintf(fn, "\t}\n"); -endfunction - -function viereck(fn, punkte) - color = farbe(mean(punkte(:,1)), mean(punkte(:,2))); - fprintf(fn, " mesh {\n"); - dreieck(fn, punkte(1,:), punkte(2,:), punkte(3,:)); - dreieck(fn, punkte(2,:), punkte(3,:), punkte(4,:)); - fprintf(fn, "\tpigment { color rgb<%.4f,%.4f,%.4f> } // %.4f\n", - color(1,1), color(1,2), color(1,3), color(1,4)); - fprintf(fn, " }\n"); -endfunction - -fn = fopen("curvature.inc", "w"); -punkte = zeros(4,3); -for ix = (0:xsteps-1) - x = xmin + ix * hx; - punkte(1,1) = x; - punkte(2,1) = x; - punkte(3,1) = x + hx; - punkte(4,1) = x + hx; - for iy = (0:ysteps-1) - y = ymin + iy * hy; - punkte(1,2) = y; - punkte(2,2) = y + hy; - punkte(3,2) = y; - punkte(4,2) = y + hy; - for i = (1:4) - punkte(i,3) = f(punkte(i,1), punkte(i,2)); - endfor - viereck(fn, punkte); - end -end -#fprintf(fn, " finish { metallic specular 0.5 }\n"); -fclose(fn); - -printf("Cmax = %.4f\n", Cmax); -printf("Cmin = %.4f\n", Cmin); diff --git a/buch/papers/kugel/images/spherecurve.cpp b/buch/papers/kugel/images/spherecurve.cpp deleted file mode 100644 index 8ddf5e5..0000000 --- a/buch/papers/kugel/images/spherecurve.cpp +++ /dev/null @@ -1,292 +0,0 @@ -/* - * spherecurve.cpp - * - * (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule - */ -#include -#include -#include -#include -#include - -inline double sqr(double x) { return x * x; } - -/** - * \brief Class for 3d vectors (also used as colors) - */ -class vector { - double X[3]; -public: - vector() { X[0] = X[1] = X[2] = 0; } - vector(double a) { X[0] = X[1] = X[2] = a; } - vector(double x, double y, double z) { - X[0] = x; X[1] = y; X[2] = z; - } - vector(double theta, double phi) { - double s = sin(theta); - X[0] = cos(phi) * s; - X[1] = sin(phi) * s; - X[2] = cos(theta); - } - vector(const vector& other) { - for (int i = 0; i < 3; i++) { - X[i] = other.X[i]; - } - } - vector operator+(const vector& other) const { - return vector(X[0] + other.X[0], - X[1] + other.X[1], - X[2] + other.X[2]); - } - vector operator*(double l) const { - return vector(X[0] * l, X[1] * l, X[2] * l); - } - double operator*(const vector& other) const { - double s = 0; - for (int i = 0; i < 3; i++) { - s += X[i] * other.X[i]; - } - return s; - } - double norm() const { - double s = 0; - for (int i = 0; i < 3; i++) { - s += sqr(X[i]); - } - return sqrt(s); - } - vector normalize() const { - double l = norm(); - return vector(X[0]/l, X[1]/l, X[2]/l); - } - double max() const { - return std::max(X[0], std::max(X[1], X[2])); - } - double l0norm() const { - double l = 0; - for (int i = 0; i < 3; i++) { - if (fabs(X[i]) > l) { - l = fabs(X[i]); - } - } - return l; - } - vector l0normalize() const { - double l = l0norm(); - vector result(X[0]/l, X[1]/l, X[2]/l); - return result; - } - const double& operator[](int i) const { return X[i]; } - double& operator[](int i) { return X[i]; } -}; - -/** - * \brief Derived 3d vector class implementing color - * - * The constructor in this class converts a single value into a - * color on a suitable gradient. - */ -class color : public vector { -public: - static double utop; - static double ubottom; - static double green; -public: - color(double u) { - u = (u - ubottom) / (utop - ubottom); - if (u > 1) { - u = 1; - } - if (u < 0) { - u = 0; - } - u = pow(u,2); - (*this)[0] = u; - (*this)[1] = green * u * (1 - u); - (*this)[2] = 1-u; - double l = l0norm(); - for (int i = 0; i < 3; i++) { - (*this)[i] /= l; - } - } -}; - -double color::utop = 12; -double color::ubottom = -31; -double color::green = 0.5; - -/** - * \brief Surface model - * - * This class contains the definitions of the functions to plot - * and the parameters to - */ -class surfacefunction { - static vector axes[6]; - - double _a; - double _A; - - double _umin; - double _umax; -public: - double a() const { return _a; } - double A() const { return _A; } - - double umin() const { return _umin; } - double umax() const { return _umax; } - - surfacefunction(double a, double A) : _a(a), _A(A), _umin(0), _umax(0) { - } - - double f(double z) { - return A() * exp(a() * (sqr(z) - 1)); - } - - double g(double z) { - return -f(z) * 2*a() * ((2*a()*sqr(z) + (3-2*a()))*sqr(z) - 1); - } - - double F(const vector& v) { - double s = 0; - for (int i = 0; i < 6; i++) { - s += f(axes[i] * v); - } - return s / 6; - } - - double G(const vector& v) { - double s = 0; - for (int i = 0; i < 6; i++) { - s += g(axes[i] * v); - } - return s / 6; - } -protected: - color farbe(const vector& v) { - double u = G(v); - if (u < _umin) { - _umin = u; - } - if (u > _umax) { - _umax = u; - } - return color(u); - } -}; - -static double phi = (1 + sqrt(5)) / 2; -static double sl = sqrt(sqr(phi) + 1); -vector surfacefunction::axes[6] = { - vector( 0. , -1./sl, phi/sl ), - vector( 0. , 1./sl, phi/sl ), - vector( 1./sl, phi/sl, 0. ), - vector( -1./sl, phi/sl, 0. ), - vector( phi/sl, 0. , 1./sl ), - vector( -phi/sl, 0. , 1./sl ) -}; - -/** - * \brief Class to construct the plot - */ -class surface : public surfacefunction { - FILE *outfile; - - int _phisteps; - int _thetasteps; - double _hphi; - double _htheta; -public: - int phisteps() const { return _phisteps; } - int thetasteps() const { return _thetasteps; } - double hphi() const { return _hphi; } - double htheta() const { return _htheta; } - void phisteps(int s) { _phisteps = s; _hphi = 2 * M_PI / s; } - void thetasteps(int s) { _thetasteps = s; _htheta = M_PI / s; } - - surface(const std::string& filename, double a, double A) - : surfacefunction(a, A) { - outfile = fopen(filename.c_str(), "w"); - phisteps(400); - thetasteps(200); - } - - ~surface() { - fclose(outfile); - } - -private: - void triangle(const vector& v0, const vector& v1, const vector& v2) { - fprintf(outfile, " mesh {\n"); - vector c = (v0 + v1 + v2) * (1./3.); - vector color = farbe(c.normalize()); - vector V0 = v0 * (1 + F(v0)); - vector V1 = v1 * (1 + F(v1)); - vector V2 = v2 * (1 + F(v2)); - fprintf(outfile, "\ttriangle {\n"); - fprintf(outfile, "\t <%.6f,%.6f,%.6f>,\n", - V0[0], V0[2], V0[1]); - fprintf(outfile, "\t <%.6f,%.6f,%.6f>,\n", - V1[0], V1[2], V1[1]); - fprintf(outfile, "\t <%.6f,%.6f,%.6f>\n", - V2[0], V2[2], V2[1]); - fprintf(outfile, "\t}\n"); - fprintf(outfile, "\tpigment { color rgb<%.4f,%.4f,%.4f> }\n", - color[0], color[1], color[2]); - fprintf(outfile, "\tfinish { metallic specular 0.5 }\n"); - fprintf(outfile, " }\n"); - } - - void northcap() { - vector v0(0, 0, 1); - for (int i = 1; i <= phisteps(); i++) { - fprintf(outfile, " // northcap i = %d\n", i); - vector v1(htheta(), (i - 1) * hphi()); - vector v2(htheta(), i * hphi()); - triangle(v0, v1, v2); - } - } - - void southcap() { - vector v0(0, 0, -1); - for (int i = 1; i <= phisteps(); i++) { - fprintf(outfile, " // southcap i = %d\n", i); - vector v1(M_PI - htheta(), (i - 1) * hphi()); - vector v2(M_PI - htheta(), i * hphi()); - triangle(v0, v1, v2); - } - } - - void zone() { - for (int j = 1; j < thetasteps() - 1; j++) { - for (int i = 1; i <= phisteps(); i++) { - fprintf(outfile, " // zone j = %d, i = %d\n", - j, i); - vector v0( j * htheta(), (i-1) * hphi()); - vector v1((j+1) * htheta(), (i-1) * hphi()); - vector v2( j * htheta(), i * hphi()); - vector v3((j+1) * htheta(), i * hphi()); - triangle(v0, v1, v2); - triangle(v1, v2, v3); - } - } - } -public: - void draw() { - northcap(); - southcap(); - zone(); - } -}; - -/** - * \brief main function - */ -int main(int argc, char *argv[]) { - surface S("spherecurve.inc", 5, 10); - color::green = 1.0; - S.draw(); - std::cout << "umin: " << S.umin() << std::endl; - std::cout << "umax: " << S.umax() << std::endl; - return EXIT_SUCCESS; -} diff --git a/buch/papers/kugel/images/spherecurve.m b/buch/papers/kugel/images/spherecurve.m deleted file mode 100644 index 99d5c9a..0000000 --- a/buch/papers/kugel/images/spherecurve.m +++ /dev/null @@ -1,160 +0,0 @@ -# -# spherecurve.m -# -# (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule -# -global a; -a = 5; -global A; -A = 10; - -phisteps = 400; -hphi = 2 * pi / phisteps; -thetasteps = 200; -htheta = pi / thetasteps; - -function retval = f(z) - global a; - global A; - retval = A * exp(a * (z^2 - 1)); -endfunction - -function retval = g(z) - global a; - retval = -f(z) * 2 * a * (2 * a * z^4 + (3 - 2*a) * z^2 - 1); - # 2 - # - a 2 4 2 2 a z - #(%o6) - %e (4 a z + (6 a - 4 a ) z - 2 a) %e -endfunction - -phi = (1 + sqrt(5)) / 2; - -global axes; -axes = [ - 0, 0, 1, -1, phi, -phi; - 1, -1, phi, phi, 0, 0; - phi, phi, 0, 0, 1, 1; -]; -axes = axes / (sqrt(phi^2+1)); - -function retval = kugel(theta, phi) - retval = [ - cos(phi) * sin(theta); - sin(phi) * sin(theta); - cos(theta) - ]; -endfunction - -function retval = F(v) - global axes; - s = 0; - for i = (1:6) - z = axes(:,i)' * v; - s = s + f(z); - endfor - retval = s / 6; -endfunction - -function retval = F2(theta, phi) - v = kugel(theta, phi); - retval = F(v); -endfunction - -function retval = G(v) - global axes; - s = 0; - for i = (1:6) - s = s + g(axes(:,i)' * v); - endfor - retval = s / 6; -endfunction - -function retval = G2(theta, phi) - v = kugel(theta, phi); - retval = G(v); -endfunction - -function retval = cnormalize(u) - utop = 11; - ubottom = -30; - retval = (u - ubottom) / (utop - ubottom); - if (retval > 1) - retval = 1; - endif - if (retval < 0) - retval = 0; - endif -endfunction - -global umin; -umin = 0; -global umax; -umax = 0; - -function color = farbe(v) - global umin; - global umax; - u = G(v); - if (u < umin) - umin = u; - endif - if (u > umax) - umax = u; - endif - u = cnormalize(u); - color = [ u, 0.5, 1-u ]; - color = color/max(color); -endfunction - -function dreieck(fn, v0, v1, v2) - fprintf(fn, " mesh {\n"); - c = (v0 + v1 + v2) / 3; - c = c / norm(c); - color = farbe(c); - v0 = v0 * (1 + F(v0)); - v1 = v1 * (1 + F(v1)); - v2 = v2 * (1 + F(v2)); - fprintf(fn, "\ttriangle {\n"); - fprintf(fn, "\t <%.6f,%.6f,%.6f>,\n", v0(1,1), v0(3,1), v0(2,1)); - fprintf(fn, "\t <%.6f,%.6f,%.6f>,\n", v1(1,1), v1(3,1), v1(2,1)); - fprintf(fn, "\t <%.6f,%.6f,%.6f>\n", v2(1,1), v2(3,1), v2(2,1)); - fprintf(fn, "\t}\n"); - fprintf(fn, "\tpigment { color rgb<%.4f,%.4f,%.4f> }\n", - color(1,1), color(1,2), color(1,3)); - fprintf(fn, "\tfinish { metallic specular 0.5 }\n"); - fprintf(fn, " }\n"); -endfunction - -fn = fopen("spherecurve2.inc", "w"); - - for i = (1:phisteps) - # Polkappe nord - v0 = [ 0; 0; 1 ]; - v1 = kugel(htheta, (i-1) * hphi); - v2 = kugel(htheta, i * hphi); - fprintf(fn, " // i = %d\n", i); - dreieck(fn, v0, v1, v2); - - # Polkappe sued - v0 = [ 0; 0; -1 ]; - v1 = kugel(pi-htheta, (i-1) * hphi); - v2 = kugel(pi-htheta, i * hphi); - dreieck(fn, v0, v1, v2); - endfor - - for j = (1:thetasteps-2) - for i = (1:phisteps) - v0 = kugel( j * htheta, (i-1) * hphi); - v1 = kugel((j+1) * htheta, (i-1) * hphi); - v2 = kugel( j * htheta, i * hphi); - v3 = kugel((j+1) * htheta, i * hphi); - fprintf(fn, " // i = %d, j = %d\n", i, j); - dreieck(fn, v0, v1, v2); - dreieck(fn, v1, v2, v3); - endfor - endfor - -fclose(fn); - -umin -umax diff --git a/buch/papers/kugel/images/spherecurve.maxima b/buch/papers/kugel/images/spherecurve.maxima deleted file mode 100644 index 1e9077c..0000000 --- a/buch/papers/kugel/images/spherecurve.maxima +++ /dev/null @@ -1,13 +0,0 @@ -/* - * spherecurv.maxima - * - * (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule - */ -f: exp(-a * sin(theta)^2); - -g: ratsimp(diff(sin(theta) * diff(f, theta), theta)/sin(theta)); -g: subst(z, cos(theta), g); -g: subst(sqrt(1-z^2), sin(theta), g); -ratsimp(g); - -f: ratsimp(subst(sqrt(1-z^2), sin(theta), f)); diff --git a/buch/papers/kugel/images/spherecurve.pov b/buch/papers/kugel/images/spherecurve.pov deleted file mode 100644 index b1bf4b8..0000000 --- a/buch/papers/kugel/images/spherecurve.pov +++ /dev/null @@ -1,73 +0,0 @@ -// -// curvature.pov -// -// (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule -// - -#version 3.7; -#include "colors.inc" - -global_settings { - assumed_gamma 1 -} - -#declare imagescale = 0.13; - -camera { - location <10, 10, -40> - look_at <0, 0, 0> - right x * imagescale - up y * imagescale -} - -light_source { - <-10, 10, -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 to with thickness with -// color -// -#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(<-2.7,0,0>, <2.7,0,0>, 0.03, White) -arrow(<0,-2.7,0>, <0,2.7,0>, 0.03, White) -arrow(<0,0,-2.7>, <0,0,2.7>, 0.03, White) - -#include "spherecurve.inc" - diff --git a/buch/papers/kugel/main.tex b/buch/papers/kugel/main.tex index 98d9cb2..d063f87 100644 --- a/buch/papers/kugel/main.tex +++ b/buch/papers/kugel/main.tex @@ -14,6 +14,7 @@ \input{papers/kugel/preliminaries} \input{papers/kugel/spherical-harmonics} \input{papers/kugel/applications} +\input{papers/kugel/proofs} \printbibliography[heading=subbibliography] \end{refsection} diff --git a/buch/papers/kugel/packages.tex b/buch/papers/kugel/packages.tex index 61f91ad..ead7653 100644 --- a/buch/papers/kugel/packages.tex +++ b/buch/papers/kugel/packages.tex @@ -1,3 +1,4 @@ +% vim:ts=2 sw=2 et: % % packages.tex -- packages required by the paper kugel % @@ -7,4 +8,13 @@ % if your paper needs special packages, add package commands as in the % following example %\usepackage{packagename} +\usepackage{cases} +\newcommand{\kugeltodo}[1]{\textcolor{red!70!black}{\texttt{[TODO: #1]}}} +\newcommand{\kugelplaceholderfig}[2]{ \begin{tikzpicture}% + \fill[lightgray!20] (0, 0) rectangle (#1, #2);% + \node[gray, anchor = center] at ({#1 / 2}, {#2 / 2}) {\Huge \ttfamily \bfseries TODO}; + \end{tikzpicture}} + +\DeclareMathOperator{\sphlaplacian}{\nabla^2_{\mathit{S}}} +\DeclareMathOperator{\surflaplacian}{\nabla^2_{\partial \mathit{S}}} diff --git a/buch/papers/kugel/preliminaries.tex b/buch/papers/kugel/preliminaries.tex index 03cd421..e48abe4 100644 --- a/buch/papers/kugel/preliminaries.tex +++ b/buch/papers/kugel/preliminaries.tex @@ -44,23 +44,23 @@ numbers \(\mathbb{R}\). \) \end{definition} -\texttt{TODO: Text here.} +\kugeltodo{Text here.} \begin{definition}[Span] \end{definition} -\texttt{TODO: Text here.} +\kugeltodo{Text here.} \begin{definition}[Linear independence] \end{definition} -\texttt{TODO: Text here.} +\kugeltodo{Text here.} \begin{definition}[Basis] \end{definition} -\texttt{TODO: Text here.} +\kugeltodo{Text here.} \begin{definition}[Inner product] \label{kugel:def:inner-product} \nocite{axler_linear_2014} diff --git a/buch/papers/kugel/proofs.tex b/buch/papers/kugel/proofs.tex new file mode 100644 index 0000000..143caa8 --- /dev/null +++ b/buch/papers/kugel/proofs.tex @@ -0,0 +1,245 @@ +% vim:ts=2 sw=2 et spell tw=80: +\section{Proofs} + +\subsection{Legendre Functions} \label{kugel:sec:proofs:legendre} + +\kugeltodo{Fix theorem numbers to match, review text.} + +\begin{lemma} + The polynomial function + \begin{align*} + y_n(x)&=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} (-1)^k \frac{(2n-2k)!}{2^n k! (n-k)!(n-2k)!} x^{n-2k}\\ + &= \frac{1}{n!2^n}\frac{d^n}{dx^n}(1-x^2)^n =: P_n(x), + \end{align*} + is a solution to the second order differential equation + \begin{equation}\label{kugel:eq:sol_leg} + (1-x^2)\frac{d^2y}{dx^2}-2x\frac{dy}{dx} + n(n+1)y=0, \quad \forall n>0. + \end{equation} +\end{lemma} +\begin{proof} + In order to find a solution to Eq.\eqref{eq:legendre}, the following Ansatz can be performed: + \begin{equation}\label{eq:ansatz} + y(x) = \sum_{k=0}^\infty a_k x^k. + \end{equation} + Given Eq.\eqref{eq:ansatz}, then + \begin{align*} + \frac{dy}{dx} &= \sum_{k=0}^\infty k a_k x^{k-1}, \\ + \frac{d^2y}{dx^2} &= \sum_{k=0}^\infty k (k-1) a_k x^{k-2}. + \end{align*} + Eq.\eqref{eq:legendre} can be therefore written as + \begin{align} + &(1-x^2)\sum_{k=0}^\infty k (k-1) a_k x^{k-2} - 2x\sum_{k=0}^\infty k a_k x^{k-1} + n(n+1)\sum_{k=0}^\infty a_k x^k=0 \label{eq:ansatz_in_legendre} \\ + &=\sum_{k=0}^\infty k (k-1) a_k x^{k-2} - \sum_{k=0}^\infty k (k-1) a_k x^{k} - 2x\sum_{k=0}^\infty k a_k x^{k-1} + n(n+1)\sum_{k=0}^\infty a_k x^k=0. \nonumber + \end{align} + If one consider the term + \begin{equation}\label{eq:term} + \sum_{k=0}^\infty k (k-1) a_k x^{k-2}, + \end{equation} + the substitution $\tilde{k}=k-2$ yields Eq.\eqref{eq:term} to + \begin{equation*} + \sum_{\tilde{k}=-2}^\infty (\tilde{k}+2) (\tilde{k}+1) a_{\tilde{k}+2} x^{\tilde{k}}=\sum_{\tilde{k}=0}^\infty (\tilde{k}+2) (\tilde{k}+1) a_{\tilde{k}} x^{\tilde{k}}. + \end{equation*} + This means that Eq.\eqref{eq:ansatz_in_legendre} becomes + \begin{align} + &\sum_{k=0}^\infty (k+1)(k+2) a_{k+2} x^{k} - \sum_{k=0}^\infty k (k-1) a_k x^{k} - 2\sum_{k=0}^\infty k a_k x^k + n(n+1)\sum_{k=0}^\infty a_k x^k \nonumber \\ + = &\sum_{k=0}^\infty \big[ (k+1)(k+2) a_{k+2} - k (k-1) a_k - 2 k a_k + n(n+1) a_k \big] x^k \stackrel{!}{=} 0. \label{eq:condition} + \end{align} + The condition in Eq.\eqref{eq:condition} is equivalent to + \begin{equation}\label{eq:condition_2} + (k+1)(k+2) a_{k+2} - k (k-1) a_k - 2 k a_k + n(n+1) a_k = 0. + \end{equation} + We can derive a recursion formula for $a_{k+2}$ from Eq.\eqref{eq:condition_2}, which can be expressed as + \begin{equation}\label{eq:recursion} + a_{k+2}= \frac{k (k-1) - 2 k + n(n+1)}{(k+1)(k+2)}a_k = \frac{(k-n)(k+n+1)}{(k+2)(k+1)}a_k. + \end{equation} + All coefficients can be calculated using the latter. + + Following Eq.\eqref{eq:recursion}, if we want to compute $a_6$ we would have + \begin{align*} + a_{6}= -\frac{(n-4)(n+5)}{6\cdot 5}a_4 &= -\frac{(n-4)(5+n)}{6 \cdot 5} -\frac{(n-2)(n+3)}{4 \cdot 3} a_2 \\ + &= -\frac{(n-4)(n+5)}{6 \cdot 5} -\frac{(n-2)(n+3)}{4 \cdot 3} -\frac{n(n+1)}{2 \cdot 1} a_0 \\ + &= -\frac{(n+5)(n+3)(n+1)n(n-2)(n-4)}{6!} a_0. + \end{align*} + One can generalize this relation for the $i^\text{th}$ even coefficient as + \begin{equation*} + a_{2k} = (-1)^k \frac{(n+(2k-1))(n+(2k-1)-2)\hdots (n-(2k-2)+2)(n-(2k-2))}{(2k)!}a_0 + \end{equation*} + where $i=2k$. + + A similar expression can be written for the odd coefficients $a_{2k-1}$. In this case, the equation starts from $a_1$ and to find the pattern we can write the recursion for an odd coefficient, $a_7$ for example + \begin{align*} + a_{7}= -\frac{(n-5)(n+6)}{7\cdot 6}a_5 &= - \frac{(n-5)(n+6)}{7\cdot 6} -\frac{(n-3)(n+4)}{5 \cdot 4} a_3 \\ + &= - \frac{(n-5)(n+6)}{7\cdot 6} -\frac{(n-3)(n+4)}{5 \cdot 4} -\frac{(n-1)(n+2)}{3 \cdot 2} a_1 \\ + &= -\frac{(n+6)(n+4)(n+2)(n-1)(n-3)(n-5)}{7!} a_1. + \end{align*} + As before, we can generalize this equation for the $i^\text{th}$ odd coefficient + \begin{equation*} + a_{2k+1} = (-1)^k \frac{(n + 2k)(n+2k-2)\hdots(n-(2k-1)+2)(n-(2k-1))}{(2k+1)!}a_1 + \end{equation*} + where $i=2k+1$. + + Let be + \begin{align*} + y_\text{e}^K(x) &:= \sum_{k=0}^K(-1)^k \frac{(n+(2k-1))(n+(2k-1)-2)\hdots \color{red}(n-(2k-2)+2)(n-(2k-2))}{(2k)!} x^{2k}, \\ + y_\text{o}^K(x) &:= \sum_{k=0}^K(-1)^k \frac{(n + 2k)(n+2k-2)\hdots \color{blue} (n-(2k-1)+2)(n-(2k-1))}{(2k+1)!} x^{2k+1}. + \end{align*} + The solution to the Eq.\eqref{eq:legendre} can be written as + \begin{equation}\label{eq:solution} + y(x) = \lim_{K \to \infty} \left[ a_0 y_\text{e}^K(x) + a_1 y_\text{o}^K(x) \right]. + \end{equation} + + The colored parts can be analyzed separately: + \begin{itemize} + \item[\textcolor{red}{\textbullet}] Suppose that $n=n_0$ is an even number. Then the red part, for a specific value of $k=k_0$, will follow the following relation: + \begin{equation*} + n_0-(2k_0-2)=0. + \end{equation*} + From that point on, given the recursive nature of Eq.\eqref{eq:recursion}, all the subsequent coefficients will also be 0, making the sum finite. + \begin{equation*} + a_{2k}=0 \iff y_{\text{o}}^{2k}(x)=y_{\text{o}}^{2k_0}(x), \quad \forall k>k_0 + \end{equation*} + \item[\textcolor{blue}{\textbullet}] Suppose that $n=n_0$ is an odd number. Then the blue part, for a specific value of $k=k_0$, will follow the following relation + \begin{equation*} + n_0-(2k_0-1)=0. + \end{equation*} + From that point on, for the same reason as before, all the subsequent coefficients will also be 0, making the sum finite. + \begin{equation*} + a_{2k+1}=0 \iff y_{\text{o}}^{2k+1}(x)=y_{\text{o}}^{2k_0+1}(x), \quad \forall k>k_0 + \end{equation*} + \end{itemize} + + There is the possibility of expressing the solution in Eq.\eqref{eq:solution} in a more compact form, combining the two solutions $y_\text{o}^K(x)$ and $y_\text{e}^K(x)$. They are both a polynomial of maximum degree $n$, assuming $n \in \mathbb{N}$. In the case where $n$ is even, the polynomial solution + \begin{equation*} + \lim_{K\to \infty} y_\text{e}^K(x) + \end{equation*} + will be a finite sum. If instead $n$ is odd, will be + \begin{equation*} + \lim_{K\to \infty} y_\text{o}^K(x) + \end{equation*} + to be a finite sum. + + Depending on the coefficient we start with, $a_1$ or $a_0$, we will obtain the odd or even polynomial respectively. Starting with the last coefficient $a_n$ and, recursively, calculating all the others in descending order, we can express the two parts $y_\text{o}^K(x)$ and $y_\text{e}^K(x)$ with a single sum. Hence, because we start with the last coefficient, the choice concerning $a_1$ and $a_0$ will be at the end of the sum, and not at the beginning. To compact Eq.\eqref{eq:solution}, Eq.\eqref{eq:recursion} can be reconsidered to calculate the coefficient $a_{k-2}$, using $a_k$ + \begin{equation*} + a_{k-2} = -\frac{(k+2)(k+1)}{(k-n)(k+n+1)}a_k + \end{equation*} + Now the game is to find a pattern, as before. Remember that $n$ is a fixed parameter of Eq.\eqref{eq:legendre}. + \begin{align*} + a_{n-2} &= -\frac{n(n-1)}{2(2n-1)}a_n, \\ + a_{n-4} &= -\frac{(n-2)(n-3)}{4(2n-3)}a_{n-2} \\ + &= -\frac{(n-2)(n-3)}{4(2n-3)}-\frac{n(n-1)}{2(2n-1)}a_n. + \end{align*} + In general + \begin{equation}\label{eq:general_recursion} + a_{n-2k} = (-1)^k \frac{n(n-1)(n-2)(n-3) \hdots (n-2k+1)}{2\cdot4\hdots 2k(2n-1)(2n-3)\hdots(2n-2k+1)}a_n + \end{equation} + The whole solution can now be written as + \begin{align} + y(x) &= a_n x^n + a_{n-2} x^{n-2} + a_{n-4} x^{n-4} + a_{n-6} x^{n-6} + \hdots + \begin{cases} + a_1 x, \quad &\text{if } n \text{ odd} \\ + a_0, \quad &\text{if } n \text{ even} + \end{cases} \nonumber \\ + &= \sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} a_{n-2k}x^{n-2k} \label{eq:solution_2} + \end{align} + By considering + \begin{align} + (2n-1)(2n-3)\hdots (2n-2k+1)&=\frac{2n(2n-1)(2n-2)(2n-3)\hdots(2n-2k+1)} + {2n(2n-2)(2n-4)(2n-6)\hdots(2n-2k+2)} \nonumber \\ + &=\frac{\frac{(2n)!}{(2n-2k)!}} + {2^kn(n-1)(n-2)(n-3)\hdots(n-k+1)} \nonumber \\ + &=\frac{\frac{(2n)!}{(2n-2k)!}} + {2^k\frac{n!}{(n-k)!}}=\frac{(n-k)!(2n)!}{n!(2n-2k)!2^k} \label{eq:1_sub_recursion}, \\ + 2 \cdot 4 \hdots 2k &= 2^r 1\cdot2 \hdots r = 2^r r!\label{eq:2_sub_recursion}, \\ + n(n-1)(n-2)(n-3) \hdots (n-2k+1) &= \frac{n!}{(n-2k)!}\label{eq:3_sub_recursion}. + \end{align} + Eq.\eqref{eq:solution_2} can be rewritten as + \begin{equation}\label{eq:solution_3} + y(x)=a_n \sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} (-1)^k \frac{n!^2(2n-2k)!}{k!(n-2k)!(n-k)!(2n)!} x^{n-2k}. + \end{equation} + Eq.\eqref{eq:solution_3} is defined for any $a_n$. By letting $a_n$ be declared as + \begin{equation*} + a_{n} := \frac{(2n)!}{2^n n!^2}, + \end{equation*} + the so called \emph{Legendre polynomial} emerges + \begin{equation}\label{eq:leg_poly} + P_n(x):=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} (-1)^k \frac{(2n-2k)!}{2^n k! (n-k)!(n-2k)!} x^{n-2k} + \end{equation} +\end{proof} + + +\begin{lemma} + If $Z_n(z)$ is a solution of the Legendre equation \eqref{kugel:eqn:legendre}, + then + \begin{equation*} + P^m_n(z) = (1 - z^2)^{m/2} \frac{d^m}{dz^m}Z_n(z) + \end{equation*} + solves the associated Legendre equation \eqref{kugel:eqn:associated-legendre}. +\end{lemma} +% \begin{proof} [TODO: modificare la $m$ (è già usata come costante di separazione) o forse è giusta (?)] +\begin{proof} + To begin, we can start by differentiating $m$ times Eq.\eqref{kugel:eq:leg_eq} (which is staisfied by $y(x)$), obtaining + \begin{equation}\label{eq:lagrange_mderiv} + \frac{d^m}{dx^m}\left[ (1-x^2)\frac{d^2y}{dx^2} \right] -2 \frac{d^m}{dx^m}\left[ x\frac{dy}{dx} \right] + n(n+1)\frac{d^m}{dx^m}y=0. + \end{equation} + \emph{Leibniz's theorem} says, that if we want to differentiate $m$ times a multiplication of two functions, we can use the binomial coefficients to build up a sum. This allows us to be more compact, obtaining + \begin{equation}\label{eq:leibniz} + \frac{d^m}{dx^m}[u(x)v(x)] = \sum_{i=0}^m \binom{n}{i} \frac{d^{m-i}u}{dx^{m-1}} \frac{d^{i}v}{dx^i}. + \end{equation} + Using Eq.\eqref{eq:leibniz} in Eq.\eqref{eq:lagrange_mderiv}, we have + \begin{align} + (1-x^2)\frac{d^{m+2}y}{dx^{m+2}} &+ m \frac{d}{dx}(1-x^2)\frac{d^{m+1}y}{dx^{m+1}} + \frac{m(m-1)}{2}\frac{d^{2}}{dx^{2}}(1-x^2)\frac{d^{m}y}{dx^{m}} + n(n+1)\frac{d^m{}y}{dx^{m}} \nonumber \\ + &-2\left(x\frac{d^{m+1}y}{dx^{m+1}} + m\frac{d}{dx}x\frac{d^{m}y}{dx^{m}} \right) \nonumber \\ + &= (1-x^2)\frac{d^{m+2}y}{dx^{m+2}} -2x(m+1)\frac{d^{m+1}y}{dx^{m+1}}+(n(n+1)-m(m-1)-2m)\frac{d^{m}y}{dx^{m}}=0. \label{eq:aux_3} + \end{align} + To make the notation easier to follow, a new function can be defined + \begin{equation*} + \frac{d^{m}y}{dx^{m}} := y_m. + \end{equation*} + Eq.\eqref{eq:aux_3} now becomes + \begin{equation}\label{eq:1st_subs} + (1-x^2)\frac{d^{2}y_m}{dx^{2}} -2x(m+1)\frac{dy_m}{dx}+(n(n+1)-m(m+1))y_m=0 + \end{equation} + A second function can be further defined as + \begin{equation*} + (1-x^2)^{\frac{m}{2}}\frac{d^{m}y}{dx^{m}} = (1-x^2)^{\frac{m}{2}}y_m := \hat{y}_m, + \end{equation*} + allowing to write Eq.\eqref{eq:1st_subs} as + \begin{equation}\label{eq:2st_subs} + (1-x^2)\frac{d^2}{dx^2}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] -2(m+1)x\frac{d}{dx}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] + (n(n+1)-m(m+1))\hat{y}_m(1-x^2)^{-\frac{m}{2}}=0. + \end{equation} + The goal now is to compute the two terms + \begin{align*} + \frac{d^2}{dx^2}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] &= \frac{d^2\hat{y}_m}{dx^2} (1-x^2)^{-\frac{m}{2}} + \frac{d\hat{y}_m}{dx}\frac{m}{2}(1-x^2)^{-\frac{m}{2}-1}2x \\ + &+ m\left( \frac{d\hat{y}_m}{dx} x (1-x^2)^{-\frac{m}{2}-1} + \hat{y}_m (1-x^2)^{-\frac{m}{2}-1} - \hat{y}_m x (-\frac{m}{2}-1)(1-x^2)^{-\frac{m}{2}} 2x\right) \\ + &= \frac{d^2\hat{y}_m}{dx^2} (1-x^2)^{-\frac{m}{2}} + \frac{d\hat{y}_m}{dx}mx (1-x^2)^{-\frac{m}{2}-1} + m\frac{d\hat{y}_m}{dx}x (1-x^2)^{-\frac{m}{2}-1}\\ + &+ m\hat{y}_m (1-x^2)^{-\frac{m}{2}-1} + m\hat{y}_m x^2(m+2)(1-x^2)^{-\frac{m}{2}-2} + \end{align*} + and + \begin{align*} + \frac{d}{dx}[\hat{y}_m(1-x^2)^{-\frac{m}{2}}] &= \frac{d\hat{y}_m}{dx}(1-x^2)^{-\frac{m}{2}} + \hat{y}_m\frac{m}{2}(1-x^2)^{-\frac{m}{2}-1}2x \\ + &= \frac{d\hat{y}_m}{dx}(1-x^2)^{-\frac{m}{2}} + \hat{y}_mm(1-x^2)^{-\frac{m}{2}-1}x, + \end{align*} + to use them in Eq.\eqref{eq:2st_subs}, obtaining + \begin{align*} + (1-x^2)\biggl[\frac{d^2\hat{y}_m}{dx^2} (1-x^2)^{-\frac{m}{2}} &+ \frac{d\hat{y}_m}{dx}mx (1-x^2)^{-\frac{m}{2}-1} + m\frac{d\hat{y}_m}{dx}x (1-x^2)^{-\frac{m}{2}-1} \\ + &+ m\hat{y}_m (1-x^2)^{-\frac{m}{2}-1} + m\hat{y}_m x^2(m+2)(1-x^2)^{-\frac{m}{2}-2}\biggr] \\ + &-2(m+1)x\left[ \frac{d\hat{y}_m}{dx}(1-x^2)^{-\frac{m}{2}} + \hat{y}_mm(1-x^2)^{-\frac{m}{2}-1}x \right] \\ + &+ (n(n+1)-m(m+1))\hat{y}_m(1-x^2)^{-\frac{m}{2}}=0.\\ + \end{align*} + We can now divide by $(1-x^2)^{-\frac{m}{2}}$, obtaining + \begin{align*} + (1-x^2)\biggl[\frac{d^2\hat{y}_m}{dx^2} &+ \frac{d\hat{y}_m}{dx}mx (1-x^2)^{-1} + m\frac{d\hat{y}_m}{dx}x (1-x^2)^{-1} + m\hat{y}_m (1-x^2)^{-1} + m\hat{y}_m x^2(m+2)(1-x^2)^{-2}\biggr] \\ + &-2(m+1)x\left[ \frac{d\hat{y}_m}{dx} + \hat{y}_mm(1-x^2)^{-1}x \right] + (n(n+1)-m(m+1))\hat{y}_m\\ + &= \frac{d^2\hat{y}_m}{dx^2} + \frac{d\hat{y}_m}{dx}mx + m\frac{d\hat{y}_m}{dx}x + m\hat{y}_m + m\hat{y}_m x^2(m+2)(1-x^2)^{-1} \\ + &-2(m+1)x\left[ \frac{d\hat{y}_m}{dx} + \hat{y}_mm(1-x^2)^{-1}x \right] + (n(n+1)-m(m+1))\hat{y}_m\\ + \end{align*} + and collecting some terms + \begin{equation*} + (1-x^2)\frac{d^2\hat{y}_m}{dx^2} - 2x\frac{d\hat{y}_m}{dx} + \left( -x^2 \frac{m^2}{1-x^2} + m+n(n+1)-m(m+1)\right)\hat{y}_m=0. + \end{equation*} + Showing that + \begin{align*} + -x^2 \frac{m^2}{1-x^2} + m+n(n+1)-m(m+1) &= n(n+1)- m^2 -x^2 \frac{m^2}{1-x^2} \\ + &= n(n+1)- \frac{m}{1-x^2} + \end{align*} + implies $\hat{y}_m(x)$ being a solution of Eq.\eqref{kugel:eq:associated_leg_eq} +\end{proof} diff --git a/buch/papers/kugel/references.bib b/buch/papers/kugel/references.bib index b74c5cd..e5d6452 100644 --- a/buch/papers/kugel/references.bib +++ b/buch/papers/kugel/references.bib @@ -192,4 +192,15 @@ Created by Henry Reich}, urldate = {2022-08-01}, date = {2022}, file = {Metric Spaces\: Completeness:/Users/npross/Zotero/storage/5JYEE8NF/completeness.html:text/html}, +} + +@book{bell_special_2004, + location = {Mineola, {NY}}, + title = {Special functions for scientists and engineers}, + isbn = {978-0-486-43521-3}, + series = {Dover books on mathematics}, + pagetotal = {247}, + publisher = {Dover Publ}, + author = {Bell, William Wallace}, + date = {2004}, } \ No newline at end of file diff --git a/buch/papers/kugel/spherical-harmonics.tex b/buch/papers/kugel/spherical-harmonics.tex index 6b23ce5..2ded50b 100644 --- a/buch/papers/kugel/spherical-harmonics.tex +++ b/buch/papers/kugel/spherical-harmonics.tex @@ -1,13 +1,410 @@ -% vim:ts=2 sw=2 et spell: +% vim:ts=2 sw=2 et spell tw=80: -\section{Spherical Harmonics} +\section{Construction of the Spherical Harmonics} -\subsection{Eigenvalue Problem in Spherical Coordinates} +\kugeltodo{Review text, or rewrite if preliminaries becomes an addendum} + +We finally arrived at the main section, which gives our chapter its name. The +idea is to discuss spherical harmonics, their mathematical derivation and some +of their properties and applications. + +The subsection \ref{} \kugeltodo{Fix references} will be devoted to the +Eigenvalue problem of the Laplace operator. Through the latter we will derive +the set of Eigenfunctions that obey the equation presented in \ref{} +\kugeltodo{reference to eigenvalue equation}, which will be defined as +\emph{Spherical Harmonics}. In fact, this subsection will present their +mathematical derivation. + +In the subsection \ref{}, on the other hand, some interesting properties +related to them will be discussed. Some of these will come back to help us +understand in more detail why they are useful in various real-world +applications, which will be presented in the section \ref{}. + +One specific property will be studied in more detail in the subsection \ref{}, +namely the recursive property. The last subsection is devoted to one of the +most beautiful applications (In our humble opinion), namely the derivation of a +Fourier-style series expansion but defined on the sphere instead of a plane. +More importantly, this subsection will allow us to connect all the dots we have +created with the previous sections, concluding that Fourier is just a specific +case of the application of the concept of orthogonality. Our hope is that after +reading this section you will appreciate the beauty and power of generalization +that mathematics offers us. + +\subsection{Eigenvalue Problem} +\label{kugel:sec:construction:eigenvalue} + +\begin{figure} + \centering + \includegraphics{papers/kugel/figures/tikz/spherical-coordinates} + \caption{ + Spherical coordinate system. Space is described with the free variables $r + \in \mathbb{R}_0^+$, $\vartheta \in [0; \pi]$ and $\varphi \in [0; 2\pi)$. + \label{kugel:fig:spherical-coordinates} + } +\end{figure} + +From Section \ref{buch:pde:section:kugel}, we know that the spherical Laplacian +in the spherical coordinate system (shown in Figure +\ref{kugel:fig:spherical-coordinates}) is is defined as +\begin{equation*} + \sphlaplacian := + \frac{1}{r^2} \frac{\partial}{\partial r} \left( + r^2 \frac{\partial}{\partial r} + \right) + + \frac{1}{r^2} \left[ + \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( + \sin\vartheta \frac{\partial}{\partial\vartheta} + \right) + + \frac{1}{\sin^2 \vartheta} \frac{\partial^2}{\partial\varphi^2} + \right]. +\end{equation*} +But we will not consider this algebraic monstrosity in its entirety. As the +title suggests, we will only care about the \emph{surface} of the sphere. This +is for many reasons, but mainly to simplify reduce the already broad scope of +this text. Concretely, we will always work on the unit sphere, which just means +that we set $r = 1$ and keep only $\vartheta$ and $\varphi$ as free variables. +Now, since the variable $r$ became a constant, we can leave out all derivatives +with respect to $r$ and substitute all $r$'s with 1's to obtain a new operator +that deserves its own name. + +\begin{definition}[Surface spherical Laplacian] + \label{kugel:def:surface-laplacian} + The operator + \begin{equation*} + \surflaplacian := + \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( + \sin\vartheta \frac{\partial}{\partial\vartheta} + \right) + + \frac{1}{\sin^2 \vartheta} \frac{\partial^2}{\partial\varphi^2}, + \end{equation*} + is called the surface spherical Laplacian. +\end{definition} + +In the definition, the subscript ``$\partial S$'' was used to emphasize the +fact that we are on the spherical surface, which can be understood as being the +boundary of the sphere. But what does it actually do? To get an intuition, +first of all, notice the fact that $\surflaplacian$ have second derivatives, +which means that this a measure of \emph{curvature}; But curvature of what? To +get an even stronger intuition we will go into geometry, were curvature can be +grasped very well visually. Consider figure \ref{kugel:fig:curvature} where the +curvature is shown using colors. First we have the curvature of a curve in 1D, +then the curvature of a surface (2D), and finally the curvature of a function on +the surface of the unit sphere. + +\begin{figure} + \centering + \includegraphics[width=.3\linewidth]{papers/kugel/figures/tikz/curvature-1d} + \hskip 5mm + \includegraphics[width=.3\linewidth]{papers/kugel/figures/povray/curvature} + \hskip 5mm + \includegraphics[width=.3\linewidth]{papers/kugel/figures/povray/spherecurve} + \caption{ + \kugeltodo{Fix alignment / size, add caption. Would be nice to match colors.} + \label{kugel:fig:curvature} + } +\end{figure} + +Now that we have defined an operator, we can go and study its eigenfunctions, +which means that we would like to find the functions $f(\vartheta, \varphi)$ +that satisfy the equation +\begin{equation} \label{kuvel:eqn:eigen} + \surflaplacian f = -\lambda f. +\end{equation} +Perhaps it may not be obvious at first glance, but we are in fact dealing with a +partial differential equation (PDE) \kugeltodo{Boundary conditions?}. If we +unpack the notation of the operator $\nabla^2_{\partial S}$ according to +definition +\ref{kugel:def:surface-laplacian}, we get: +\begin{equation} \label{kugel:eqn:eigen-pde} + \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( + \sin\vartheta \frac{\partial f}{\partial\vartheta} + \right) + + \frac{1}{\sin^2 \vartheta} \frac{\partial^2 f}{\partial\varphi^2} + + \lambda f = 0. +\end{equation} +Since all functions satisfying \eqref{kugel:eqn:eigen-pde} are the +\emph{eigenfunctions} of $\surflaplacian$, our new goal is to solve this PDE. +The task may seem very difficult but we can simplify it with a well-known +technique: \emph{the separation Ansatz}. It consists in assuming that the +function $f(\vartheta, \varphi)$ can be factorized in the following form: +\begin{equation} + f(\vartheta, \varphi) = \Theta(\vartheta)\Phi(\varphi). +\end{equation} +In other words, we are saying that the effect of the two independent variables +can be described using the multiplication of two functions that describe their +effect separately. This separation process was already presented in section +\ref{buch:pde:section:kugel}, but we will briefly rehearse it here for +convenience. If we substitute this assumption in +\eqref{kugel:eqn:eigen-pde}, we have: +\begin{equation*} + \frac{1}{\sin\vartheta} \frac{\partial}{\partial \vartheta} \left( + \sin\vartheta \frac{\partial \Theta(\vartheta)}{\partial\vartheta} + \right) \Phi(\varphi) + + \frac{1}{\sin^2 \vartheta} + \frac{\partial^2 \Phi(\varphi)}{\partial\varphi^2} + \Theta(\vartheta) + + \lambda \Theta(\vartheta)\Phi(\varphi) = 0. +\end{equation*} +Dividing by $\Theta(\vartheta)\Phi(\varphi)$ and introducing an auxiliary +variable $m^2$, the separation constant, yields: +\begin{equation*} + \frac{1}{\Theta(\vartheta)}\sin \vartheta \frac{d}{d \vartheta} \left( + \sin \vartheta \frac{d \Theta}{d \vartheta} + \right) + + \lambda \sin^2 \vartheta + = -\frac{1}{\Phi(\varphi)} \frac{d^2\Phi(\varphi)}{d\varphi^2} + = m^2, +\end{equation*} +which is equivalent to the following system of 2 first order differential +equations (ODEs): +\begin{subequations} + \begin{gather} + \frac{d^2\Phi(\varphi)}{d\varphi^2} = -m^2 \Phi(\varphi), + \label{kugel:eqn:ode-phi} \\ + \sin \vartheta \frac{d}{d \vartheta} \left( + \sin \vartheta \frac{d \Theta}{d \vartheta} + \right) + + \left( \lambda - \frac{m^2}{\sin^2 \vartheta} \right) + \Theta(\vartheta) = 0 + \label{kugel:eqn:ode-theta}. + \end{gather} +\end{subequations} +The solution of \eqref{kugel:eqn:ode-phi} is easy to find: The complex +exponential is obviously the function we are looking for. So we can directly +write the solutions +\begin{equation} \label{kugel:eqn:ode-phi-sol} + \Phi(\varphi) = e^{i m \varphi}, \quad m \in \mathbb{Z}. +\end{equation} +The restriction that the separation constant $m$ needs to be an integer arises +from the fact that we require a $2\pi$-periodicity in $\varphi$ since the +coordinate systems requires that $\Phi(\varphi + 2\pi) = \Phi(\varphi)$. +Unfortunately, solving \eqref{kugel:eqn:ode-theta} is as straightforward, +actually, it is quite difficult, and the process is so involved that it will +require a dedicated section of its own. + +\subsection{Legendre Functions} + +\begin{figure} + \centering + \kugelplaceholderfig{.8\textwidth}{5cm} + \caption{ + \kugeltodo{Why $z = \cos \vartheta$.} + } +\end{figure} + +To solve \eqref{kugel:eqn:ode-theta} we start with the substitution $z = \cos +\vartheta$ \kugeltodo{Explain geometric origin with picture}. The operator +$\frac{d}{d \vartheta}$ becomes +\begin{equation*} + \frac{d}{d \vartheta} + = \frac{dz}{d \vartheta}\frac{d}{dz} + = -\sin \vartheta \frac{d}{dz} + = -\sqrt{1-z^2} \frac{d}{dz}, +\end{equation*} +since $\sin \vartheta = \sqrt{1 - \cos^2 \vartheta} = \sqrt{1 - z^2}$, and +then \eqref{kugel:eqn:ode-theta} becomes +\begin{align*} + \frac{-\sqrt{1-z^2}}{\sqrt{1-z^2}} \frac{d}{dz} \left[ + \left(\sqrt{1-z^2}\right) \left(-\sqrt{1-z^2}\right) \frac{d \Theta}{dz} + \right] + + \left( \lambda - \frac{m^2}{1 - z^2} \right)\Theta(\vartheta) &= 0, + \\ + \frac{d}{dz} \left[ (1-z^2) \frac{d \Theta}{dz} \right] + + \left( \lambda - \frac{m^2}{1 - z^2} \right)\Theta(\vartheta) &= 0, + \\ + (1-z^2)\frac{d^2 \Theta}{dz} - 2z\frac{d \Theta}{dz} + + \left( \lambda - \frac{m^2}{1 - z^2} \right)\Theta(\vartheta) &= 0. +\end{align*} +By making two final cosmetic substitutions, namely $Z(z) = \Theta(\cos^{-1}z)$ +and $\lambda = n(n+1)$, we obtain what is known in the literature as the +\emph{associated Legendre equation of order $m$}: +\nocite{olver_introduction_2013} +\begin{equation} \label{kugel:eqn:associated-legendre} + (1 - z^2)\frac{d^2 Z}{dz} + - 2z\frac{d Z}{dz} + + \left( n(n + 1) - \frac{m^2}{1 - z^2} \right) Z(z) = 0, + \quad + z \in [-1; 1], m \in \mathbb{Z}. +\end{equation} + +Our new goal has therefore become to solve +\eqref{kugel:eqn:associated-legendre}, since if we find a solution for $Z(z)$ we +can perform the substitution backwards and get back to our eigenvalue problem. +However, the associated Legendre equation is not any easier, so to attack the +problem we will look for the solutions in the easier special case when $m = 0$. +This reduces the problem because it removes the double pole, which is always +tricky to deal with. In fact, the reduced problem when $m = 0$ is known as the +\emph{Legendre equation}: +\begin{equation} \label{kugel:eqn:legendre} + (1 - z^2)\frac{d^2 Z}{dz} + - 2z\frac{d Z}{dz} + + n(n + 1) Z(z) = 0, + \quad + z \in [-1; 1]. +\end{equation} + +The Legendre equation is a second order differential equation, and therefore it +has 2 independent solutions, which are known as \emph{Legendre functions} of the +first and second kind. For the scope of this text we will only derive a special +case of the former that is known known as the \emph{Legendre polynomials}, since +we only need a solution between $-1$ and $1$. + +\begin{lemma}[Legendre polynomials] + \label{kugel:lem:legendre-poly} + The polynomial function + \[ + P_n(z) = \sum^{\lfloor n/2 \rfloor}_{k=0} + \frac{(-1)^k}{2^n s^k!} \frac{(2n - 2k)!}{(n - k)! (n-2k)!} z^{n - 2k} + \] + is the only finite solution of the Legendre equation + \eqref{kugel:eqn:legendre} when $n \in \mathbb{Z}$ and $z \in [-1; 1]$. +\end{lemma} +\begin{proof} + This results is derived in section \ref{kugel:sec:proofs:legendre}. +\end{proof} + +Since the Legendre \emph{polynomials} are indeed polynomials, they can also be +expressed using the hypergeometric functions described in section +\ref{buch:rekursion:section:hypergeometrische-funktion}, so in fact +\begin{equation} + P_n(z) = {}_2F_1 \left( \begin{matrix} + n + 1, & -n \\ \multicolumn{2}{c}{1} + \end{matrix} ; \frac{1 - z}{2} \right). +\end{equation} +Further, there are a few more interesting but not very relevant forms to write +$P_n(z)$ such as \emph{Rodrigues' formula} and \emph{Laplace's integral +representation} which are +\begin{equation*} + P_n(z) = \frac{1}{2^n} \frac{d^n}{dz^n} (x^2 - 1)^n, + \qquad \text{and} \qquad + P_n(z) = \frac{1}{\pi} \int_0^\pi \left( + z + \cos\vartheta \sqrt{z^2 - 1} + \right) \, d\vartheta +\end{equation*} +respectively, both of which we will not prove (see chapter 3 of +\cite{bell_special_2004} for a proof). Now that we have a solution for the +Legendre equation, we can make use of the following lemma patch the solutions +such that they also become solutions of the associated Legendre equation +\eqref{kugel:eqn:associated-legendre}. + +\begin{lemma} \label{kugel:lem:extend-legendre} + If $Z_n(z)$ is a solution of the Legendre equation \eqref{kugel:eqn:legendre}, + then + \begin{equation*} + Z^m_n(z) = (1 - z^2)^{m/2} \frac{d^m}{dz^m}Z_n(z) + \end{equation*} + solves the associated Legendre equation \eqref{kugel:eqn:associated-legendre}. + \nocite{bell_special_2004} +\end{lemma} +\begin{proof} + See section \ref{kugel:sec:proofs:legendre}. +\end{proof} + +What is happening in lemma \ref{kugel:lem:extend-legendre}, is that we are +essentially inserting a square root function in the solution in order to be able +to reach the parts of the domain near the poles at $\pm 1$ of the associated +Legendre equation, which is not possible only using power series +\kugeltodo{Reference book theory on extended power series method.}. Now, since +we have a solution in our domain, namely $P_n(z)$, we can insert it in the lemma +obtain the \emph{associated Legendre functions}. + +\begin{definition}[Ferrers or associated Legendre functions] + \label{kugel:def:ferrers-functions} + The functions + \begin{equation} + P^m_n (z) = \frac{1}{n!2^n}(1-z^2)^{\frac{m}{2}}\frac{d^{m}}{dz^{m}} P_n(z) + = \frac{1}{n!2^n}(1-z^2)^{\frac{m}{2}}\frac{d^{m+n}}{dz^{m+n}}(1-z^2)^n + \end{equation} + are known as Ferrers or associated Legendre functions. +\end{definition} + +\kugeltodo{Discuss $|m| \leq n$.} + +\if 0 +The constraint $|m|