Mac binaries
[jabaws.git] / website / archive / binaries / mac / src / disembl / Tisean_3.0.1 / source_f / ikeda.f
1 c===========================================================================
2 c
3 c   This file is part of TISEAN
4
5 c   Copyright (c) 1998-2007 Rainer Hegger, Holger Kantz, Thomas Schreiber
6
7 c   TISEAN is free software; you can redistribute it and/or modify
8 c   it under the terms of the GNU General Public License as published by
9 c   the Free Software Foundation; either version 2 of the License, or
10 c   (at your option) any later version.
11 c
12 c   TISEAN is distributed in the hope that it will be useful,
13 c   but WITHOUT ANY WARRANTY; without even the implied warranty of
14 c   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 c   GNU General Public License for more details.
16 c
17 c   You should have received a copy of the GNU General Public License
18 c   along with TISEAN; if not, write to the Free Software
19 c   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 c
21 c===========================================================================
22 c   ikeda.f
23 c   iterate Ikeda map
24 c   author Thomas Schreiber (1998)
25 c===========================================================================
26       double precision xo, yo, xn, yn, a, b, c, s, cs, ss
27       character*72 fout
28       data a/0.4/,b/6.0/,c/0.9/,
29      .   ntrans/10000/,xo/.68587/,yo/.65876/
30       data iverb/1/
31
32       call whatido("Ikeda map",iverb)
33       nmax=imust('l')
34       ntrans=ican('x',ntrans)
35       a=fcan('A',real(a))
36       b=fcan('B',real(b))
37       c=fcan('C',real(c))
38       xo=fcan('X',real(xo))
39       yo=fcan('Y',real(yo))
40       isout=igetout(fout,iverb)
41
42       if(isout.eq.1) fout="ikeda.dat"
43       call outfile(fout,iunit,iverb)
44       n=-ntrans
45  1    n=n+1
46       s=a-b/(1.+xo**2+yo**2)
47       cs=cos(s)
48       ss=sin(s)
49       xn=1.+c*(xo*cs-yo*ss)
50       yn=c*(xo*ss+yo*cs)
51       xo=xn
52       yo=yn
53       if(n.lt.1) goto 1
54       write(iunit,*) real(xn), real(yn)
55       if(nmax.eq.0.or.n.lt.nmax) goto 1
56       end
57
58       subroutine usage()
59 c usage message
60
61       call whatineed(
62      .   "-l# [-A# -B# -C# -R# -I# -o outfile -x# -V# -h]")
63       call popt("l","number of points x,y (l=0: infinite)")
64       call popt("A","parameter a (0.4)")
65       call popt("B","parameter b (6.0)")
66       call popt("C","parameter c (0.9)")
67       call popt("R","initial Re(z)")
68       call popt("I","initial Im(z)")
69       call popt("x","number of transients discarded (10000)")
70       call pout("ikeda.dat")
71       call pall()
72       stop
73       end
74
75