home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / PLOT / FCNPLT41.ZIP / README.DOC < prev   
Text File  |  1990-11-05  |  23KB  |  414 lines

  1.  
  2. Function Plotter version 4.10 documentation.  THIS PROGRAM IS SHAREWARE.
  3. Please support our efforts, registration is $20.
  4.  
  5. To start function plotter for the first time type "fcnplt x", where x is:
  6. h  -for hercules
  7. c  -for cga
  8. e  -for ega or vga (with color monitor)
  9.  
  10. If after running the program, you create a configuration file, type 
  11. "fcnplt" (no parameters). Function plotter will then use the 
  12. configuration file with your custom configuration.  If you want the 
  13. configuration file in the root directory simply put it there and type 
  14. "fcnplt r". Function plotter will then look in the root directory for the 
  15. configuration file. 
  16.  
  17. files:  fcnplt.exe......The main program.
  18.         hercules.exe ...Hercules driver.  This file is needed to print 
  19.                         from a hercules compatible display.
  20.         ega.exe ........EGA driver.  This file is needed to print from an 
  21.                         EGA compatible display.
  22.         func.fcn........Sample function file for demonstration.
  23.         data.dat........Sample data file for demonstration.
  24.         readme.doc......This documentation.
  25.  
  26. SHAREWARE
  27.  
  28. If you find this program useful, please register. Your support is vital 
  29. and has a number of benefits. You will be put on the mailing list for 
  30. future upgrades. They will be mailed to you for a nominal fee or for free 
  31. if you send a stamped, self-addressed mailer and disk. Your questions, 
  32. submitted in writing will be answered. A printed manual will be available 
  33. in the future and will only be offered to registered users. Please send 
  34. your registration fee of $20 to: (also questions, comments) 
  35.  
  36. Robert G. Kaires
  37. 609 Glover Dr.
  38. Runnemede, NJ  08078
  39.  
  40. ENHANCEMENTS IN FCNPLT 4.1 FROM FCNPLT 4.0
  41.  
  42. 1) Polar functions can now be evaluated.
  43. 2) Symbols, line styles, number of points, data file names, are now 
  44.    unique to each stack position.
  45. 3) Using F10 now solicits verification before exiting.
  46. 4) The position of the cursor is now maintained in each editing position.
  47. 5) When reading data from an external file, column information is 
  48.    retained (appended to the data file name).
  49.  
  50. USES
  51.  
  52. 1) Quickly reviewing data in a linear or log format. Data is in column 
  53.    format and can have up to 9 columns. You can plot any column vs. any 
  54.    other column.
  55. 2) Entering function strings and converting to data.  This data can then 
  56.    be plotted or read out to a data file. Functions can be linear (y = 
  57.    y(x)) or polar (r = r(theta)).
  58. 3) Use it as an educational tool.  Examine Taylor series, Fourier series 
  59.    and Chebyshev series approximations.  Look for roots of polynomials.  
  60.    Look at functional behavior as you vary parameters.  
  61. 4) Reading very dense data files and then examining detail using 
  62.    "exploded" views.  
  63. 5) Use the calc mode as an intelligent formula calculator.  
  64.  
  65. OVERVIEW
  66.  
  67. This program plots rectangular or polar functions entered from the 
  68. keyboard. The functions can also be read in from an external file and 
  69. placed on the line being edited. This program can convert the function to 
  70. data and then write the data to an external file. Data from an external 
  71. file, which can have many columns, can be read in and plotted in the 
  72. format of any column verses any other column. Multiple sets of data can 
  73. exit simultaneously in memory in a data "stack". This allows one to 
  74. quickly overlay data, to experiment with different formats, without 
  75. having to constantly read in or generate new data. Data can be plotted in 
  76. a linear or logarithmic fashion. The actual data values can be examined 
  77. point by point (alt v) using the cursor keys. When using this alt v 
  78. feature on a log-log plot, slopes can be quickly determined since the log 
  79. of the value is displayed. Other features include, windowing of data with 
  80. cursor or mouse, control of tic marks, grid control, autoscaling of data, 
  81. custom configuration file, and more. The configuration file can be edited 
  82. (very carefully) to allow any number of data points (default is 500) and 
  83. any number of stack positions (default is 5). Of course there are memory 
  84. limitations. More  on this later. 
  85.  
  86. SUPPORT
  87.  
  88. This program supports Hercules, CGA and EGA. Hercules and CGA have been 
  89. tested. EGA has been tested on an EGA and VGA color monitor. I have not 
  90. tested ega mode on a monochrome monitor. Printer drivers are supplied for 
  91. Hercules and EGA, for use with DOT MATRIX printers. Those using a CGA 
  92. monitor should load the memory resident program, graphics.com, first, and 
  93. then use PrtSc to get a printout. Hercules and EGA users, make sure the 
  94. file hercules.exe or ega.exe is on your disk. When using these drivers, 
  95. use a margin of "0" if your printer doesn't support "esc l" (see your 
  96. printer manual). 
  97.  
  98. QUICK INTRODUCTION
  99.  
  100. When function plotter starts, the cursor is located in the position 
  101. reserved for function "strings".  Simply type in a valid function of x 
  102. (eg. type sin(x), not y=sin(x)). For polar functions see below. If you 
  103. press the "Enter" or the tab key at this point, the cursor will advance 
  104. to the next editing position, which is the number of points (the back tab 
  105. key will move the cursor to the previous editing position). 
  106.  
  107. If you need to see the valid function names while editing the function 
  108. string, press the F1 key. This can be done even in the middle of typing a 
  109. string. The string will not be lost. 
  110.  
  111. Functions can have "x","y" and "z" as variables (or no variables); "x" is 
  112. the horizontal plotting variable; "y" and "z" are really constants that 
  113. are solicited when you "update" the function (generate data). The "ymin" 
  114. and "ymax" on the second line refer to the minimum and maximum vertical 
  115. (data) values and have no relation to "y" in functions. 
  116.  
  117. Now assuming you have a function, move the cursor to the "points" 
  118. position (press tab or Enter). This is the number of data points to be 
  119. generated for the  function (when you press F2). Enter a number from 2 to 
  120. 500. The next four editing positions are the minimums and maximums for 
  121. the x (horizontal)  and y (vertical) axis.  Pay particular attention to 
  122. the x axis limits, the data will be generated between these limits for 
  123. rectangular functions. The y axis limits are less important, the data is 
  124. not truncated at these limits, the plot simply is. You can always use the 
  125. F8 key to bring the full y values on scale, after the data has been 
  126. generated.  Now press the F2 key. This generates data points for the 
  127. function between the x limits you set. Now you have data. You should 
  128. understand, however, that typing in a new function at this point could be 
  129. confusing. The data doesn't "update" to represent the new function UNTIL 
  130. you press the F2 key again (or Alt F2 for polar functions). Now, just for 
  131. practice, put the cursor in the "fcn" (first) or "points" (second) 
  132. position. Now press the down arrow key (make sure num lock is off). You 
  133. are now at stack position 2. Enter a function, set limits, and press F2.  
  134. Now you have new data.  The old data is not lost!  Just position the 
  135. cursor in the "fcn" or "points" position again and press the up arrow 
  136. key, the old function and data are still there. Now you can overlay the 
  137. plots if you like (the scales should be the same for this to make sense).  
  138. Be careful if you change the number of points. If the data has 100 points 
  139. for instance and you change "points" to 50, only the first 50 points will  
  140. plot. On the other hand, if you change "points" to 200, the last 100 
  141. points (which don't exits) will be plotted at 0,0.  No real harm done.  
  142. Each function in each stack position as a unique "points" value and a 
  143. unique plotting style and symbol. This is an improvement over the last 
  144. version. Confusion can result if you changed the x or y limits for two  
  145. functions (or they were changed "for you" with the autoscale feature).   
  146. Your data may be off screen or not scaled correctly. Be aware, if you 
  147. press F8 the y axis will scale TO WITHIN THE X AXIS LIMITS (not 
  148. necessarily the full x range). If you press F9, the x AND y axis will 
  149. autoscale and all you data will be visible. 
  150.  
  151. When function plotter first starts, you will see "fcn(fcn)[ 1]:" on the 
  152. first line of the editing window. The number in square brackets indicates 
  153. the stack position. The "fcn" in parenthesis indicates that a function 
  154. (or null function) but NOT data exits in this stack position. The 
  155. parenthesis can also contain the words "dat" or "pol". If data is 
  156. generated from a function using the F2 key or data is read in from an 
  157. external file, "dat" will appear in the parenthesis. If polar data is 
  158. generated from a function using the alt F2 key, "pol" will appear in the 
  159. parenthesis instead of "dat". If data is read in from an external file 
  160. "dat" will appear, no matter how the data was generated. 
  161.  
  162. To summarize the last paragraph: "fcn" in parenthesis indicates that no 
  163. data is in this stack position, "dat" in parenthesis indicates that 
  164. rectangular data has been generated from a function OR that external 
  165. data has been read in, and "pol" in parenthesis indicates that polar 
  166. data has been generated from a function string. 
  167.  
  168. POLAR FUNCTIONS
  169.  
  170. The only variables allowed in functions are x, y, and z. For 
  171. rectangular functions, the variable x is considered a linear variable. 
  172. For polar functions x is an angular variable (in radians). In either 
  173. case the variables y and z are constants that are solicited when you 
  174. update a function (using the F2 key for rectangular or Alt F2 for 
  175. polar). Function plotter does not "know" (or care!) whether a function 
  176. is rectangular or polar until you "update" by pressing the F2 key or 
  177. the Alt F2 key. If you press F2, the function is treated as 
  178. rectangular whereas is you press Alt F2, the function is treated as 
  179. polar. Try a simple function. Enter the function "1", now press F2 and 
  180. plot the function. Now press Alt F2. Function plotter now asks, "Polar 
  181. fcn: enter angles x1,x2 [0,6.28319]?". It is asking for the angular 
  182. range of the angular variable x. Hit Enter and the default 0 to 2 pi 
  183. will be used (remember angles are always in radians). Now plot the 
  184. function. In the first case the function is y=1 and a horizontal 
  185. straight line is plotted. In the second case the function is r=1 and a 
  186. circle is plotted (looks like an ellipse unless your aspect ratio is 
  187. just right). Did you notice that when you pressed Alt F2, the 
  188. "updating function" message appeared twice? Function plotter is 
  189. converting the polar function to rectangular data by calculating 
  190. r*cos(x) for the abscissa and r*sin(x) for the ordinate. Try the 
  191. following polar functions: 
  192.  
  193.   circle:              c
  194.  
  195.   ellipse:             1/sqr( (cos(x)^2 / a^2) + (sin(x)^2 / b^2) ),
  196.  
  197.   cardioid:            a * ( 1-cos(x) )
  198.  
  199.   hyperbolic spiral:   a/x
  200.  
  201. In the above polar functions a,b, and c are positive constants.
  202.               
  203. CONTROL AND ALT KEYS
  204.  
  205. Certain control and Alt key combinations are "active". These control the 
  206. third line options among other things. For a list of active control and 
  207. Alt keys in function plotter press Alt h (help). Note that on the third 
  208. line, certain letters are capitalized, these  correspond to the Alt or 
  209. Ctrl keys which activate those items. 
  210.  
  211. The following list describes the control and Alt keys.  The first 4 
  212. control keys can be used only when the cursor is in the function editing 
  213. position. 
  214.  
  215. Alt f  : Gets a function from an external file.
  216. Ctrl f : Puts the function (string) into an external file.  The file is 
  217.          created if it doesn't exist or appended to if it does.
  218. Alt d  : Gets data from an external file.  If "auto" is on (use Alt a to 
  219.          turn it on), the x and y axis is autoscaled as the data is read 
  220.          in.  "Points" are set to the number of data points read.
  221.          X axis data is assumed to be in "xcol" (change with Alt x, see 
  222.          below).  Y axis data is assumed to be in "ycol" (change with 
  223.          Alt y, see below).
  224. Ctrl d : Puts the data, that was generated from your function, into an 
  225.          external file.  
  226. -------------------------------------------------------------------------
  227. Alt e  : Toggles the "erase" flag.  When on, the plotting area is erased 
  228.          before plotting.
  229. Alt a  : Toggles the "Autoscale" flag.  When on, the y axis is autoscaled 
  230.          before plotting.  Autoscale cannot scale a constant function 
  231.          (eg. 1.5); ymin will equal ymax.  If you try to plot this you 
  232.          will get an error message.  
  233. Alt t  : Toggles "extended functions".  These are additional functions 
  234.          which are defined using the "intrinsic" (more elementary) 
  235.          functions.  They can be turned off for faster "compilation".
  236. Alt g  : Toggles the grid.
  237. Alt l  : Toggles linear/log scaling.  This toggles in a binary fashion.  
  238.          Try it to see what I mean! 
  239. Alt x  : Changes "xcol", which is the column for x axis data that is 
  240.          used when you read in data from an external file.  
  241. Ctrl x : Changes the number of divisions of the x axis.
  242. Alt y  : Changes "ycol", the column for the y axis data. 
  243. Ctrl y : Changes the number of divisions of the y axis.
  244. Alt c  : Get a screen value with cursor or mouse (will use mouse if 
  245.          connected).
  246. Alt m  : Get a screen value with mouse. This is a little easier to use 
  247.          for those of you with mice.
  248. Alt v  : Gets values on the function using the cursor keypad.  Using the 
  249.          left/right arrow keys moves you along the function or data.  The 
  250.          x and y values are displayed as you move along.  CAUTION: a 
  251.          cursor will be displayed on the plotted points starting in the 
  252.          middle of the data set.  If points are plotted off scale you may 
  253.          not see this cursor!  You can use the up/down cursor to change 
  254.          the size of the cursor.  Also use the tab, home, and end keys.
  255. Alt S  : Changes the plotting symbol and toggles a connecting line.
  256. Alt h  : Prints the control and Alt key menu.
  257. Alt w  : Windows the data using the cursor keypad or a mouse if one is 
  258.          installed.  Use F3 to plot the data after using alt w.  Use F9 
  259.          to effectively "un-window" the data.
  260. Alt z  : Saves the setup in a configuration file called fcnplt.cfg. 
  261.          Warning: 24 different parameters are saved (see below), if you 
  262.          only want to change one parameter it is suggested that you exit
  263.          the program, then restart, change the one parameter, and then 
  264.          save.
  265.  
  266.  
  267. The configuration file is a normal text file and can be edited. This 
  268. should be done very carefully. No error checking is done as the file is 
  269. read in on startup.  Since alt z is the usual way to write to the file, 
  270. this is not normally a problem.  There are two parameters that can be 
  271. changed ONLY by editing the configuration file however.  These are 1) the 
  272. maximum number of data points and 2) the number of stack positions.  The 
  273. defaults are 500 and 5 respectively.  Subject to memory limitations, you 
  274. can set these numbers to anything you desire.  Once again, be careful 
  275. editing this file.  If the program crashes unexplainably, and you have 
  276. edited the configuration file, delete the file fcnplt.cfg, and start 
  277. over.  Just use Ctrl z from inside the program to create a new 
  278. fcnplt.cfg.  The following is an example configuration file: 
  279.  
  280. hercules,data.dat,func.fcn,circle
  281. 1234,100,7,-6.28319,6.28319,-1.1,1.1
  282. on,off,on,off,off,off,on,on
  283. 1,2,10,10,.5
  284.  
  285. line 1: display card, default data file name, default function file name, 
  286. default symbol (valid symbols are: none, circle, square, dot)
  287. line 2: MAXIMUM NUMBER OF DATA POINTS, default number of data points, 
  288. NUMBER OF STACK LOCATIONS, xmin, xmax, ymin, ymax
  289. line 3: automatic erase before plot, autoscale, extended functions, xlog, 
  290. ylog, grid, connecting line (for plotted points), symbol fill 
  291. line 4: x column, y column (to use when reading in external data), number 
  292. of divisions of x axis, number of divisions of y axis, symbol size
  293.  
  294. The capitalization in line 2 indicates the items you can't change in the 
  295. program (using alt z).  In the example configuration file, the maximum 
  296. number of data points is 1234, and the number of stack locations is 7. It 
  297. is suggested that only these two items be changed by editing this file. 
  298.  
  299. MISCELLANEOUS
  300.  
  301. While editing you are always in insert mode.  Pressing the control 
  302. PgDn key deletes the entire entry.  The following keys are useful: 
  303. del, backspace/del, home, end.  When editing the function or number of 
  304. points the "up arrow" and "down arrow" keys chance stack position.  
  305. These keys do nothing if you are in any other editing position (ex. 
  306. you are editing xmin). 
  307.  
  308. While reading functions from an external file, up arrow, down arrow, home 
  309. and end keys are active.  These keys change the line you are viewing.  
  310. Simply press return to read in the function on the line you are viewing.  
  311. In the sample file "func.fcn", I have included comments on some lines.  
  312. The comment precedes the function.  Don't read in the comment.  If you do 
  313. no harm is really done, you just can't process it.  Use Ctrl PgDn to 
  314. delete the line and use alt f again, to read the function file again.  
  315.  
  316. When in the cursor mode (alt c), window mode (alt w) or mouse mode (alt 
  317. m, with no mouse) the following keys are active: tabs, PgUp, PgDn, home, 
  318. end.  Also right, left, up, and down arrows. 
  319.  
  320. While editing xmin,xmax,ymin,ymax  you can enter numeric expressions such 
  321. as pi + cos(.5) + (.5)^3 , just like you would in the calculator mode.  
  322. You cannot use the "extended" functions here. For instance you cannot use 
  323. cosh(3) for xmin even if extended functions are active. You can however, 
  324. use cosh(3) in the calculator if extended functions are active.  
  325.  
  326. Extended functions, of course, can be plotted and their values "picked 
  327. off" with the cursor (alt v). They are called extended because I process 
  328. them so that they are transformed to the "intrinsic" functions. eg. 
  329. cosh(x) is transformed to .5(exp(x)+exp(-x)). They can be used 
  330. recursively. eg. cosh(cosh(x)) or cosh(exp(sinh(x))) etc. They can be 
  331. turned off. Why? Because eventually they may consume an inordinate amount 
  332. of time (when I add more functions). Currently, when you type a 
  333. functional expression, if it does not compute (so to speak), additional 
  334. processing is done to see if it contains my so called external functions.  
  335. This happens even when you type a mistake, such as "cos(x))". Currently 
  336. the delay is very slight. 
  337.  
  338. Floating point exceptions (overflow and underflow) are handled by setting 
  339. the value there equal to zero (plot tan(x) to see how this affects your 
  340. plots). If anyone has a better idea, let me know. 
  341.  
  342. Data files (for reading) must be in column format with at least one 
  343. space separating data items. Any column can be plotted verses any 
  344. other column (by changing xcol and ycol with alt x and alt y).  When 
  345. you generate data from a function and write it out to a file there are 
  346. only two columns. You can, however, read in data which was generated 
  347. with another program containing more than two columns. 
  348.  
  349. When using the "d" option to get a directory listing, the program 
  350. "shells" out to DOS and does a "dir/p".  After the directory is listed 
  351. you must hit ENTER, even though you are not specifically asked to do so, 
  352. in order to return to the program. 
  353.  
  354. The program is not case sensitive (as far as I know), except in one small 
  355. area. When you are in the calculator mode and you are entering x,y or z 
  356. values for a function, you must use lower case q to quit.  
  357.  
  358. EXAMPLES
  359.  
  360. WRITING FUNCTIONAL DATA TO DISK:
  361. Enter a function, set all limits and use F2 to generate data. Then type 
  362. Ctrl d and enter a file name. 
  363.  
  364. READING EXTERNAL DATA FROM DISK: 
  365. Hit up arrow or down arrow if you want to get to an unused stack 
  366. position. Press Alt d and enter a file name. When the data is read in, 
  367. the program will automatically scale x and y limits if "Auto" is on.  
  368. If you had it off, simply hit F9 to autoscale x and y. The number of 
  369. points will automatically be updated to reflect your data. If you try 
  370. to read in more than 500 points, the data will be truncated. You can 
  371. overcome this however by creating a configuration file and then 
  372. editing it. See the section following the "alt z" description above.  
  373.  
  374. WRITING A FUNCTION (STRING) TO DISK:
  375. Enter a function, press Ctrl f, then enter a file name. Your function 
  376. (string) will be appended to that file. A file will be created if none 
  377. exits. 
  378.  
  379. READING A FUNCTION FROM DISK:
  380. Go to an unused stack position if desired. Press Alt f, enter a file 
  381. name.  You are now "viewing" that file, line by line.  Simply press ENTER 
  382. and that line will be read in. Note that in the sample file "func.fcn", I 
  383. include "comment" lines. These are treated just like function strings, 
  384. eg. you can (accidentally) read them in. No harm, just delete it and 
  385. start over.  You can, by the way, write your own comment lines, by typing 
  386. in a "function" which is really a comment (don't try to use F2!!).  Then 
  387. use Ctrl f and write this comment to a file. Of course you can also use 
  388. an editor outside the program to create/edit a function file. I had some 
  389. trouble doing this because some editors embed different control 
  390. characters in files. (end of file character, end of line character, etc.)  
  391. What function plotter "needs" is one CR and one LF character after EACH 
  392. line. (CR = carriage return, LF = line feed). Here is an example of how 
  393. you can get into trouble. You create a new function file using (say) 
  394. Sidekick Plus (TM). It puts an end of file character at the end of your 
  395. file. In function plotter you append a few lines of functions.  You exit 
  396. function plotter and bring up Sikekick to look at your file and you don't 
  397. see your new lines. What happened? Well, Sidekick will ignore anything 
  398. after the EOF mark, and that's exactly where you appended your lines.  
  399.  
  400. SHAREWARE
  401.  
  402. If you find this program useful, please register. Your support is vital 
  403. and has a number of benefits. You will be put on the mailing list for 
  404. future upgrades. They will be mailed to you for a nominal fee or for free 
  405. if you send a stamped, self-addressed mailer and disk. Your questions, 
  406. submitted in writing will be answered. A printed manual will be available 
  407. in the future and will only be offered to registered users. Please send 
  408. your registration fee of $20 to: (also questions, comments) 
  409.  
  410. Robert G. Kaires
  411. 609 Glover Dr.
  412. Runnemede, NJ  08078
  413.  
  414.