|
@ -6,15 +6,17 @@ using namespace std; |
|
|
#include "Canvas.hpp" |
|
|
#include "Canvas.hpp" |
|
|
#include "Projector.hpp" |
|
|
#include "Projector.hpp" |
|
|
|
|
|
|
|
|
|
|
|
#include "defines.hpp" |
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) { |
|
|
int main(int argc, char *argv[]) { |
|
|
clock_t start, end; |
|
|
clock_t start, end; |
|
|
double totalTime, totalIterations; |
|
|
double totalTime, totalIterations; |
|
|
|
|
|
|
|
|
// initialising stuff
|
|
|
// initialising stuff
|
|
|
Attractor myAttractor("attractors/testPolynomial.stf"); |
|
|
Attractor myAttractor(ATTRACTOR_FILE); |
|
|
|
|
|
|
|
|
Projector projection; |
|
|
Projector projection; |
|
|
Canvas canvas(8000, 8000, 3); |
|
|
Canvas canvas(WIDTH, HEIGHT, 3); |
|
|
projection.canvas = &canvas; |
|
|
projection.canvas = &canvas; |
|
|
|
|
|
|
|
|
myAttractor.projectors.push_back(&projection); |
|
|
myAttractor.projectors.push_back(&projection); |
|
@ -22,8 +24,7 @@ int main(int argc, char *argv[]) { |
|
|
|
|
|
|
|
|
projection.output(); |
|
|
projection.output(); |
|
|
|
|
|
|
|
|
// iterating 4 evah
|
|
|
unsigned int iterations = ITERATIONS; |
|
|
unsigned int iterations = 800000000; // acht honderd miljoen
|
|
|
|
|
|
start = clock(); |
|
|
start = clock(); |
|
|
for ( unsigned int j = 1; j <= 100; j++ ) { |
|
|
for ( unsigned int j = 1; j <= 100; j++ ) { |
|
|
for ( unsigned int i = 0; i <= iterations; i++ ) { |
|
|
for ( unsigned int i = 0; i <= iterations; i++ ) { |
|
@ -49,6 +50,7 @@ int main(int argc, char *argv[]) { |
|
|
totalTime = ((double)(end-start)/(double)(CLOCKS_PER_SEC)); |
|
|
totalTime = ((double)(end-start)/(double)(CLOCKS_PER_SEC)); |
|
|
|
|
|
|
|
|
printf("total clock time for writing png: %f\n", totalTime ); |
|
|
printf("total clock time for writing png: %f\n", totalTime ); |
|
|
|
|
|
printf("\n Awesome Attractor, version %s\n", __DATE__); |
|
|
|
|
|
|
|
|
/*if ( argc <= 2 ) {
|
|
|
/*if ( argc <= 2 ) {
|
|
|
cout << endl << "nothing to do..." << endl; |
|
|
cout << endl << "nothing to do..." << endl; |
|
|