38#include "ramCanvas.hpp"
41typedef mjr::ramCanvas3c8b::colorType ct;
44std::vector<std::array<double, 9>> params {
46 { 0.566700, 0.00000, -0.50000, 0.00000, 100.0, -1.35, 1.35, -1.35, 1.35},
47 { 0.544992, 0.00000, -0.47000, 0.00000, 100.0, -1.35, 1.35, -1.35, 1.35},
48 { 0.269000, 0.00000, 0.00000, 0.01000, 100.0, -1.10, 1.10, -1.00, 1.00},
49 { -0.400000, 0.10000, 0.29550, 0.00000, 100.0, -1.10, 1.10, -1.50, 1.50},
50 { 0.400000, 0.00000, -0.25000, 0.00000, 100.0, -1.30, 1.20, -1.00, 1.00},
55 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
56 const int WIDTH = 1920*1;
57 const int HEIGHT = 1920*1;
58 const int NUMITR = 500;
59 const double MAXZ = 4.0;
61# pragma omp parallel for schedule(static,1)
62 for(
decltype(params.size()) j=0; j<params.size(); ++j) {
63 const std::complex<double> c(params[j][0], params[j][1]);
64 const std::complex<double> p(params[j][2], params[j][3]);
65 mjr::ramCanvas3c8b theRamCanvas(WIDTH, HEIGHT, params[j][5], params[j][6], params[j][7], params[j][8]);
66 for(
int y=0;y<theRamCanvas.getNumPixY();y++) {
67 for(
int x=0;x<theRamCanvas.getNumPixX();x++) {
68 std::complex<double> d1(1.0, 0.0);
69 std::complex<double> d2(0.0, 0.0);
71 std::complex<double> z1(theRamCanvas.int2realY(y), theRamCanvas.int2realX(x));
72 std::complex<double> z2(0.0, 0.0);
74 while((std::norm(z1)<MAXZ) && (count<=NUMITR)) {
75 std::complex<double> z = z1*z1+c+p*z2;
76 std::complex<double> d = 2.0*d1*z1+p*d2;
84 theRamCanvas.drawPoint(x, y, ct::csCCfractal0RYBCW::c(
static_cast<ct::csIntType
>(std::log(std::abs(d1)+1)*params[j][4])));
87 theRamCanvas.writeTIFFfile(
"phoenixD_" + mjr::math::str::fmt_int(j, 2,
'0') +
".tiff");
88 std::cout <<
"ITER(" << j <<
"): " <<
"DONE " << std::endl;
91 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
92 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])