   bitmap.pixels = new Pixel[bitmap.width * bitmap.height];
   cudaMemcpy(bitmap.pixels, devicePixels, sizeof(Pixel) * bitmap.width * bitmap.height, cudaMemcpyDeviceToHost);
 
-  save_png_to_file(&bitmap, "fractal.png");
+  save_png_to_file(&bitmap, filename);
 
   cudaFree(devicePixels);
   cudaFree(devBitmap);

#include <iostream>
#include <cmath>
#include <thrust/complex.h>

using thrust::complex;
using thrust::exp;
using thrust::norm;

  double n;
  complex<double> z(0, 0);
  while ((n = norm(z)) < 4 && i < limit) {
    // z = z * z + c;
    // z = exp(z) - c;
    z = c * exp(-z) + z * z;
    ++i;
  }

