34#include "ramCanvas.hpp"
35#include "MRMathIVL.hpp"
38double ranges[6][4] = { { -2.700, 2.100, -2.100, 2.100 },
39 { -2.100, -1.700, -0.300, 0.300 },
40 { -1.540, -1.330, -0.175, 0.175 },
41 { 0.250, 0.700, -1.000, 1.000 },
42 { 0.250, 0.600, 0.700, 1.000 },
43 { -0.720, -0.695, 0.385, 0.410 } };
46typedef mjr::ramCanvas3c8b::colorType ct;
47typedef ct::csIntType cit;
51 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
52 const int NUMITR = 2000;
53 const int CSIZE = 3840;
56 mjr::ramCanvas3c8b::coordFltType a, b, zx, zy;
57 mjr::ramCanvas3c8b theRamCanvas(CSIZE, CSIZE);
58 for(
int i=0; i<6; i++) {
59 theRamCanvas.newRealCoords(ranges[i][0], ranges[i][1], ranges[i][2], ranges[i][3]);
60 theRamCanvas.clrCanvasToBlack();
61 for(
int y=0;y<theRamCanvas.getNumPixY();y++) {
63 std::cout <<
" CASE: " << i <<
" LINE: " << y <<
"/" << CSIZE << std::endl;
64 for(
int x=0;x<theRamCanvas.getNumPixX();x++) {
65 for(a=theRamCanvas.int2realX(x),b=theRamCanvas.int2realY(y),zx=zy=0.0,count=0;
66 (zx*zx+zy*zy<100000)&&(count<=NUMITR);
67 count++,zx=zx*zx-zy*zy+a,zy=2*zx*zy+b) ;
69 theRamCanvas.drawPoint(x, y, ct::csCColdeFireRamp::c(mjr::math::ivl::wrapCC(
static_cast<cit
>(count*20), 767)));
72 theRamCanvas.writeTIFFfile(
"tippets" + std::to_string(i) +
".tiff");
74 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
75 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])