home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / fractal / kaos.lha / kaos_main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-08  |  3.1 KB  |  109 lines

  1. /*        ###  Main program for kaos ###
  2. --------------------------------------------------------------------------------
  3.  
  4.                 kaos
  5.  
  6.         general purpose dynamical system toolkit
  7.  
  8. --------------------------------------------------------------------------------
  9.  
  10.             alpha test version 
  11.     by Swan Kim and John Guckenheimer,POSTECH & Cornell U
  12.  
  13.     Copyright by the Authors. All rights reserved.
  14.     A copy can be only obtained through authors. Though a modification
  15.     to the package is allowed, a copy of the modified program
  16.     should also be sent to authors with a note about changes.
  17.  
  18. --------------------------------------------------------------------------------
  19.  
  20.     First written by Swan Kim 3/30/1988.
  21.     Modified by Swan Kim 4/29/1988.
  22.     Modified by Swan Kim 4/30/1989. 
  23.         Integrated functions to variables.
  24.     Modified by Swan Kim 8/31/1989
  25.         Introduced mapping forward and backward subroutines
  26.         Introduced periodicity. Introduced function arrays.
  27.         Beefed up the auxiliary windows.
  28.         Installed notifier based piping.
  29.     Modified by Swan Kim 10/31/1989
  30.         Dynamic Memory allocation
  31.         Division of phase space, parameter space, main panel windows
  32.         Added AUTO ouput piping
  33.         Installed Notifier based interrupt
  34.         Set up the user supplied dynamical system facility
  35.     Modified by Swan Kim 11/1/1989
  36.         Added many symplectic integration schemes
  37.         Overhauled batching routines
  38.         Created printing window (can print both raster and postscript files)
  39.     Modified by Swan Kim 11/10/1989
  40.         Added general eigenvalue routines
  41.         Extended the periodic orbit and manifold computation to arbitrary dimensions
  42.         Added Help window
  43.     Modified by Swan Kim 12/1/1989
  44.         Created windows for Fourier Spectra,Lyapunov Exponents,Dimensions
  45.         Partially installed a scan window
  46.         Split main routine into a smaller modules.
  47. --------------------------------------------------------------------------------
  48. */
  49.  
  50. #include "include/kaos.h"
  51.  
  52. main(argc,argv)
  53. int argc;
  54. char **argv;
  55. {
  56.     /* print a startup message on the screen */
  57.     printf("\n");
  58.     printf("%s\n",startup_message);
  59.     printf("\n");
  60.  
  61.     /* reset a directory to a current working directory */
  62.     (char *) getwd(dir_name);
  63.     
  64.     /* set a signal function */
  65.     notify_set_signal_func(frame,my_signal_handler,SIGURG, NOTIFY_ASYNC);
  66.         
  67.     /* command line argument interpretation */
  68.     (void) handle_command_line_args(argc,argv);
  69.  
  70.     /* initialization of the model */
  71.     (void) initialize_model(model);
  72.  
  73.     /* reset all labels and window parameters */
  74.     reset_params();
  75.  
  76.     /* initial memory allocations for kaos data */
  77.     (void) alloc_memory();
  78.  
  79.     /* initialize the window configuration */
  80.     window_init();
  81.     
  82.     /* get fonts */
  83.     (void) get_fonts();
  84.  
  85.     /* Create Icon */
  86.     icon = icon_create(ICON_IMAGE,&kaos_icon,0);
  87.  
  88.     /* Create a base frame*/
  89.     (void) create_base_frame();
  90.     
  91.     /* Create a cursor */
  92.     (void) create_base_cursor();
  93.     
  94.     /* create a base canvas */
  95.     (void) create_base_canvas();
  96.  
  97.     /* initialize the color graphics on the base window */
  98.     (void) initialize_graphics();
  99.  
  100.     /* create all menus */
  101.     (void) create_all_menus();
  102.  
  103.     /* create a startup window configuration */
  104.     (void) create_startup_windows();
  105.  
  106.     /* Transfer control to Notifier*/
  107.     window_main_loop(frame);
  108. }
  109.