You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
770 B
36 lines
770 B
//
|
|
// $filename
|
|
// $projectname
|
|
//
|
|
// Created by Joshua moerman on $TODAY.
|
|
// Copyright 2010 Joshua Moerman. All rights reserved.
|
|
//
|
|
|
|
#include "PolynomialA3D.hpp"
|
|
#include <algorithm>
|
|
|
|
|
|
#pragma mark -
|
|
#pragma mark ctors
|
|
|
|
PolynomialA3D::PolynomialA3D():
|
|
AttractorKernel(3, 3){}
|
|
|
|
|
|
#pragma mark -
|
|
#pragma mark attractor
|
|
|
|
void PolynomialA3D::operator()() {
|
|
std::swap(vectorNew, vectorOld);
|
|
|
|
vectorNew[0] = parameters[0] + vectorOld[1] - vectorOld[1]*vectorOld[2];
|
|
vectorNew[1] = parameters[1] + vectorOld[2] - vectorOld[2]*vectorOld[0];
|
|
vectorNew[2] = parameters[2] + vectorOld[0] - vectorOld[0]*vectorOld[1];
|
|
}
|
|
|
|
/*
|
|
N dimensional:
|
|
for ( unsigned int i = 0; i < dim; i++ ) {
|
|
new_point[i] = param[i] + point[(i+1) % dim] - point[(i+1) % dim]*point[(i+2) % dim];
|
|
}
|
|
*/
|
|
|