|
|
@ -89,7 +89,8 @@ int main(int argc, char* argv[]) { |
|
|
|
} |
|
|
|
|
|
|
|
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(); |
|
|
|
|
|
|
|
LogInfo("\nRendering\n"); |
|
|
@ -114,22 +115,25 @@ int main(int argc, char* argv[]) { |
|
|
|
LogMoreInfo("Average iterations per second: %f\n\n", totalIterations/totalTime); |
|
|
|
|
|
|
|
// saving output
|
|
|
|
char filename[256]; |
|
|
|
time_t t = time(0); |
|
|
|
struct tm* lt = localtime(&t); |
|
|
|
int r = rand() % 10; |
|
|
|
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); |
|
|
|
for(int vibrancy = -3; vibrancy <= 5; ++vibrancy){ |
|
|
|
char filename[256]; |
|
|
|
time_t t = time(0); |
|
|
|
struct tm* lt = localtime(&t); |
|
|
|
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); |
|
|
|
|
|
|
|
start = clock(); |
|
|
|
myAttractor.projector->canvas->output_file(filename); |
|
|
|
end = clock(); |
|
|
|
start = clock(); |
|
|
|
myAttractor.projector->canvas->output_file(filename); |
|
|
|
end = clock(); |
|
|
|
|
|
|
|
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); |
|
|
|
} |
|
|
|
|
|
|
|
{ |
|
|
|
std::string path(filename); |
|
|
|
if(0){ |
|
|
|
std::string path; |
|
|
|
path += ".stf"; |
|
|
|
|
|
|
|
std::ofstream file(path.c_str()); |
|
|
|