40#include "ramCanvas.hpp"
41#include "MRMathIVL.hpp"
44typedef mjr::ramCanvas3c8b rct;
47rct::colorType mandelbrot_esc_fun(rct::coordFltType x, rct::coordFltType y) {
48 std::complex<double> z(0.0, 0.0), c(x, y);
49 for(
int count = 0; count<256; count++)
50 if (std::abs(z = z * z + c) > 2)
51 return rct::colorType::csCColdeFireRamp::c(
static_cast<rct::csIntType
>(count*20));
52 return rct::colorType(
"black");
57 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
58 rct theRamCanvas(1024, 1024, -2.2, 0.8, -1.5, 1.5);
60 theRamCanvas.colorizeFltCanvas(mandelbrot_esc_fun);
61 theRamCanvas.writeTIFFfile(
"demo_colorizer.tiff");
63 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
64 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])