47#include "ramCanvas.hpp"
48#include "MRMathSTR.hpp"
51typedef mjr::ramCanvas3c8b::colorType ct;
55 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
56 const double MAXZSQ = 4.0;
57 const int IMGSIZ = 7680/4;
59 const int MXITRS = 157;
60 const double BALSIZ = 0.00019065;
61 const double CNTRX = -0.745258237857;
62 const double CNTRY = 0.130272017858;
64 const int NUMFRM = 304;
76# pragma omp parallel for schedule(static,1)
77 for(
int frame=0; frame<NUMFRM; frame++) {
78 int curMaxItr = MXITRS + frame * ITRSTP;
79 mjr::ramCanvas3c8b theRamCanvas(IMGSIZ, IMGSIZ, CNTRX-BALSIZ, CNTRX+BALSIZ, CNTRY-BALSIZ, CNTRY+BALSIZ);
80 std::chrono::time_point<std::chrono::system_clock> frameStartTime = std::chrono::system_clock::now();
81 for(
int y=0;y<theRamCanvas.getNumPixY();y++) {
82 for(
int x=0;x<theRamCanvas.getNumPixX();x++) {
83 std::complex<double> c = theRamCanvas.int2real(x, y);
84 std::complex<double> z(0.0, 0.0);
86 while((std::norm(z)<MAXZSQ) && (count<=curMaxItr)) {
91 theRamCanvas.drawPoint(x, y, ct::csCColdeFireRamp::c(
static_cast<ct::csFltType
>(COLMAG*count)/curMaxItr));
94 theRamCanvas.writeTIFFfile(
"mandelbrot_count_movie_" + mjr::math::str::fmt_int(frame, 3,
'0') +
".tiff");
95 std::chrono::duration<double> frameRunTime = std::chrono::system_clock::now() - frameStartTime;
97 std::cout <<
"Frame " << frame <<
" of " << NUMFRM <<
" Runtime " << frameRunTime.count() <<
" sec" << std::endl;
99 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
100 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])