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