C++ is amazingly distracting. There's an algorithm in here, but it's hard to see through all the
void fractal(window<int> &scr, window<double> &fract, int iter_max, std::vector<int> &colors, const std::function<std::complex<double(std::complex<double>, std::complex<double>)> &func, const char *fname, bool smooth_color);