-static double logistic(double,double), circle(double,double), leftlog(double,double), rightlog(double,double), doublelog(double,double);
-static double dlogistic(double,double), dcircle(double,double), dleftlog(double,double), drightlog(double,double), ddoublelog(double,double);
-static PFD map, deriv;
-static PFD Maps[NUMMAPS] = { logistic, circle, leftlog, rightlog, doublelog };
-static PFD Derivs[NUMMAPS] = { dlogistic, dcircle, dleftlog, drightlog, ddoublelog };
-
-static int aflag=0, bflag=0, wflag=0, hflag=0, Rflag=0;
-static double pmins[NUMMAPS] = { 2.0, 0.0, 0.0, 0.0, 0.0 };
-static double pmaxs[NUMMAPS] = { 4.0, 1.0, 6.75, 6.75, 16.0 };
-static double amins[NUMMAPS] = { 2.0, 0.0, 0.0, 0.0, 0.0 };
-static double aranges[NUMMAPS] = { 2.0, 1.0, 6.75, 6.75, 16.0 };
-static double bmins[NUMMAPS] = { 2.0, 0.0, 0.0, 0.0, 0.0 };
-static double branges[NUMMAPS] = { 2.0, 1.0, 6.75, 6.75, 16.0 };
-
-static int forcing[MAXINDEX] = { 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
- 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
- 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1 };
-static int Forcing[FUNCMAXINDEX] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
-
-static int maxindex = MAXINDEX;
-static int funcmaxindex = FUNCMAXINDEX;
-static double min_a=2.0, min_b=2.0, a_range=2.0, b_range=2.0, minlyap=1.0;
-static double max_a=4.0, max_b=4.0;
-static double start_x=0.65, lyapunov, a_inc, b_inc, a, b;
-static int numcolors=16, numfreecols, displayplanes, lowrange;
-static xy_t point;
-static Pixmap pixmap;
-static Colormap cmap;
-static XColor Colors[MAXCOLOR];
-static double *exponents[MAXFRAMES];
-static double a_minimums[MAXFRAMES], b_minimums[MAXFRAMES];
-static double a_maximums[MAXFRAMES], b_maximums[MAXFRAMES];
-static double minexp, maxexp, prob=0.5;
-static int expind[MAXFRAMES]={0}, resized[MAXFRAMES]={0};
-static int numwheels=MAXWHEELS, force=0, Force=0, negative=1;
-static int rgb_max=65000, nostart=1, stripe_interval=7;
-static int save=1, show=0, useprod=1, spinlength=256, savefile=0;
-static int maxframe=0, frame=0, dorecalc=0, mapindex=0, run=1;
-static char *outname="lyap.out";
-
-
-const char * const version = LYAP_VERSION;
-
-static void resize(void);
-static void redisplay(Window w, XExposeEvent *event);
-static void Spin(Window w);
-static void show_defaults(void);
-static void StartRubberBand(Window w, image_data_t *data, XEvent *event);
-static void TrackRubberBand(Window w, image_data_t *data, XEvent *event);
-static void EndRubberBand(Window w, image_data_t *data, XEvent *event);
-static void CreateXorGC(void);
-static void InitBuffer(void);
-static void BufferPoint(Display *display, Window window, int color,
- int x, int y);
-static void FlushBuffer(void);
-static void init_canvas(void);
-static void init_data(void);
-static void init_color(void);
-static void parseargs(void);
-static void Clear(void);
-static void setupmem(void);
-static void main_event(void);
-static int complyap(void);
-static void Getkey(XKeyEvent *event);
-static int sendpoint(double expo);
-static void save_to_file(void);
-static void setforcing(void);
-static void check_params(int mapnum, int parnum);
-static void usage(void);
-static void Destroy_frame(void);
-static void freemem(void);
-static void Redraw(void);
-static void redraw(double *exparray, int index, int cont);
-static void recalc(void);
-static void SetupCorners(XPoint *corners, image_data_t *data);
-static void set_new_params(Window w, image_data_t *data);
-static void go_down(void);
-static void go_back(void);
-static void go_init(void);
-static void jumpwin(void);
-static void print_help(void);
-static void print_values(void);
-
-
-void
-screenhack (Display *d, Window window)
-{
- XWindowAttributes xgwa;
- int builtin = -1;
- dpy = d;
- XGetWindowAttributes (dpy, window, &xgwa);
- width = xgwa.width;
- height = xgwa.height;
- visual = xgwa.visual;
- cmap = xgwa.colormap;