diff --git a/AwesomeAttractor.cbp b/AwesomeAttractor.cbp
index d779f9c..9522d6f 100644
--- a/AwesomeAttractor.cbp
+++ b/AwesomeAttractor.cbp
@@ -44,6 +44,9 @@
+
+
+
diff --git a/Canvas.cpp b/Canvas.cpp
index bd61bd9..1e65f76 100644
--- a/Canvas.cpp
+++ b/Canvas.cpp
@@ -118,7 +118,7 @@ void Canvas::output_file(const char * filename){
if ( max_int[i] < int_array[j+i*width*height] ) {
max_int[i] = int_array[j+i*width*height];
}
- if ( int_array[j+i*width*height] ) {
+ if ( int_array[j+i*width*height] > 5 ) {
cumulative += int_array[j+i*width*height];
n++;
}
@@ -138,14 +138,14 @@ void Canvas::output_file(const char * filename){
}
}
- const double vibrancy = v;
+ const double vibrancy = 2.0;
double averagePower = 0;
for ( unsigned int i = 0; i < num_colors; i++ ) {
averagePower += power[i];
}
- averagePower /= num_colors;
+ averagePower /= (double)num_colors;
for ( unsigned int i = 0; i < num_colors; i++ ) {
- power[i] = vibrancy*power[i] + (1.0 - vibrancy*averagePower);
+ power[i] = vibrancy*power[i] + (1.0 - vibrancy)*averagePower;
}
pngwriter * pngFile = new pngwriter(width, height, 0.0, filename);
diff --git a/attractors/testLorenz.stf b/attractors/testLorenz.stf
index ef5e48c..a0d1829 100644
--- a/attractors/testLorenz.stf
+++ b/attractors/testLorenz.stf
@@ -12,8 +12,8 @@ attractor: {
parameters: the variables of the attractortype
{
- :"0.001"
- :"4.2"
+ :"0.01"
+ :"4.002"
:"28"
:"0.3"
}
diff --git a/attractors/testPolynomial.stf b/attractors/testPolynomial.stf
index 93110b3..b84a312 100644
--- a/attractors/testPolynomial.stf
+++ b/attractors/testPolynomial.stf
@@ -13,37 +13,36 @@ attractor: {
parameters: the variables of the attractortype
{
- :"0.148"
- :"0"
- :"0"
- :"0"
- :"0"
- :"-0.001"
- :"0.119"
- :"0.424"
- :"1.100"
- :"0"
- :"0.125"
- :"0.199"
- :"0"
- :"0"
- :"0"
- :"0"
- :"-0.643"
- :"0"
- :"0"
- :"0"
- :"-1.1201"
- :"-1.1881"
- :"0"
- :"0"
- :"0.001"
- :"-0.8639"
- :"-0.001"
- :"0.001"
- :"0"
- :"0"
- :"0"
+ :"0.862"
+ :"-1.147"
+ :"0.01"
+ :"0.241"
+ :"-0.85"
+ :"-0.174"
+ :"1.193"
+ :"-0.572"
+ :"0.772"
+ :"0.147"
+ :"-0.049"
+ :"0.427"
+ :"-0.103"
+ :"-0.402"
+ :"1.13"
+ :"0.859"
+ :"-0.642"
+ :"-0.649"
+ :"-1.074"
+ :"-0.636"
+ :"-0.706"
+ :"0.315"
+ :"-0.125"
+ :"1.193"
+ :"0.533"
+ :"-0.091"
+ :"0.778"
+ :"-1.199"
+ :"-0.112"
+ :"0.025"
}
}
diff --git a/main.cpp b/main.cpp
index 7e29f9b..9d43809 100644
--- a/main.cpp
+++ b/main.cpp
@@ -11,7 +11,7 @@ int main(int argc, char *argv[]) {
double totalTime, totalIterations;
// initialising stuff
- Attractor myAttractor("attractors/testLorenz.stf");
+ Attractor myAttractor("attractors/testPolynomial.stf");
Projector projection;
Canvas canvas(800, 800, 3);
@@ -23,7 +23,7 @@ int main(int argc, char *argv[]) {
projection.output();
// iterating 4 evah
- unsigned int iterations = 200000; // twintig duizend
+ unsigned int iterations = 2000; // tweeduizend
start = clock();
for ( unsigned int j = 1; j <= 100; j++ ) {
for ( unsigned int i = 0; i <= iterations; i++ ) {
@@ -39,7 +39,7 @@ int main(int argc, char *argv[]) {
totalIterations = 100.0*iterations;
totalTime = ((double)(end-start)/(double)(CLOCKS_PER_SEC));
printf("\ntotal clock time: %f\n", totalTime );
- printf("average iterations per second: %f\n", totalIterations/((double)(end-start)/(double)(CLOCKS_PER_SEC)) );
+ printf("average iterations per second: %f\n\n", totalIterations/((double)(end-start)/(double)(CLOCKS_PER_SEC)) );
// saving output
start = clock();
@@ -48,7 +48,7 @@ int main(int argc, char *argv[]) {
totalTime = ((double)(end-start)/(double)(CLOCKS_PER_SEC));
- printf("\ntotal clock time for writing png: %f\n", totalTime );
+ printf("total clock time for writing png: %f\n", totalTime );
/*if ( argc <= 2 ) {
cout << endl << "nothing to do..." << endl;