35#include "ramCanvas.hpp"
38typedef mjr::ramCanvas3c8b::colorType ct;
42 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
43 const int IMGSIZ = 7680/4;
44 const int MAXITR = 1024;
45 const double MAXZSQ = 4.0;
46 mjr::ramCanvas3c8b theRamCanvas(IMGSIZ, IMGSIZ, -2.2, 0.8, -1.5, 1.5);
48#pragma omp parallel for schedule(static,1)
49 for(
int y=0;y<theRamCanvas.getNumPixY();y++) {
50 for(
int x=0;x<theRamCanvas.getNumPixX();x++) {
51 std::complex<double> c = theRamCanvas.int2real(x, y);
52 std::complex<double> z(0.0, 0.0);
54 while((std::norm(z)<MAXZSQ) && (count<=MAXITR)) {
59 theRamCanvas.drawPoint(x, y, ct::csCColdeFireRamp::c(
static_cast<ct::csIntType
>(count*30)));
62 theRamCanvas.writeTIFFfile(
"mandelbrot_simple.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[])