34#include "ramCanvas.hpp"
37mjr::ramCanvas3c8b::colorType mandelbrot_esc_fun(mjr::ramCanvas3c8b::coordFltType x, mjr::ramCanvas3c8b::coordFltType y) {
39 const int NUMITR = 256;
40 mjr::ramCanvas3c8b::coordFltType zx, zy, tempx;
41 for(zx=zy=0.0,count=0; (zx*zx+zy*zy<4)&&(count<=NUMITR); count++,tempx=zx*zx-zy*zy+x,zy=2*zx*zy+y,zx=tempx)
44 return mjr::ramCanvas3c8b::colorType::csCColdeFireRamp::c(mjr::math::ivl::wrapCC(
static_cast<mjr::ramCanvas3c8b::csIntType
>(count*20), 767));
46 return mjr::ramCanvas3c8b::colorType(
"black");
51 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
52 mjr::ramCanvas3c8b theRamCanvas(1024, 1024, -2.2, 0.8, -1.5, 1.5);
54 theRamCanvas.colorizeFltCanvas(mandelbrot_esc_fun);
55 theRamCanvas.writeTIFFfile(
"mandelbrot_bm_real_cfun.tiff");
57 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
58 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])