38#include "ramCanvas.hpp"
41typedef mjr::ramCanvas3c8b::colorType ct;
45 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
46 const int WIDTH = 1920/2;
47 const int HEIGHT = 1920/2;
48 const int NUMITR = 40;
49 const double MAXZ = 4.0;
51 const int NUMFRM = 24*2;
52 const double ANGMIN = 0.0;
53 const double ANGMAX = std::numbers::pi*2;
54 const double RADIUS = 0.06;
56# pragma omp parallel for schedule(static,1)
57 for(
int frame=0; frame<NUMFRM; frame++) {
59 std::cout <<
"Frame: " << frame << std::endl;
60 double angle = frame*(ANGMAX-ANGMIN)/NUMFRM+ANGMIN;
62 const std::complex<double> c(-0.400000+RADIUS*std::cos(angle), 0.10000+RADIUS*std::sin(angle));
63 const std::complex<double> p(0.29550+RADIUS*std::cos(angle), 0.00000+RADIUS*std::sin(angle));
64 mjr::ramCanvas3c8b theRamCanvas(WIDTH, HEIGHT, -1.10, 1.10, -1.50, 1.50);
66 for(
int y=0;y<theRamCanvas.getNumPixY();y++) {
67 for(
int x=0;x<theRamCanvas.getNumPixX();x++) {
68 std::complex<double> z1(theRamCanvas.int2realY(y), theRamCanvas.int2realX(x));
69 std::complex<double> z2(0.0, 0.0);
71 while((std::norm(z1)<MAXZ) && (count<=NUMITR)) {
72 std::complex<double> z = z1*z1+c+p*z2;
77 if ((count < NUMITR) && (count > 5))
78 theRamCanvas.drawPoint(x, y, ct::csCCfractal0RYBCW::c(
static_cast<ct::csIntType
>(std::log(count)*110)));
81 theRamCanvas.writeTIFFfile(
"phoenixM2_" + mjr::math::str::fmt_int(frame, 2,
'0') +
".tiff");
83 std::cout <<
"FRAME(" << frame <<
"): " <<
"DONE" << std::endl;
86 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
87 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])