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