[genius] Wed Sep 21 20:44:39 2016 Jiri (George) Lebl <jirka 5z com>



commit 866d881cecf2f6c4d274221295af94e8e51aa8f9
Author: Jiri (George) Lebl <jiri lebl gmail com>
Date:   Wed Sep 21 20:45:12 2016 -0500

    Wed Sep 21 20:44:39 2016  Jiri (George) Lebl <jirka 5z com>
    
        * examples/*.gel: update the complex analysis examples to have
          saner limits, make the mandelbrot set have roughly the right
          aspect.

 ChangeLog                                       |    6 ++++
 examples/complex-analysis-mandelbrot-define.gel |    4 +-
 examples/complex-analysis-mandelbrot-set.gel    |    2 +-
 examples/complex-analysis-mesh.gel              |   31 ++++++++++++----------
 examples/complex-analysis-wandering-ball.gel    |   31 ++++++++++++-----------
 5 files changed, 42 insertions(+), 32 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 29f63ea..326ad00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Sep 21 20:44:39 2016  Jiri (George) Lebl <jirka 5z com>
+
+       * examples/*.gel: update the complex analysis examples to have
+         saner limits, make the mandelbrot set have roughly the right
+         aspect.
+
 Wed Sep 21 18:55:34 2016  Jiri (George) Lebl <jirka 5z com>
 
        * src/graphing.c: Add LinePlotWaitForClick and LinePlotMouseLocation
diff --git a/examples/complex-analysis-mandelbrot-define.gel b/examples/complex-analysis-mandelbrot-define.gel
index bbddcfc..c2129c2 100644
--- a/examples/complex-analysis-mandelbrot-define.gel
+++ b/examples/complex-analysis-mandelbrot-define.gel
@@ -6,7 +6,7 @@
 # then draw a red dot, otherwise draw a green dot.  Eventually the Mandelbrot
 # set should be in green and outside of it in red.
 
-LinePlotWindow = [-2,2,-2,2];
+LinePlotWindow = [-2.6,2.6,-2,2];
 
 mandelset = null;
 notmandelset = null;
@@ -16,7 +16,7 @@ LinePlotClear();
 PlotWindowPresent ();
 
 circle = null;
-for t = 0.0 to 2*pi by 0.1 do (
+for t = 0.0 to 2*pi by 2*pi/100 do (
   circle = [circle;2*exp(1i*t)]
 );
 
diff --git a/examples/complex-analysis-mandelbrot-set.gel b/examples/complex-analysis-mandelbrot-set.gel
index 2609474..4517ea0 100644
--- a/examples/complex-analysis-mandelbrot-set.gel
+++ b/examples/complex-analysis-mandelbrot-set.gel
@@ -18,7 +18,7 @@ k=1;
 function DrawThePlot () = (
   PlotCanvasFreeze ();
   LinePlotClear ();
-  LinePlotDrawPoints (points, "color", "blue", "thickness", 3);
+  LinePlotDrawPoints (points, "color", "green", "thickness", 3);
   PlotCanvasThaw ();
 );
 
diff --git a/examples/complex-analysis-mesh.gel b/examples/complex-analysis-mesh.gel
index e25ae65..7b2085c 100644
--- a/examples/complex-analysis-mesh.gel
+++ b/examples/complex-analysis-mesh.gel
@@ -7,36 +7,39 @@
 #
 
 #The function to plot
-function f(z) = z+(1+0.5i);
+#function f(z) = z+(0.3+0.5i);
 #function f(z) = 2*z;
 #function f(z) = 1i*z;
 #function f(z) = (3+1i)*z;
-#function f(z) = (3+1i)*z+(1+0.5i);
-#function f(z) = 0.2*(z-5)*(z+5);
-#function f(z) = 0.2*z^2;
-#function f(z) = 0.1*(z-10)^2*z;
+#function f(z) = (3+1i)*z+(0.3+0.5i);
+#function f(z) = 4*z^2;
+#function f(z) = 10*z^3;
+#function f(z) = 4*(z-0.2)*(z+0.2);
+#function f(z) = 10*z^2*(z-0.2)
+#function f(z) = 0.25/z;
+#function f(z) = 0.25/conj(z);
 #function f(z) = exp(z);
-#function f(z) = z^2+1i*z+0.1*sin(z^2);
+#function f(z) = sin(3*z);
 
 #approximately square grid
-LinePlotWindow = [-13,13,-10,10];
+LinePlotWindow = [-1.3,1.3,-1.0,1.0];
 
-#shape = "circle";
-shape = "rectangle";
+shape = "circle";
+#shape = "rectangle";
 
 # if to plot only outline of the rectangle or the circle
 only_outline = false;
 
 
 #the rectangle we transform
-plot_range = [-3,3,-2,2];
-plot_stepx = 0.125;
-plot_stepy = 0.125;
+plot_range = [-0.3,0.3,-0.2,0.2];
+plot_stepx = 0.0125;
+plot_stepy = 0.0125;
 
 #the circle we transform
-plot_circle_rad = 3; #center is 0
+plot_circle_rad = 0.3; #center is 0
 plot_steptheta = 0.05;
-plot_stepr = 0.1;
+plot_stepr = 0.01;
 # The theta step corresponds to the theta step on the outside of the circle.
 
 
diff --git a/examples/complex-analysis-wandering-ball.gel b/examples/complex-analysis-wandering-ball.gel
index abf4d0b..f2162ba 100644
--- a/examples/complex-analysis-wandering-ball.gel
+++ b/examples/complex-analysis-wandering-ball.gel
@@ -8,28 +8,27 @@
 #
 
 #The function to plot
-#function f(z) = z+(1+0.5i);
+#function f(z) = z+(0.3+0.5i);
 #function f(z) = 2*z;
 #function f(z) = 1i*z;
 #function f(z) = (3+1i)*z;
-#function f(z) = (3+1i)*z+(1+0.5i);
-#function f(z) = 0.2*z^2;
-#function f(z) = 0.01*z^3;
-function f(z) = 0.2*(z-5)*(z+5);
-#function f(z) = 0.01*z^2*(z-5)
-#function f(z) = 25/z;
-#function f(z) = 25/conj(z);
-#function f(z) = 0.1*(z-10)^2*z;
+#function f(z) = (3+1i)*z+(0.3+0.5i);
+#function f(z) = z^2;
+#function f(z) = z^3;
+function f(z) = (z-0.5)*(z+0.5);
+#function f(z) = z^2*(z-0.5)
+#function f(z) = 0.25/z;
+#function f(z) = 0.25/conj(z);
 #function f(z) = exp(z);
-
-#for this one you probably want to increase the precision, see "mult" below
-#function f(z) = 0.05*(z^2+1i*z+0.1*sin(z^2));
+#function f(z) = sin(3*z);
+#function f(z) = 0.1*(z^2+1i*z+sin(5*z^2));
 
 LinePlotDrawLegends = false;
 PlotWindowPresent(); # Make sure the window is raised
+LinePlotClear(); # make sure we are in the line plot mode
 
 #approximately square grid
-LinePlotWindow = [-13,13,-10,10];
+LinePlotWindow = [-1.3,1.3,-1.0,1.0];
 
 #confine possibly to a smaller window.
 #You can also zoom out during the animation.
@@ -37,9 +36,9 @@ LinePlotWindow = [-13,13,-10,10];
 confine_window = LinePlotWindow;
 
 #the circle
-radius = 3;
+radius = 0.3;
 #step = 0.025;
-step = 0.05;
+step = 0.01;
 
 
 # precision multiplier.  Increasing this number increases the
@@ -114,4 +113,6 @@ while true do (
        );
 
        dir = dir*exp(1i*(rand()*0.2-0.1));
+
+       wait(0.0001)
 );


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]