 
 (def initial-rendering-data
   {:scale          350 ; How many pixels a distance of 1 in the complex plane takes up
-   :x0             -3
-   :y0             1.2})
+   :x0             -3 ; the x co-ordinate of the top-left pixel in the canvase
+   :y0             1.2 ; the y co-ordinate of the top-left pixel in the canvase
+   })
 
 (defonce app-state (atom {:escape-radius 10000
                           :rendering-data initial-rendering-data}))


(set! (.-onmouseup overlay-canvas) handle-mouseup)


(render-mandelbrot! @app-state)


     (forloop
      [(y 0) (< y height) (inc y)]

      (let [real       (+ (/ x scale) x0)
            imaginary  (- (/ y scale) y0)
            iterations (js/mandelbrot_smoothed_iteration_count escape-radius-squared max-iterations real imaginary)
            intensity  (* 255 (/ iterations max-iterations))
            data-index (* 4 (+ x (* y width)))]

        (aset data data-index intensity)
