34#include "ramCanvas.hpp"
36typedef mjr::ramCanvas1c16b rcCNT;
37typedef mjr::ramCanvas3c8b rcC8;
41 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
42 rcC8::colorType limitColor(
"red");
43 rcC8::colorType setColor(
"yellow");
45 const int MCSIZE = 7680;
47 const int CSIZE = MCSIZE/CSIZEF;
48 rcC8 theRamCanvas(CSIZE, CSIZE, -2.1, 0.75, -1.4, 1.4);
52 perRamCanvas.readTIFFfile(
"../precomp/mandelbrot_precompPER.tiff");
53 stbRamCanvas.readTIFFfile(
"../precomp/mandelbrot_precompSTB.tiff");
54# pragma omp parallel for schedule(static,1)
55 for(
int y=0;y<theRamCanvas.getNumPixY();y++) {
56 for(
int x=0;x<theRamCanvas.getNumPixX();x++) {
57 auto inten = theRamCanvas.getPxColorNC(x, y).intensity();
58 auto period = perRamCanvas.getPxColorNC(x, y).getC0();
61 theRamCanvas.drawPoint(x, y, setColor);
62 auto itrreq = stbRamCanvas.getPxColorNC(x, y).getC0();
63 std::complex<double> c = theRamCanvas.int2real(x, y);
64 std::complex<double> z(0.0, 0.0);
65 rcCNT::colorChanType count = 1;
66 while (count<itrreq) {
71 while (count<period) {
73 theRamCanvas.drawPoint(z, limitColor);
79 std::cout << y << std::endl;
82 theRamCanvas.writeTIFFfile(
"mandelbrot_precomp_p1_br.tiff");
83 theRamCanvas.rotate90CW();
84 theRamCanvas.writeTIFFfile(
"mandelbrot_precomp_p1_ar.tiff");
85 theRamCanvas.scaleDownMean(4);
86 theRamCanvas.writeTIFFfile(
"mandelbrot_precomp_p1.tiff");
88 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
89 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])