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.
|
|
|
//
|
|
|
|
// $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];
|
|
|
|
}
|
|
|
|
*/
|