My old project for strange attractors
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

34 lines
765 B

//
// $filename
// $projectname
//
// Created by Joshua moerman on $TODAY.
// Copyright 2010 Joshua Moerman. All rights reserved.
//
15 years ago
#include "PolynomialA3D.hpp"
#include <algorithm>
15 years ago
PolynomialA3D::PolynomialA3D():
15 years ago
AttractorKernel(3, 3){
init();
}
15 years ago
void PolynomialA3D::init() {
}
void PolynomialA3D::operator()() {
std::swap(vectorNew, vectorOld);
15 years ago
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];
15 years ago
}
/*
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];
}
*/