--- a/progs/mandelbrot.scala Fri Oct 05 11:23:15 2018 +0100
+++ b/progs/mandelbrot.scala Fri Oct 05 11:25:53 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)
@@ -148,12 +148,12 @@
val delta = (exc2 - exc1) * 0.0333
-
+/*
time_needed(
for (n <- (0 to 12))
mandelbrot(exc1 + delta * n,
exc2 - delta * n, 100))
-
+*/
/*
time_needed(
for (n <- (0 to 12))
@@ -162,3 +162,15 @@
*/
+// 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))