progs/mandelbrot.scala
changeset 191 f78b18c4c886
parent 189 ff815ca0bbcf
child 195 fc3ac7b70a06
--- a/progs/mandelbrot.scala	Tue Jul 10 15:12:14 2018 +0100
+++ b/progs/mandelbrot.scala	Fri Aug 17 11:58:55 2018 +0100
@@ -97,8 +97,8 @@
   val d_x = (end.re - start.re) / W
   val d_y = (end.im - start.im) / H
    
-  for (y <- (0 until H)) {
-    for (x <- (0 until W))) {
+  for (y <- (0 until H).par) {
+    for (x <- (0 until W).par) {
     
      val c = start + 
       (x * d_x + y * d_y * i)
@@ -162,10 +162,15 @@
 */
 
 
-// Larry's example
-// example 2
-val exl1 = -0.74364990 + 0.13188204 * i
-val exl2 = -0.74291189 + 0.13262005 * i
+// Larry Paulson's example
+val exl1 = -0.74364990 + 0.13188170 * i
+val exl2 = -0.74291189 + 0.13261971 * i
 
 time_needed(mandelbrot(exl1, exl2, 1000))
 
+
+// example by Jorgen Villadsen
+val exj1 = 0.10284 - 0.63275 * i
+val exj2 = 0.11084 - 0.64075 * i
+
+time_needed(mandelbrot(exj1, exj2, 1000))