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, 300.0, -1.35, 1.35, -1.35, 1.35},
47 { 0.544992, 0.00000, -0.47000, 0.00000, 1000.0, -1.35, 1.35, -1.35, 1.35},
48 { -0.400000, 0.10000, 0.29550, 0.00000, 300.0, -1.10, 1.10, -1.50, 1.50},
53 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
54 const int WIDTH = 1920*4*4;
55 const int HEIGHT = 1920*4*4;
56 const int NUMITR = 500;
57 const double MAXZ = 6.0;
59# pragma omp parallel for schedule(static,1)
60 for(
decltype(params.size()) j=0; j<params.size(); ++j) {
61 const std::complex<double> c(params[j][0], params[j][1]);
62 const std::complex<double> p(params[j][2], params[j][3]);
63 mjr::ramCanvas3c8b theRamCanvas(WIDTH, HEIGHT, params[j][5], params[j][6], params[j][7], params[j][8]);
64 for(
int y=0;y<theRamCanvas.getNumPixY();y++) {
65 for(
int x=0;x<theRamCanvas.getNumPixX();x++) {
66 std::complex<double> d1(1.0, 0.0);
67 std::complex<double> d2(0.0, 0.0);
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;
74 std::complex<double> d = 2.0*d1*z1+p*d2;
81 if(std::norm(z1)<MAXZ)
82 theRamCanvas.drawPoint(x, y, ct::csCCfractal0RYBCW::c(
static_cast<ct::csIntType
>(std::log(std::abs(d1)+1)*params[j][4])));
85 theRamCanvas.scaleDownMean(4);
86 theRamCanvas.writeTIFFfile(
"phoenixI_" + mjr::math::str::fmt_int(j, 2,
'0') +
".tiff");
87 std::cout <<
"ITER(" << j <<
"): " <<
"DONE " << std::endl;
90 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
91 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])