4
Copyright 2003-4 Tim Goetze <tim@quitte.de>
12
This program is free software; you can redistribute it and/or
13
modify it under the terms of the GNU General Public License
14
as published by the Free Software Foundation; either version 2
15
of the License, or (at your option) any later version.
17
This program is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
GNU General Public License for more details.
22
You should have received a copy of the GNU General Public License
23
along with this program; if not, write to the Free Software
24
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25
02111-1307, USA or point your web browser to http://www.gnu.org.
28
#ifndef _DSP_ROESSLER_H_
29
#define _DSP_ROESSLER_H_
36
double x[2], y[2], z[2];
49
/* rate is normalized (0 .. 1) */
50
void set_rate (double r)
52
h = max (.000001, r * .096);
55
void init (double _h = .001, double seed = .0)
61
x[0] = .0001 + .0001 * seed;
65
for (int i = 0; i < 5000; ++i)
73
x[J] = x[I] + h * (- y[I] - z[I]);
74
y[J] = y[I] + h * (x[I] + a * y[I]);
75
z[J] = z[I] + h * (b + z[I] * (x[I] - c));
79
return x[I] * .01725 + z[I] * .015;
100
#endif /* _DSP_ROESSLER_H_ */