35#include "ramCanvas.hpp"
39 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
40 const int NUMITR = 164;
41 const int IMXSIZ = 7680/2;
42 const int IMYSIZ = 7680/2;
46 mjr::ramCanvas3c8b theRamCanvas(IMXSIZ, IMYSIZ, -0.99-0.03, -0.99+0.03, -0.03, 0.03);
48 for(
int y=0;y<theRamCanvas.getNumPixY();y++) {
49 for(
int x=0;x<theRamCanvas.getNumPixX();x++) {
50 std::complex<double> z = theRamCanvas.int2real(x, y);
52 while((std::norm(z)<1e10) && (count<=NUMITR)) {
53 z = 0.25 * (2.0 + 7.0*z - (2.0 + 5.0 * z) * std::cos(z * std::numbers::pi));
57 theRamCanvas.drawPoint(x, y, mjr::ramCanvas3c8b::colorType::csCCsumRGB::c(
static_cast<mjr::ramCanvas3c8b::csIntType
>(count*28)));
60 theRamCanvas.writeTIFFfile(
"collatz.tiff");
61 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
62 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])