going to test vibrancy
This commit is contained in:
parent
4859798b11
commit
6e2c2a6b2d
1 changed files with 18 additions and 14 deletions
12
main.cpp
12
main.cpp
|
@ -89,7 +89,8 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Attractor& myAttractor = *my_attractor_ptr;
|
Attractor& myAttractor = *my_attractor_ptr;
|
||||||
myAttractor.projector->canvas = new PNG(width, height, 2);
|
PNG* output = new PNG(width, height, 2);
|
||||||
|
myAttractor.projector->canvas = output;
|
||||||
myAttractor.init_range();
|
myAttractor.init_range();
|
||||||
|
|
||||||
LogInfo("\nRendering\n");
|
LogInfo("\nRendering\n");
|
||||||
|
@ -114,10 +115,12 @@ int main(int argc, char* argv[]) {
|
||||||
LogMoreInfo("Average iterations per second: %f\n\n", totalIterations/totalTime);
|
LogMoreInfo("Average iterations per second: %f\n\n", totalIterations/totalTime);
|
||||||
|
|
||||||
// saving output
|
// saving output
|
||||||
|
for(int vibrancy = -3; vibrancy <= 5; ++vibrancy){
|
||||||
char filename[256];
|
char filename[256];
|
||||||
time_t t = time(0);
|
time_t t = time(0);
|
||||||
struct tm* lt = localtime(&t);
|
struct tm* lt = localtime(&t);
|
||||||
int r = rand() % 10;
|
int r = vibrancy + 3;
|
||||||
|
output->v = vibrancy;
|
||||||
sprintf(filename, (output_path+"attractor_%04d-%02d-%02d_%02d-%02d-%02d-%01d").c_str(), lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec, r);
|
sprintf(filename, (output_path+"attractor_%04d-%02d-%02d_%02d-%02d-%02d-%01d").c_str(), lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec, r);
|
||||||
|
|
||||||
start = clock();
|
start = clock();
|
||||||
|
@ -127,9 +130,10 @@ int main(int argc, char* argv[]) {
|
||||||
totalTime = ((double)(end-start)/(double)(CLOCKS_PER_SEC));
|
totalTime = ((double)(end-start)/(double)(CLOCKS_PER_SEC));
|
||||||
|
|
||||||
LogInfo("Total clock time for writing png: %f\n", totalTime);
|
LogInfo("Total clock time for writing png: %f\n", totalTime);
|
||||||
|
}
|
||||||
|
|
||||||
{
|
if(0){
|
||||||
std::string path(filename);
|
std::string path;
|
||||||
path += ".stf";
|
path += ".stf";
|
||||||
|
|
||||||
std::ofstream file(path.c_str());
|
std::ofstream file(path.c_str());
|
||||||
|
|
Reference in a new issue