35#include "ramCanvas.hpp"
38typedef mjr::ramCanvas3c8b rcT;
42 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
44 double ZROEPS = .0001;
45 const int IMGSIZ = 7680;
46 std::complex<double> r1( 1.0, 0.0);
47 std::complex<double> r2(-0.5, sin(2*std::numbers::pi/3));
48 std::complex<double> r3(-0.5, -sin(2*std::numbers::pi/3));
49 rcT theRamCanvas(IMGSIZ, IMGSIZ, -1.3, 1.3, -1.3, 1.3);
62 std::complex<double> alpha( 1.1, 0.75);
64# pragma omp parallel for schedule(static,1)
65 for(
int y=0;y<theRamCanvas.getNumPixY();y++) {
68 std::cout <<
"Line: " << y <<
" of " << theRamCanvas.getNumPixY() << std::endl;
69 for(
int x=0;x<theRamCanvas.getNumPixX();x++) {
70 std::complex<double> z = theRamCanvas.int2real(x, y);
71 for(
int count=0; count<MAXITR; count++) {
72 if(std::abs(z) <= ZROEPS)
74 z = z-alpha*(z*z*z-1.0)/(z*z*3.0);
76 theRamCanvas.drawPoint(x, y, rcT::colorType::csCColdeRainbow::c(1.0-std::arg(z)/std::numbers::pi));
79 theRamCanvas.writeTIFFfile(
"newton_modified_C.tiff");
80 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
81 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])