diff options
author | B. Bogart <bbogart@users.sourceforge.net> | 2002-09-16 16:36:20 +0000 |
---|---|---|
committer | B. Bogart <bbogart@users.sourceforge.net> | 2002-09-16 16:36:20 +0000 |
commit | 2c7657c48db74de5a512c55165df80b877b38d33 (patch) | |
tree | 14bc0e281a0a4d2014abde3adf91145364dd147e /rossler.c | |
parent | 9c772b63840098d6bc66ca5fd03d25cbcc8646bf (diff) |
Added arguments to "reset" method, allows reseting to particular initial conditions.
svn path=/trunk/externals/bbogart/chaos/; revision=128
Diffstat (limited to 'rossler.c')
-rw-r--r-- | rossler.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -60,11 +60,11 @@ static void calculate(rossler_struct *x) outlet_float(x->z_outlet, (t_float)lz1); } -static void reset(rossler_struct *x) +static void reset(rossler_struct *x, t_floatarg lx0, t_floatarg ly0, t_floatarg lz0) { - x->lx0 = 0.1; - x->ly0 = 0; - x->lz0 = 0; + x->lx0 = lx0; + x->ly0 = ly0; + x->lz0 = lz0; } static void param(rossler_struct *x, t_floatarg h, t_floatarg a, t_floatarg b, t_floatarg c) @@ -109,6 +109,9 @@ void rossler_setup(void) class_addmethod(rossler_class, (t_method)reset, gensym("reset"), + A_DEFFLOAT, + A_DEFFLOAT, + A_DEFFLOAT, 0); class_addmethod(rossler_class, |