35#include "ramCanvas.hpp"
39 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
40 const double MINPOW = 0.9;
41 const double MAXPOW = 4.0;
42 const int NUMFRM = 192;
43 const int NUMITR = 255;
44 const int IMXSIZ = 7680/8;
45 const int IMYSIZ = 4320/8;
47 mjr::ramCanvas3c8b theRamCanvas(IMXSIZ, IMYSIZ, -2.75, 2.75, -1.55, 1.55);
49 for(
int f=0;f<NUMFRM;f++) {
50 double p = MAXPOW*
static_cast<double>(f)/
static_cast<double>(NUMFRM) + MINPOW;
51 std::chrono::time_point<std::chrono::system_clock> frameStartTime = std::chrono::system_clock::now();
52 theRamCanvas.clrCanvasToBlack();
53 for(
int y=0;y<theRamCanvas.getNumPixY();y++) {
54 for(
int x=0;x<theRamCanvas.getNumPixX();x++) {
55 std::complex<double> c(theRamCanvas.int2realX(x), theRamCanvas.int2realY(y));
56 std::complex<double> z(0.0, 0.0);
58 while((std::norm(z)<4) && (count<=NUMITR)) {
63 theRamCanvas.drawPoint(x, y, mjr::ramCanvas3c8b::colorType::csCColdeFireRamp::c(
static_cast<mjr::ramCanvas3c8b::csIntType
>(count*20)));
66 theRamCanvas.writeTIFFfile(
"multibrotMovie_" + mjr::math::str::fmt_int(f, 3,
'0') +
".tiff");
67 std::chrono::duration<double> frameRunTime = std::chrono::system_clock::now() - frameStartTime;
68 std::cout <<
"Frame " << f <<
" Runtime " << frameRunTime.count() <<
" sec" << std::endl;
70 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
71 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])