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::colorType aColor;
43 mjr::ramCanvas1c16b theRamCanvas(XSIZ, YSIZ, -19, 19, 3, 47);
44 double x=5.10, y=3.1, z=10.1, xNew, yNew, zNew;
46 std::random_device rd;
47 std::mt19937 rEng(rd());
48 std::uniform_real_distribution<double> uniform_dist_double(-15.0, 15.0);
51 int numPtsPerCurve = 105000;
52 int numPtsPerCurveToss = 700;
53 double tDelta = 0.00001;
64 for(
int j=0; j<numCurves; j++) {
65 x=0*uniform_dist_double(rEng);
67 y=30.0*j/(numCurves-1)-15.0;
68 z=30+0*uniform_dist_double(rEng);
70 std::cout <<
"y: " << y << std::endl;
72 for(
int i=0;i<numPtsPerCurve;i++) {
73 xNew = x + a * (y - x) * tDelta;
74 yNew = y + (x * (b - z) - y) * tDelta;
75 zNew = z + (x * y - c * z) * tDelta;
76 if(i>numPtsPerCurveToss) {
77 theRamCanvas.drawPoint(xNew, zNew, theRamCanvas.getPxColor(xNew, zNew).tfrmAdd(aColor));
78 if(theRamCanvas.getPxColor(xNew, zNew).getC0() > maxII) {
79 maxII = theRamCanvas.getPxColor(xNew, zNew).getC0();
87 theRamCanvas.writeRAWfile(
"lorenz_multi.mrw");
90 theRamCanvas.applyHomoPixTfrm(&mjr::ramCanvas1c16b::colorType::tfrmStdPow, 1/p);
91 maxII =
static_cast<uint64_t
>(65535.0 * std::pow(
static_cast<double>(maxII) / 65535.0, 1.0 / p));
99 mjr::ramCanvas3c8b anotherRamCanvas(XSIZ, YSIZ);
100 mjr::ramCanvas3c8b::colorType bColor;
101 for(
int yi=0;yi<theRamCanvas.getNumPixY();yi++)
102 for(
int xi=0;xi<theRamCanvas.getNumPixX();xi++) {
103 anotherRamCanvas.drawPoint(xi, yi, bColor.cmpRGBcornerDGradiant(
static_cast<mjr::ramCanvas3c8b::csIntType
>(theRamCanvas.getPxColor(xi, yi).getC0() * 1275 / maxII),
"0RYBCW"));
104 if( (anotherRamCanvas.getPxColor(xi, yi).getC0() > 0) && (anotherRamCanvas.getPxColor(xi, yi).getC0() < 255/2) )
105 anotherRamCanvas.getPxColorRefNC(xi, yi).setC0(255/2);
108 anotherRamCanvas.writeTIFFfile(
"lorenz_multi.tiff");
110 std::chrono::duration<double> runTime = std::chrono::system_clock::now() - startTime;
111 std::cout <<
"Total Runtime " << runTime.count() <<
" sec" << std::endl;
int main(int argc, char *argv[])