home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / unix / volume26 / chernikv / part01 < prev    next >
Encoding:
Text File  |  1993-04-02  |  22.7 KB  |  625 lines

  1. Newsgroups: comp.sources.unix
  2. From: atae@spva.physics.imperial.ac.uk (Dr Ata Etemadi)
  3. Subject: v26i091: chernikov - computes Chernikov stochastic webs, Part01/01
  4. Sender: unix-sources-moderator@vix.com
  5. Approved: paul@vix.com
  6.  
  7. Submitted-By: atae@spva.physics.imperial.ac.uk (Dr Ata Etemadi)
  8. Posting-Number: Volume 26, Issue 91
  9. Archive-Name: chernikov/part01
  10.  
  11. This program computes the stochastic webs produced by the Chernikov
  12. equations (see Nature Vol. 326, April 1987) and produces a PGM image
  13. based on occupancy of cells. The equations essentially describe the
  14. path of a non-relativistic charged particle rotating about a magnetic
  15. field line, and experiencing a periodic electric field impulse.
  16.  
  17.     atae@spva.physics.imperial.ac.uk (Dr Ata Etemadi)
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 1 (of 1)."
  26. # Contents:  COPYRIGHT Chernikov.c LICENCE Makefile README
  27. # Wrapped by atae@minie on Sat Apr 18 23:45:25 1992
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'COPYRIGHT' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'COPYRIGHT'\"
  31. else
  32. echo shar: Extracting \"'COPYRIGHT'\" \(995 characters\)
  33. sed "s/^X//" >'COPYRIGHT' <<'END_OF_FILE'
  34. X
  35. X    Chernikov
  36. X
  37. XCopyright (C) 1992    
  38. X
  39. X    Ataollah Etemadi,
  40. X    Space and Atmospheric Physics Group,
  41. X    Blackett Laboratory,
  42. X    Imperial College of Science, Technology and Medicine
  43. X    Prince Consort Road,
  44. X    London SW7 2BZ.
  45. X
  46. X    This program is free software; you can redistribute it and/or
  47. X    modify it under the terms of the GNU General Public License as
  48. X    published by the Free Software Foundation; either version 1, or
  49. X    any later version.
  50. X
  51. X    This program is distributed in the hope that it will be useful,
  52. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  53. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  54. X    GNU General Public License for more details.
  55. X
  56. X    You should have received a copy of the GNU General Public License
  57. X    along with this program; if not, write to the Free Software
  58. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  59. X
  60. X    Note: This program has been exempted from the requirement of
  61. X      paragraph 2c of the General Public License.
  62. END_OF_FILE
  63. if test 995 -ne `wc -c <'COPYRIGHT'`; then
  64.     echo shar: \"'COPYRIGHT'\" unpacked with wrong size!
  65. fi
  66. # end of 'COPYRIGHT'
  67. fi
  68. if test -f 'Chernikov.c' -a "${1}" != "-c" ; then 
  69.   echo shar: Will not clobber existing file \"'Chernikov.c'\"
  70. else
  71. echo shar: Extracting \"'Chernikov.c'\" \(4245 characters\)
  72. sed "s/^X//" >'Chernikov.c' <<'END_OF_FILE'
  73. X/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  74. X
  75. XName : Chernikov
  76. XVersion: 1.0
  77. XWritten on   :  24-Apr-92     By : A. Etemadi
  78. XModified on  : 
  79. XDirectory    : ~atae/Space
  80. X
  81. X==============================================================================
  82. X
  83. X
  84. XUsage:    
  85. X    Chernikov -[AKUVhsnrc] > OutputPGMImage
  86. X
  87. XOutput result       : 
  88. X
  89. X   0 = successful, 
  90. X  -1 = error, 
  91. X
  92. XFunctionality: 
  93. X
  94. XIterates through the Chernikov equations (Nature Vol. 326, April 1987)
  95. Xand produces an image based on occupancy of cells.
  96. X
  97. X----------------------------------------------------------------------------*/
  98. X
  99. X#include <stdio.h>     /* Standard C I/O library */
  100. X#include <math.h>      /* Standard C mathematics library */
  101. X
  102. X#define pi 2.0*acos(0.0)
  103. X
  104. Xmain(argc,argv)
  105. X
  106. X int  argc;
  107. X char **argv;
  108. X
  109. X{
  110. X
  111. X/*
  112. X=======================================================================
  113. X===================== START OF DECLARATION ============================
  114. X=======================================================================
  115. X*/
  116. X
  117. X/*
  118. X Indecies
  119. X*/
  120. X
  121. X    register int i,j;
  122. X    register int row,col;
  123. X
  124. X    int Height,Width;
  125. X
  126. X    FILE *p_OutFile;        /* Pointer to start of output file */
  127. X
  128. X/* 
  129. X Create buffer for image
  130. X*/
  131. X    char OutImage[512][512];
  132. X
  133. X/* 
  134. X Chernikov parameters
  135. X*/
  136. X    float Alpha;
  137. X    float K;
  138. X    float U0,U1;
  139. X    float V0,V1;
  140. X    float Scale;
  141. X
  142. X    int NIter;
  143. X
  144. X    float KoverAlpha;
  145. X    float cosAlpha;
  146. X    float sinAlpha;
  147. X    float Beta;
  148. X/*
  149. X=======================================================================
  150. X===================== START OF INITIALISATION =========================
  151. X=======================================================================
  152. X*/
  153. X/*
  154. X Set defaults, process command line options
  155. X*/
  156. X    Alpha     = 2.0*pi/5.0; 
  157. X    K     = 0.9;
  158. X    U0     = 0.0;
  159. X    V0     = 15.0;
  160. X       Scale     = 1.5;
  161. X    NIter     = 10000;
  162. X    Height    = Width = 256;
  163. X
  164. X  for (i=1;i<argc;i++) {
  165. X    if (argv[i][0] == '-') {
  166. X      switch (argv[i][1]) {
  167. X        case 'A': Alpha     = atof(argv[++i]); continue;    
  168. X        case 'K': K     = atof(argv[++i]); continue;    
  169. X        case 'U': U0     = atof(argv[++i]); continue;    
  170. X        case 'V': V0     = atof(argv[++i]); continue;    
  171. X        case 's': Scale     = atof(argv[++i]); continue;    
  172. X        case 'n': NIter  = atoi(argv[++i]); continue;    
  173. X        case 'r': Height = atoi(argv[++i]); continue;    
  174. X        case 'c': Width  = atoi(argv[++i]); continue;    
  175. X           default : fprintf(stderr,"unrecognized option: %s",argv[i]); return(-1);
  176. X        case 'h':
  177. X         fprintf(stderr,"\nUSAGE :\n");
  178. X        fprintf(stderr," Chernikov -[AKUVhsnrc] > OutImage\n\n");
  179. X        fprintf(stderr,"OPTION:                    DEFAULT:\n");
  180. X        fprintf(stderr,"-----------------------------------\n");
  181. X        fprintf(stderr,"-A Alpha                   2pi/15\n");
  182. X        fprintf(stderr,"-K Kappa                   0.9\n");
  183. X        fprintf(stderr,"-U Initial pahse           0.0\n");
  184. X        fprintf(stderr,"-V Initial Velocity        15.0\n");
  185. X        fprintf(stderr,"-s Scale                   2.0\n");
  186. X        fprintf(stderr,"-n Interations             10000\n");
  187. X        fprintf(stderr,"-r Image Height            256\n");
  188. X        fprintf(stderr,"-c Image Width             256\n");
  189. X        return(-1);
  190. X      }
  191. X    }
  192. X  }
  193. X
  194. X/*
  195. X Use standard output
  196. X*/
  197. X       p_OutFile = stdout;
  198. X/*
  199. X  Initialise OutImage pixels and starting parameters
  200. X*/
  201. X  for (i = 0; i < Height; i++) {
  202. X      for (j = 0; j < Width; j++) {
  203. X         OutImage[i][j] = (char) 0;
  204. X    }
  205. X  }
  206. X
  207. X        cosAlpha = cos(Alpha);
  208. X        sinAlpha = sin(Alpha);
  209. X        KoverAlpha = K/Alpha;
  210. X     fprintf(stderr,"\n");
  211. X
  212. X/*
  213. X Now iterate through the Chernikov equation
  214. X*/
  215. X  for (i = 0; i < NIter; i++) {
  216. X
  217. X     row = (int) (U0*Scale) + Height/2; 
  218. X     col = (int) (V0*Scale) + Width/2;
  219. X
  220. X     if ( (i+1)%10000 == 0)
  221. X     fprintf(stderr,"Iteration = %d\r",i+1);
  222. X
  223. X    if (row < Height && col < Width && row > 0 && col > 0 &&
  224. X             (OutImage[row][col] & 0377) < 255 )
  225. X              OutImage[row][col] += (char) 1;
  226. X
  227. X         Beta = U0 + KoverAlpha*sin(V0);
  228. X         U1 =  Beta*cosAlpha + V0*sinAlpha;
  229. X         V1 = -Beta*sinAlpha + V0*cosAlpha;
  230. X         U0 = U1; V0 = V1;         
  231. X  }
  232. X/*
  233. X Write resultant image with PGM header
  234. X*/
  235. X
  236. X  fprintf(p_OutFile,"P5\n%d %d\n255\n",Height,Width);
  237. X  for (i = 0; i < Height; i++) {
  238. X      for (j = 0; j < Width; j++) {
  239. X           putc(OutImage[i][j],p_OutFile);
  240. X    }
  241. X  }
  242. X
  243. X/*
  244. X Close file
  245. X*/
  246. X         fprintf(stderr,"\n");
  247. X         fclose(p_OutFile);
  248. X
  249. X      return(0);
  250. X}
  251. END_OF_FILE
  252. if test 4245 -ne `wc -c <'Chernikov.c'`; then
  253.     echo shar: \"'Chernikov.c'\" unpacked with wrong size!
  254. fi
  255. # end of 'Chernikov.c'
  256. fi
  257. if test -f 'LICENCE' -a "${1}" != "-c" ; then 
  258.   echo shar: Will not clobber existing file \"'LICENCE'\"
  259. else
  260. echo shar: Extracting \"'LICENCE'\" \(12488 characters\)
  261. sed "s/^X//" >'LICENCE' <<'END_OF_FILE'
  262. X
  263. X            GNU GENERAL PUBLIC LICENSE
  264. X             Version 1, February 1989
  265. X
  266. X Copyright (C) 1989 Free Software Foundation, Inc.
  267. X                    675 Mass Ave, Cambridge, MA 02139, USA
  268. X Everyone is permitted to copy and distribute verbatim copies
  269. X of this license document, but changing it is not allowed.
  270. X
  271. X                Preamble
  272. X
  273. X  The license agreements of most software companies try to keep users
  274. Xat the mercy of those companies.  By contrast, our General Public
  275. XLicense is intended to guarantee your freedom to share and change free
  276. Xsoftware--to make sure the software is free for all its users.  The
  277. XGeneral Public License applies to the Free Software Foundation's
  278. Xsoftware and to any other program whose authors commit to using it.
  279. XYou can use it for your programs, too.
  280. X
  281. X  When we speak of free software, we are referring to freedom, not
  282. Xprice.  Specifically, the General Public License is designed to make
  283. Xsure that you have the freedom to give away or sell copies of free
  284. Xsoftware, that you receive source code or can get it if you want it,
  285. Xthat you can change the software or use pieces of it in new free
  286. Xprograms; and that you know you can do these things.
  287. X
  288. X  To protect your rights, we need to make restrictions that forbid
  289. Xanyone to deny you these rights or to ask you to surrender the rights.
  290. XThese restrictions translate to certain responsibilities for you if you
  291. Xdistribute copies of the software, or if you modify it.
  292. X
  293. X  For example, if you distribute copies of a such a program, whether
  294. Xgratis or for a fee, you must give the recipients all the rights that
  295. Xyou have.  You must make sure that they, too, receive or can get the
  296. Xsource code.  And you must tell them their rights.
  297. X
  298. X  We protect your rights with two steps: (1) copyright the software, and
  299. X(2) offer you this license which gives you legal permission to copy,
  300. Xdistribute and/or modify the software.
  301. X
  302. X  Also, for each author's protection and ours, we want to make certain
  303. Xthat everyone understands that there is no warranty for this free
  304. Xsoftware.  If the software is modified by someone else and passed on, we
  305. Xwant its recipients to know that what they have is not the original, so
  306. Xthat any problems introduced by others will not reflect on the original
  307. Xauthors' reputations.
  308. X
  309. X  The precise terms and conditions for copying, distribution and
  310. Xmodification follow.
  311. X
  312. X            GNU GENERAL PUBLIC LICENSE
  313. X   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  314. X
  315. X  0. This License Agreement applies to any program or other work which
  316. Xcontains a notice placed by the copyright holder saying it may be
  317. Xdistributed under the terms of this General Public License.  The
  318. X"Program", below, refers to any such program or work, and a "work based
  319. Xon the Program" means either the Program or any work containing the
  320. XProgram or a portion of it, either verbatim or with modifications.  Each
  321. Xlicensee is addressed as "you".
  322. X
  323. X  1. You may copy and distribute verbatim copies of the Program's source
  324. Xcode as you receive it, in any medium, provided that you conspicuously and
  325. Xappropriately publish on each copy an appropriate copyright notice and
  326. Xdisclaimer of warranty; keep intact all the notices that refer to this
  327. XGeneral Public License and to the absence of any warranty; and give any
  328. Xother recipients of the Program a copy of this General Public License
  329. Xalong with the Program.  You may charge a fee for the physical act of
  330. Xtransferring a copy.
  331. X
  332. X  2. You may modify your copy or copies of the Program or any portion of
  333. Xit, and copy and distribute such modifications under the terms of Paragraph
  334. X1 above, provided that you also do the following:
  335. X
  336. X    a) cause the modified files to carry prominent notices stating that
  337. X    you changed the files and the date of any change; and
  338. X
  339. X    b) cause the whole of any work that you distribute or publish, that
  340. X    in whole or in part contains the Program or any part thereof, either
  341. X    with or without modifications, to be licensed at no charge to all
  342. X    third parties under the terms of this General Public License (except
  343. X    that you may choose to grant warranty protection to some or all
  344. X    third parties, at your option).
  345. X
  346. X    c) If the modified program normally reads commands interactively when
  347. X    run, you must cause it, when started running for such interactive use
  348. X    in the simplest and most usual way, to print or display an
  349. X    announcement including an appropriate copyright notice and a notice
  350. X    that there is no warranty (or else, saying that you provide a
  351. X    warranty) and that users may redistribute the program under these
  352. X    conditions, and telling the user how to view a copy of this General
  353. X    Public License.
  354. X
  355. X    d) You may charge a fee for the physical act of transferring a
  356. X    copy, and you may at your option offer warranty protection in
  357. X    exchange for a fee.
  358. X
  359. XMere aggregation of another independent work with the Program (or its
  360. Xderivative) on a volume of a storage or distribution medium does not bring
  361. Xthe other work under the scope of these terms.
  362. X
  363. X  3. You may copy and distribute the Program (or a portion or derivative of
  364. Xit, under Paragraph 2) in object code or executable form under the terms of
  365. XParagraphs 1 and 2 above provided that you also do one of the following:
  366. X
  367. X    a) accompany it with the complete corresponding machine-readable
  368. X    source code, which must be distributed under the terms of
  369. X    Paragraphs 1 and 2 above; or,
  370. X
  371. X    b) accompany it with a written offer, valid for at least three
  372. X    years, to give any third party free (except for a nominal charge
  373. X    for the cost of distribution) a complete machine-readable copy of the
  374. X    corresponding source code, to be distributed under the terms of
  375. X    Paragraphs 1 and 2 above; or,
  376. X
  377. X    c) accompany it with the information you received as to where the
  378. X    corresponding source code may be obtained.  (This alternative is
  379. X    allowed only for noncommercial distribution and only if you
  380. X    received the program in object code or executable form alone.)
  381. X
  382. XSource code for a work means the preferred form of the work for making
  383. Xmodifications to it.  For an executable file, complete source code means
  384. Xall the source code for all modules it contains; but, as a special
  385. Xexception, it need not include source code for modules which are standard
  386. Xlibraries that accompany the operating system on which the executable
  387. Xfile runs, or for standard header files or definitions files that
  388. Xaccompany that operating system.
  389. X
  390. X  4. You may not copy, modify, sublicense, distribute or transfer the
  391. XProgram except as expressly provided under this General Public License.
  392. XAny attempt otherwise to copy, modify, sublicense, distribute or transfer
  393. Xthe Program is void, and will automatically terminate your rights to use
  394. Xthe Program under this License.  However, parties who have received
  395. Xcopies, or rights to use copies, from you under this General Public
  396. XLicense will not have their licenses terminated so long as such parties
  397. Xremain in full compliance.
  398. X
  399. X  5. By copying, distributing or modifying the Program (or any work based
  400. Xon the Program) you indicate your acceptance of this license to do so,
  401. Xand all its terms and conditions.
  402. X
  403. X  6. Each time you redistribute the Program (or any work based on the
  404. XProgram), the recipient automatically receives a license from the original
  405. Xlicensor to copy, distribute or modify the Program subject to these
  406. Xterms and conditions.  You may not impose any further restrictions on the
  407. Xrecipients' exercise of the rights granted herein.
  408. X
  409. X  7. The Free Software Foundation may publish revised and/or new versions
  410. Xof the General Public License from time to time.  Such new versions will
  411. Xbe similar in spirit to the present version, but may differ in detail to
  412. Xaddress new problems or concerns.
  413. X
  414. XEach version is given a distinguishing version number.  If the Program
  415. Xspecifies a version number of the license which applies to it and "any
  416. Xlater version", you have the option of following the terms and conditions
  417. Xeither of that version or of any later version published by the Free
  418. XSoftware Foundation.  If the Program does not specify a version number of
  419. Xthe license, you may choose any version ever published by the Free Software
  420. XFoundation.
  421. X
  422. X  8. If you wish to incorporate parts of the Program into other free
  423. Xprograms whose distribution conditions are different, write to the author
  424. Xto ask for permission.  For software which is copyrighted by the Free
  425. XSoftware Foundation, write to the Free Software Foundation; we sometimes
  426. Xmake exceptions for this.  Our decision will be guided by the two goals
  427. Xof preserving the free status of all derivatives of our free software and
  428. Xof promoting the sharing and reuse of software generally.
  429. X
  430. X                NO WARRANTY
  431. X
  432. X  9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  433. XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  434. XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  435. XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  436. XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  437. XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  438. XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  439. XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  440. XREPAIR OR CORRECTION.
  441. X
  442. X  10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  443. XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  444. XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  445. XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  446. XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  447. XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  448. XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  449. XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  450. XPOSSIBILITY OF SUCH DAMAGES.
  451. X
  452. X             END OF TERMS AND CONDITIONS
  453. X
  454. X    Appendix: How to Apply These Terms to Your New Programs
  455. X
  456. X  If you develop a new program, and you want it to be of the greatest
  457. Xpossible use to humanity, the best way to achieve this is to make it
  458. Xfree software which everyone can redistribute and change under these
  459. Xterms.
  460. X
  461. X  To do so, attach the following notices to the program.  It is safest to
  462. Xattach them to the start of each source file to most effectively convey
  463. Xthe exclusion of warranty; and each file should have at least the
  464. X"copyright" line and a pointer to where the full notice is found.
  465. X
  466. X    <one line to give the program's name and a brief idea of what it does.>
  467. X    Copyright (C) 19yy  <name of author>
  468. X
  469. X    This program is free software; you can redistribute it and/or modify
  470. X    it under the terms of the GNU General Public License as published by
  471. X    the Free Software Foundation; either version 1, or (at your option)
  472. X    any later version.
  473. X
  474. X    This program is distributed in the hope that it will be useful,
  475. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  476. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  477. X    GNU General Public License for more details.
  478. X
  479. X    You should have received a copy of the GNU General Public License
  480. X    along with this program; if not, write to the Free Software
  481. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  482. X
  483. XAlso add information on how to contact you by electronic and paper mail.
  484. X
  485. XIf the program is interactive, make it output a short notice like this
  486. Xwhen it starts in an interactive mode:
  487. X
  488. X    Gnomovision version 69, Copyright (C) 19xx name of author
  489. X    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  490. X    This is free software, and you are welcome to redistribute it
  491. X    under certain conditions; type `show c' for details.
  492. X
  493. XThe hypothetical commands `show w' and `show c' should show the
  494. Xappropriate parts of the General Public License.  Of course, the
  495. Xcommands you use may be called something other than `show w' and `show
  496. Xc'; they could even be mouse-clicks or menu items--whatever suits your
  497. Xprogram.
  498. X
  499. XYou should also get your employer (if you work as a programmer) or your
  500. Xschool, if any, to sign a "copyright disclaimer" for the program, if
  501. Xnecessary.  Here a sample; alter the names:
  502. X
  503. X  Yoyodyne, Inc., hereby disclaims all copyright interest in the
  504. X  program `Gnomovision' (a program to direct compilers to make passes
  505. X  at assemblers) written by James Hacker.
  506. X
  507. X  <signature of Ty Coon>, 1 April 1989
  508. X  Ty Coon, President of Vice
  509. X
  510. XThat's all there is to it!
  511. END_OF_FILE
  512. if test 12488 -ne `wc -c <'LICENCE'`; then
  513.     echo shar: \"'LICENCE'\" unpacked with wrong size!
  514. fi
  515. # end of 'LICENCE'
  516. fi
  517. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  518.   echo shar: Will not clobber existing file \"'Makefile'\"
  519. else
  520. echo shar: Extracting \"'Makefile'\" \(649 characters\)
  521. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  522. X# Makefile for Chernikov
  523. X# Created by AE @ ICST 14-04-92
  524. X#
  525. X
  526. XLIBS    = -lm
  527. X
  528. XLIBDIR    = /usr/lib
  529. XLIBFLG    = -L${LIBDIR}
  530. X
  531. XINCDIR    = /usr/include
  532. XINCFLG    = -I${INCDIR}
  533. X
  534. XBINDIR    = .
  535. XOBJDIR    = .
  536. XSRCDIR    = .
  537. X
  538. XOPT    = -O
  539. X
  540. XBINARIES    = ${BINDIR}/Chernikov
  541. X
  542. XOBJECTS    = ${OBJDIR}/Chernikov.o
  543. X
  544. Xall:    ${BINARIES} ${OBJECTS}
  545. X
  546. Xclean:
  547. X    /bin/rm -fr *.*~*
  548. X
  549. Xsuperclean:
  550. X    /bin/rm -fr *.*~* ${OBJECTS}
  551. X
  552. Xultraclean:
  553. X    /bin/rm -fr *.*~* ${OBJECTS} ${BINARIES}
  554. X
  555. Xshar:
  556. X    makekit *
  557. X
  558. X${BINDIR}/Chernikov  : ${OBJDIR}/Chernikov.o
  559. X        ${CC} ${OPT} ${OBJDIR}/Chernikov.o ${LIBFLG} ${LIBS} -o $@
  560. X
  561. X${OBJDIR}/Chernikov.o: ${SRCDIR}/Chernikov.c 
  562. X        ${CC} -c ${CFLAGS} ${SRCDIR}/Chernikov.c ${INCFLG} -o $@
  563. END_OF_FILE
  564. if test 649 -ne `wc -c <'Makefile'`; then
  565.     echo shar: \"'Makefile'\" unpacked with wrong size!
  566. fi
  567. chmod +x 'Makefile'
  568. # end of 'Makefile'
  569. fi
  570. if test -f 'README' -a "${1}" != "-c" ; then 
  571.   echo shar: Will not clobber existing file \"'README'\"
  572. else
  573. echo shar: Extracting \"'README'\" \(915 characters\)
  574. sed "s/^X//" >'README' <<'END_OF_FILE'
  575. XType 'make' to install in current directory.
  576. X
  577. XRunning the program with -h flag gives usage info.
  578. X
  579. XThis program computes the stochastic webs produced by the Chernikov
  580. Xequations (see Nature Vol. 326, April 1987) and produces a PGM image
  581. Xbased on occupancy of cells. The equations essentially describe the
  582. Xpath of a non-relativistic charged particle rotating about a magnetic
  583. Xfield line, and experiencing a periodic electric field impulse. You
  584. Xneed to read the paper to really understand the parameters, in brief
  585. Xhowever:
  586. X
  587. X    Alpha is the period between impulses
  588. X    K is the strength of the impulse it receives
  589. X    U is the phase of the particle
  590. X    V is the velocity of the particle
  591. X
  592. XThe other parameters are specific to the program namely:
  593. X
  594. X    s is the scaling factor
  595. X    n is the number of iterations
  596. X    r is the number of rows in the resulting image
  597. X    c is the number of columns in the resulting image
  598. X
  599. X        adios amigos
  600. X            Ata <(|)>.
  601. END_OF_FILE
  602. if test 915 -ne `wc -c <'README'`; then
  603.     echo shar: \"'README'\" unpacked with wrong size!
  604. fi
  605. # end of 'README'
  606. fi
  607. echo shar: End of archive 1 \(of 1\).
  608. cp /dev/null ark1isdone
  609. MISSING=""
  610. for I in 1 ; do
  611.     if test ! -f ark${I}isdone ; then
  612.     MISSING="${MISSING} ${I}"
  613.     fi
  614. done
  615. if test "${MISSING}" = "" ; then
  616.     echo You have the archive.
  617.     rm -f ark[1-9]isdone
  618. else
  619.     echo You still need to unpack the following archives:
  620.     echo "        " ${MISSING}
  621. fi
  622. ##  End of shell archive.
  623. exit 0
  624.