progs/mandelbrot.scala
changeset 481 e03a0100ec46
parent 471 135bf034ac30
child 490 4778fefecd0c
equal deleted inserted replaced
480:a623dd1f2898 481:e03a0100ec46
   112   
   112   
   113   // deltas for each grid step 
   113   // deltas for each grid step 
   114   val d_x = (end.re - start.re) / W
   114   val d_x = (end.re - start.re) / W
   115   val d_y = (end.im - start.im) / H
   115   val d_y = (end.im - start.im) / H
   116    
   116    
   117   for (y <- (0 until H)) {
   117   for (y <- (0 until H).par) {
   118     for (x <- (0 until W)) {
   118     for (x <- (0 until W).par) {
   119     
   119     
   120      val c = start + 
   120      val c = start + 
   121       (x * d_x + y * d_y * i)
   121       (x * d_x + y * d_y * i)
   122      val iters = iterations(c, max) 
   122      val iters = iterations(c, max) 
   123      val colour = 
   123      val colour =