From d8d6a61a2ab45d9171a93e4a72d254a3ed5ef87f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <andreas.mueller@ost.ch>
Date: Sat, 21 May 2022 20:42:47 +0200
Subject: fix some bugs

---
 buch/papers/kugel/images/curvature.pov | 5 +++--
 buch/papers/kugel/images/curvgraph.m   | 8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

(limited to 'buch/papers/kugel')

diff --git a/buch/papers/kugel/images/curvature.pov b/buch/papers/kugel/images/curvature.pov
index 9dbaa86..3b15d77 100644
--- a/buch/papers/kugel/images/curvature.pov
+++ b/buch/papers/kugel/images/curvature.pov
@@ -72,7 +72,8 @@ arrow(<0,0,-2.1>, <0,0,2.1>, 0.01, White)
 #include "curvature.inc"
 
 #declare sigma = 1;
-#declare N0 = 0.5;
+#declare s = 1.4;
+#declare N0 = 0.4;
 #declare funktion = function(r) {
 	(exp(-r*r/(sigma*sigma)) / sigma
 	-
@@ -80,7 +81,7 @@ arrow(<0,0,-2.1>, <0,0,2.1>, 0.01, White)
 };
 #declare hypot = function(xx, yy) { sqrt(xx*xx+yy*yy) };
 
-#declare Funktion = function(x,y) { funktion(hypot(x+1,y)) - funktion(hypot(x-1,y)) };
+#declare Funktion = function(x,y) { funktion(hypot(x+s,y)) - funktion(hypot(x-s,y)) };
 #macro punkt(xx,yy)
 	<xx, Funktion(xx, yy), yy>
 #end
diff --git a/buch/papers/kugel/images/curvgraph.m b/buch/papers/kugel/images/curvgraph.m
index b83c877..75effd6 100644
--- a/buch/papers/kugel/images/curvgraph.m
+++ b/buch/papers/kugel/images/curvgraph.m
@@ -11,7 +11,7 @@ global sigma2;
 sigma2 = 1;
 
 global s;
-s = 1;
+s = 1.4;
 
 global cmax;
 cmax = 0.9;
@@ -40,7 +40,7 @@ end
 
 global N0;
 N0 = f0(0)
-N0 = 0.5;
+N0 = 0.4;
 
 function retval = f1(x,y)
 	global N0;
@@ -115,13 +115,13 @@ endfunction
 
 fn = fopen("curvature.inc", "w");
 punkte = zeros(4,3);
-for ix = (0:xsteps)
+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)
+	for iy = (0:ysteps-1)
 		y = ymin + iy * hy;
 		punkte(1,2) = y;
 		punkte(2,2) = y + hy;
-- 
cgit v1.2.1