34#include "ramCanvas.hpp"
38 std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
39 const int XSIZ = 7680/2;
40 const int YSIZ = 4320/2;
41 mjr::ramCanvas1c16b theRamCanvas(XSIZ, YSIZ, -19, 19, 3, 47);
42 double x=5.10, y=3.1, z=10.1, xNew, yNew, zNew;
44 std::random_device rd;
45 std::mt19937 rEng(rd());
46 std::uniform_real_distribution<double> uniform_dist_double(-15.0, 15.0);
49 int numPtsPerCurve = 105000;
50 int numPtsPerCurveToss = 700;
51 double tDelta = 0.00001;
62 for(
int j=0; j<numCurves; j++) {
63 x=0*uniform_dist_double(rEng);
65 y=30.0*j/(numCurves-1)-15.0;
66 z=30+0*uniform_dist_double(rEng);
68 std::cout <<
"y: " << y << std::endl;
70 for(
int i=0;i<numPtsPerCurve;i++) {
71 xNew = x + a * (y - x) * tDelta;
72 yNew = y + (x * (b - z) - y) * tDelta;
73 zNew = z + (x * y - c * z) * tDelta;
74 if(i>numPtsPerCurveToss) {
75 theRamCanvas.incPxChan(xNew, zNew);
76 if(theRamCanvas.getPxColor(xNew, zNew).getC0() > maxII) {
77 maxII = theRamCanvas.getPxColor(xNew, zNew).getC0();
85 theRamCanvas.writeRAWfile(
"lorenz_multi.mrw");
88 theRamCanvas.applyHomoPixTfrm(&mjr::ramCanvas1c16b::colorType::tfrmStdPow, 1/p);
89 maxII =
static_cast<uint64_t
>(65535.0 * std::pow(
static_cast<double>(maxII) / 65535.0, 1.0 / p));
97 mjr::ramCanvas3c8b anotherRamCanvas(XSIZ, YSIZ);
98 mjr::ramCanvas3c8b::colorType bColor;
99 for(
int yi=0;yi<theRamCanvas.getNumPixY();yi++)
100 for(
int xi=0;xi<theRamCanvas.getNumPixX();xi++) {
101 anotherRamCanvas.drawPoint(xi, yi, bColor.cmpRGBcornerDGradiant(
static_cast<mjr::ramCanvas3c8b::csIntType
>(theRamCanvas.getPxColor(xi, yi).getC0() * 1275 / maxII),
"0RYBCW"));
102 if( (anotherRamCanvas.getPxColor(xi, yi).getC0() > 0) && (anotherRamCanvas.getPxColor(xi, yi).getC0() < 255/2) )
103 anotherRamCanvas.getPxColorRefNC(xi, yi).setC0(255/2);
106 anotherRamCanvas.writeTIFFfile(
"lorenz_multi.tiff");
108 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
109 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])