|
|
@ -16,7 +16,7 @@ private: |
|
|
|
|
|
|
|
public: |
|
|
|
Ikeda3D(): |
|
|
|
AttractorKernel(3, 1) { |
|
|
|
AttractorKernel(3, 4) { |
|
|
|
init(); |
|
|
|
} |
|
|
|
|
|
|
@ -24,16 +24,19 @@ public: |
|
|
|
|
|
|
|
virtual void generate_random_parameters() { |
|
|
|
parameters[0] = rand() / double(RAND_MAX) *2.0 - 0.5; |
|
|
|
parameters[1] = rand() / double(RAND_MAX) *2.0 - 0.5; // wikipedia: u
|
|
|
|
parameters[2] = rand() / double(RAND_MAX) *2.0 - 0.5; |
|
|
|
parameters[3] = rand() / double(RAND_MAX) *30.0; |
|
|
|
init(); |
|
|
|
} |
|
|
|
|
|
|
|
virtual void operator()() { |
|
|
|
std::swap(vectorNew, vectorOld); |
|
|
|
|
|
|
|
vectorOld[2] = 0.4 - 6.0/(1 + vectorOld[0]*vectorOld[0] + vectorOld[1]*vectorNew[1]); |
|
|
|
vectorOld[2] = parameters[2] - parameters[3]/(1 + vectorOld[0]*vectorOld[0] + vectorOld[1]*vectorNew[1]); |
|
|
|
|
|
|
|
vectorNew[0] = 1 + parameters[0] * (vectorOld[0]*cos(vectorOld[2]) - vectorOld[1]*sin(vectorOld[2])); |
|
|
|
vectorNew[0] = parameters[0] * (vectorOld[0]*sin(vectorOld[2]) + vectorOld[1]*cos(vectorOld[2])); |
|
|
|
vectorNew[0] = parameters[0] + parameters[1] * (vectorOld[0]*cos(vectorOld[2]) - vectorOld[1]*sin(vectorOld[2])); |
|
|
|
vectorNew[1] = parameters[1] * (vectorOld[0]*sin(vectorOld[2]) + vectorOld[1]*cos(vectorOld[2])); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|