home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / science / wlplt112.arj / WLPLOT.DOC < prev    next >
Text File  |  1992-05-18  |  40KB  |  1,279 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.                                                          Wesley B. Loewer's
  16.  
  17.  
  18.                                                           Plotting Programs
  19.  
  20.                                                                version 1.12
  21.  
  22.  
  23.  
  24.                                                 (C) 1991,  Wesley B. Loewer
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.                                                Manual Updated: May 18, 1992
  63.  
  64.  
  65.  
  66.                                                                      Page 2
  67.  
  68.    Table of Contents
  69.  
  70.         Topic                                                          Page
  71.    Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3
  72.    Latest Version  . . . . . . . . . . . . . . . . . . . . . . . . . . .  3
  73.    Hardware  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3
  74.    Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
  75.    Common Features . . . . . . . . . . . . . . . . . . . . . . . . . . .  5
  76.         Saving & Retrieving  . . . . . . . . . . . . . . . . . . . . . .  5
  77.         PCX Format . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
  78.         Variables  . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
  79.         Plotting & Zooming . . . . . . . . . . . . . . . . . . . . . . .  6
  80.         Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
  81.    Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
  82.    Two Dimensional Function Plotter  . . . . . . . . . . . . . . . . . . 10
  83.    Conic Section Plotter . . . . . . . . . . . . . . . . . . . . . . . .  ?
  84.    Derivative Plotter  . . . . . . . . . . . . . . . . . . . . . . . . . 13
  85.    Relation Plotter  . . . . . . . . . . . . . . . . . . . . . . . . . .  ?
  86.    Bifurcation Plotter . . . . . . . . . . . . . . . . . . . . . . . . . 14
  87.    Data Curve Fitting  . . . . . . . . . . . . . . . . . . . . . . . . .  ?
  88.    Revision History  . . . . . . . . . . . . . . . . . . . . . . . . . . 18
  89.    In Closing  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                                                           Plotting Programs
  127.  
  128.  
  129.  
  130.                                                                      Page 3
  131.  
  132.    Introduction:
  133.    These plotting programs were designed to help  students understand graphs
  134.    a little better by allowing them to quickly plot a graph to see what  the
  135.    function looks  like.  Often, students  get bogged down in button pushing
  136.    and  point-by-point plotting  and  fail  to grasp  the real  significance
  137.    behind the graph.  The  goal of these programs is  to eliminate the  busy
  138.    work  of  plotting,  freeing  the  student  to  proceed  to  higher level
  139.    thinking.
  140.  
  141.    Speaking of free,  that's one  of the nice  things about these  programs.
  142.    (See the end of  this file for the conditions  in which this  program may
  143.    be used without  charge.)  These  may not  be the best plotting  programs
  144.    that  you can find, but you can't beat them for the  price.  I have tried
  145.    to include as  many features that I  thought students and teachers  could
  146.    actually use.  Please distribute to anyone who can use it.
  147.  
  148.    Latest Version:
  149.    The latest version of "WL Plot" can be found at
  150.  
  151.                             Data Warp Premium BBS
  152.                                 (713) 355-6107
  153.                                   Spring, TX
  154.  
  155.    "WL Plot"  is distributed as WLPLT???.ZIP,  where the  ??? represents the
  156.    version  number.    When  passing  "WL  Plot"  along  to  others,  please
  157.    distribute all the files and documentation.   Currently, the ZIP contains
  158.    the following files: 
  159.  
  160.              wlplot.exe     func.exe       conic.exe
  161.              deriv.exe      relat.exe      cfit.exe
  162.              bifurc.exe     helvb.fon      wlplot.doc     + sample files
  163.  
  164.  
  165.    Hardware:
  166.    You will  need an IBM-compatible computer with DOS version  3.0 or later.
  167.    (It  will probably  work with  an  earlier  version but  it has  not been
  168.    tested.)   You will  also need some  sort of graphics  capability, either
  169.    CGA, EGA, MCGA, VGA,  or Hercules graphics adapters (except for the Curve
  170.    Fitting program).  A mouse is useful but not necessary.
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.                                                           Plotting Programs
  191.  
  192.  
  193.  
  194.                                                                      Page 4
  195.  
  196.    Getting Started:
  197.    Start the program  by typing "wlplot"  at the DOS prompt.   The user will
  198.    be presented with the following choices.
  199.  
  200.                      Assortment of Plotting Programs
  201.  
  202.    1) Functions
  203.         Plots functions in Cartesian, Polar, or Parametric form.
  204.  
  205.    2) Conic Sections
  206.         Plots parabolas, circles, ellipses, and hyperbolas.
  207.  
  208.    3) Derivatives
  209.         Plots functions along with 1st and 2nd derivatives.
  210.  
  211.    4) Relation Plotter
  212.         A  somewhat slow but extremely useful plotter for graphing relations
  213.         that are  not  necessarily functions.    It's  also good  for  those
  214.         situations where you just cannot solve for y.
  215.  
  216.    5) Bifurcations
  217.         A  bifurcation   fractal  plotter.     Shows  period   doubling  and
  218.         demonstrates concepts such as Chaos and  the Feigenbaum number.   To
  219.         see an example, try the population  equation r*p*(1-p) with  initial
  220.         value=0.5,  x min=1,  x max=4,  y min=0,  y  max=1, with  r  as  the
  221.         independent  variable  and  p as  the dependent.    It's slow  so be
  222.         patient.
  223.  
  224.    6) Curve Fitting
  225.         Fits  a line  or  curve to  a  set of  data  points.   Uses  linear,
  226.         logarithmic, exponential,  power, and  up to  9th degree  polynomial
  227.         models.   This  program can  run  without  a graphics  adapter card.
  228.         Graphics  is not needed  to calculate  the coefficients  of the best
  229.         fit  line  or  curve  (such  as  slope  and  intercept).    Graphics
  230.         capability  is needed, however, if  the curve is to  be displayed on
  231.         the screen or printed.  Up the 1500 data points are allowed.
  232.  
  233.    0) Exit
  234.         Exits the program.
  235.  
  236.    The individual  programs listed  may be  loaded either  from "wlplot"  as
  237.    shown above or  from the DOS  command line.  This was  done so that  360K
  238.    floppy based  users could still use the programs on separate disks.  Each
  239.    of these  plotting programs  are explained  in detail  below.    All  the
  240.    programs share a similar user interface.   When a program first starts, a
  241.    menu  appears  on  the  screen  with  several  groups  of  options listed
  242.    together.  To move from one group  to another, you can use  the following
  243.    keys:
  244.  
  245.         Function key (ex. <F3>) - moves to a particular group
  246.         <TAB> - moves to the next group
  247.         <SHIFT><TAB> - move to the previous group
  248.  
  249.    To move to  different options within  a group, use the up  and down arrow
  250.    keys.  If  you have a mouse, simply point the mouse arrow  to the desired
  251.    selection and  click the left  mouse button.   A ">" will  appear at  the
  252.  
  253.  
  254.                                                           Plotting Programs
  255.  
  256.  
  257.  
  258.                                                                      Page 5
  259.  
  260.    left of  the selected option.   There are four different types of options
  261.    on the menu screen.  Each type is explained below with an example.
  262.  
  263.    Toggle type           The option  is  turned on  or off  by pressing  the
  264.                          space  bar,  the  return key,  or  clicking on  the
  265.                          option with  the  left  mouse  button.    If  an  X
  266.                          appears in  the parenthesis,  the option is  turned
  267.                          on.
  268.    Example:
  269.    (X) Grid              The grid is turned on.
  270.    Example:
  271.    ( ) Grid              The grid is turned off.
  272.  
  273.  
  274.    Choice type           A  list  of choices  is  presented.    A choice  is
  275.                          selected by  pressing  the  space bar,  the  return
  276.                          key,  or clicking on the choice with the left mouse
  277.                          button.
  278.    Example:
  279.    ( ) Cartesian         The list presented on  the left can  only have  one
  280.    ( ) Polar             choice  between  them.   In  this  case, the  Polar
  281.    (*) Parametric        graph  is   selected,  so  the   graph  cannot   be
  282.                          Cartesian or Parametric.
  283.  
  284.    Example:
  285.    (2) Cartesian         The Cartesian  type graph  has been selected.   The
  286.    ( ) Polar             "2"   indicates   that   2   equations   will    be
  287.    ( ) Parametric        simultaneously plotted.    A "1"  would indicate  a
  288.                          single equation would be plotted.
  289.  
  290.  
  291.    Action type           Selecting   an   action  option   causes  something
  292.                          immediately to be done.  An  action is activated by
  293.                          pressing   the  space  bar,  the   return  key,  or
  294.                          clicking the left mouse button.
  295.    Example:
  296.    Save                  Saves current equations and settings to disk. 
  297.  
  298.  
  299.    Dialogue type         The program  expects a response from you, such as a
  300.                          value or an equation.
  301.    Example:              The user is  expected to enter  in a  function such
  302.    y() =                 as "sin(x)"
  303.    Example:               The  user is  expected to  enter a number  such as
  304.    x min =               "-2.5"
  305.  
  306.  
  307.    Common Features:
  308.    A number  of features  are common  to several  of the plotting  programs.
  309.    These common are discussed below.
  310.  
  311.    Saving & Retrieving:
  312.    When a save or retrieve action is selected, the main menu  is cleared and
  313.    another screen appears  at the top of the screen prompting you for a file
  314.    name  to use to save  the data.   You can type in a  file name, or if you
  315.    have  a mouse, double  click on a file  name listed.  You  do not have to
  316.    put an  extension  on your  file  names.   (For  example,  the file  name
  317.  
  318.                                                           Plotting Programs
  319.  
  320.  
  321.  
  322.                                                                      Page 6
  323.  
  324.    "abcd.efg"  has the extension  is ".efg".)   A default  extension will be
  325.    appended to filenames which do not have an explicit extension.
  326.  
  327.    PCX Format:
  328.    The PCX  format is  a graphics  format commonly  used by other  software,
  329.    such  as  painting,  word processing,  and desk-top  publishing programs.
  330.    Therefore, graphs saved with the "Save-PCX"  option can be imported  into
  331.    these other programs.  The filename extension for PCX files is ".pcx".
  332.  
  333.    Variables:
  334.    These programs can use  up to 10 variables at  a time.  To indicate which
  335.    variable  is to  be the  horizontal  independent  variable, move  to that
  336.    variable  in the "<F5> Variables" menu and  enter an "i" or an  "h".  The
  337.    message  "<independent variable>" will  then appear.  Some programs allow
  338.    you to  declare a variable as the vertical dependent variable by entering
  339.    a  "d" or "v".   To get  rid of old  variables, select  the "Purge Unused
  340.    Variables" option.
  341.  
  342.    Plotting & Zooming:
  343.    While the graph is being plotted, hitting any key will  stop the plotting
  344.    procedure.   After  plotting  is finished,  an arrow  will appear.   This
  345.    arrow can be move around by  either the arrow keys or  a mouse.  Pressing
  346.    the  space bar will  cause the X &  Y coordinates of the  arrow tip to be
  347.    shown in the lower left hand  corner of the  screen.  You can zoom in  to
  348.    define  a  new  plotting area  by  placing  the  cursor  at  the  desired
  349.    location.  To define  the left, right,  top, or bottom  edges, press  the
  350.    'l', 'r',  't', or  'b' keys respectively.   The  <F1> key  or the  <LEFT
  351.    MOUSE BUTTON>  is a  short-cut for  the bottom  left hand  corner of  the
  352.    plotting area,  and pressing the <F2> key or the <RIGHT  MOUSE BUTTON> is
  353.    a  short-cut for  the top  right hand  corner of  the plotting  area.   A
  354.    rectangle will  appear to show  what area you have define.   Pressing the
  355.    <ENTER> key, the <ESC> key, or <BOTH MOUSE BUTTONS> will  cause the graph
  356.    to be replotted with the new  zoomed in screen coordinates.  Pressing the
  357.    <CTRL-ENTER> or <CTRL-BOTH MOUSE BUTTONS> causes  the graph to zoom  out,
  358.    making  the image smaller.  If  zooming has not taken  place, the program
  359.    returns to the main menu.
  360.  
  361.    Printing:
  362.    To print  a graph directly to  a printer, DOS's  GRAPHICS utility must be
  363.    loaded before  starting the  plotting menu.  When  you have a  graph that
  364.    you would like printed, press the  <SHIFT><PrtSc> key (or just <PrntScrn>
  365.    key on  enhanced keyboards).   See  your DOS  manual for  details of  the
  366.    GRAPHICS command.   Note that DOS  version 3.3 and earlier can only print
  367.    CGA mode  graphics while  version 4.0  and later  can print  EGA and  VGA
  368.    graphics as well.   You can force  the plotting program  to use  CGA mode
  369.    graphics by  starting the program with  "wlplot cga".  This allows you to
  370.    print the screen, even if your DOS version  is prior to 4.0, even  if you
  371.    have a VGA card.  You  can also print a screen by saving it to a file  by
  372.    selecting "Save-PCX" and then  importing the PCX file  into a painting or
  373.    word processing  program.   This allows  you  to merge  plots with  other
  374.    graphics  into  a  document.    (See  "PCX  Format"  on  page  6 of  this
  375.    document.)
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.                                                           Plotting Programs
  383.  
  384.  
  385.  
  386.                                                                      Page 7
  387.  
  388.    Functions:
  389.    The following functions are known to the program:
  390.  
  391.    Constants:
  392.         pi              3.141592653589793
  393.         e               2.718281828459045
  394.  
  395.    Binary functions:
  396.         add             x+y
  397.         subtract        x-y
  398.         multiply        x*y  or  2x
  399.         divide          x/y
  400.         exponentiation  x^y
  401.         modulus         x mod y  or  mod(x,y)
  402.         combination     comb(n,r)
  403.         permutation     perm(n,r)
  404.         maximum         max(x,y)
  405.         minimum         min(x,y)
  406.  
  407.    Unary functions:
  408.         negation        -x  or  neg(x)
  409.         inverse         inv(x)
  410.         square root     sqrt(x)
  411.         square          sq(x)
  412.         round           round(x)
  413.         ceiling         ceil(x)       round up
  414.         floor           floor(x)      round down
  415.         integer         int(x)        truncate decimal
  416.         fractional      frac(x)
  417.         absolute value  abs(x)
  418.         sign            sign(x)
  419.         factorial       n! or fact(n)
  420.         is value real?  isreal(x)
  421.  
  422.    Trigonometry functions: (in radians)
  423.         sine            sin(x)
  424.         inverse sine    asin(x)  or  arcsin(x)
  425.         cosine          cos(x)
  426.         inverse cosine  acos(x)  or  arccos(x)
  427.         tangent         tan(x)
  428.         inverse tan     atan(x)  or  arctan(x)
  429.         inverse tan2    atan2(x,y)  or  arctan2(x,y)
  430.         cotangent       cot(x)
  431.         inverse cot     acot(x)  or  arccot(x)
  432.         secant          sec(x)
  433.         inverse sec     asec(x)  or  arcsec(x)
  434.         cosecant        csc(x)
  435.         inverse csc     acsc(x)  or  arccsc(x)
  436.         rad to deg      raddeg(x)
  437.         deg to rad      degrad(x)
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.                                                           Plotting Programs
  447.  
  448.  
  449.  
  450.                                                                      Page 8
  451.  
  452.    Logarithm related functions:
  453.         natural log     ln(x)
  454.         exponential     exp(x)
  455.         common log      log(x)
  456.         antilog         alog(x)  or  antilog(x)
  457.         log base n      logb(n,x)
  458.         hyperbolic sin  sinh(x)
  459.         inverse sinh    asinh(x)
  460.         hyperbolic cos  cosh(x)
  461.         inverse cosh    acosh(x)
  462.         hyperbolic tan  tanh(x)
  463.         inverse tanh    atanh(x)
  464.  
  465.    Bessel functions:
  466.         1st kind, 0     j_0(x)
  467.         1st kind, 1     j_1(x)
  468.         1st kind, n     j_n(n,x)
  469.         2nd kind, 0     y_0(x)
  470.         2nd kind, 1     y_1(x)
  471.         2nd kind, n     y_n(n,x)
  472.  
  473.    Trinary Function:
  474.         conditional if  if(b,t,f) 
  475.                             if b is true then use t, else use f.
  476.                           ex: if(x>=0,3x,x^2)
  477.    The if is probably  the single most  powerful function here.   It  allows
  478.    the  user to perform branching of  sorts.  Nested if's are  allowed.  For
  479.    example the following pseudo-code
  480.              if x < 2
  481.                   then y = 3x^2
  482.              else if x < 5
  483.                   then y = 6x
  484.              else
  485.                   y = x^2+5
  486.    can be coded Algebraically as
  487.              if( x<2, 3x^2, if( x<5, 6x, x^2+5))
  488.    or in RPN as
  489.              x 2 < 3 x sq * x 5 < 6 x * x sq 5 + if if
  490.  
  491.  
  492.    Boolean Comparisons: (evaluates to 1 if true, 0 if false)
  493.         less than                a<b
  494.         greater than             a>b
  495.         less than or equal to    a<=b
  496.         greater than or equal to a>=b
  497.         equal to                 a=b
  498.         not equal to             a<>b
  499.         and                      a and b    or    and(a,b)
  500.         or                       a or b     or    or(a,b)
  501.         exclusive or             a xor b    or    xor(a,b)
  502.    In numeric comparisons, non-real values cannot  be compared except in the
  503.    case of "<>" when a  real and a non-real are always considered to be  not
  504.    equal.   In  boolean comparisons,  non-real values are  considered false.
  505.    This  leads to  the interesting  fact that  "sqrt(-1)>0" and "sqrt(-1)<0"
  506.    are  both considered  false, but  "not(sqrt(-1)>0)"  and "not(sqrt(-1)<0"
  507.    are both considered true.
  508.  
  509.  
  510.                                                           Plotting Programs
  511.  
  512.  
  513.  
  514.                                                                      Page 9
  515.  
  516.    Stack Functions: (available in RPN mode only)
  517.         drop bottom element           drop
  518.         duplicate bottom element      dup
  519.         swap bottom two elements      swap
  520.         recall stack element n        n rcl
  521.         store in stack element n      n sto
  522.         roll bottom n elements        n roll
  523.           n must be a number.
  524.           If n is positive the stack rolls down, a negative n rolls up
  525.  
  526.    Functions may be entered in  either Algebraic or RPN  notation.  Although
  527.    the Algebraic mode  is recommended  for general  use, RPN  mode has  been
  528.    provided  for  compatibility  with RPN  calculators.   Also,  complicated
  529.    equations  can  often  be written  more  easily  in  RPN  notation.    In
  530.    Algebraic mode, all standard rules of order of operation are obeyed.
  531.  
  532.    Algebraic Order of Operations:
  533.    highest   parentheses ()
  534.              functions
  535.              ^
  536.              *  /  mod
  537.              +  -
  538.              =  <>
  539.              <  <=  >  >=
  540.              and
  541.              xor
  542.              or
  543.  
  544.  
  545.    Examples:
  546.    Algebraic:     a+b*sin(c*(t-d))
  547.    RPN:           a b c t d - * sin * +
  548.  
  549.    Algebraic      (2x-1)(3x^2.5+2)  (note: the '*' is optional)
  550.    RPN            2 x * 1 - 3 x 2.5 ^ * 2 + *
  551.  
  552.    Algebraic:     -1^2   (note: ^ is executed first. The result is -1)
  553.    RPN:           1 2 ^ neg
  554.  
  555.    Algebraic:     (-1)^2   (note: - is executed first. The result is +1)
  556.    RPN:           -1 2 ^     or     1 neg 2 ^
  557.  
  558.    Algebraic:     -(1-3)^2  (result is -4)
  559.    RPN:           1 3 - 2 ^ neg
  560.  
  561.    Algebraic:     2(3(4+sin(.5)))^6  (result is 11778539.8142)
  562.    RPN:           2 3 4 .5 sin + * 6 ^ *
  563.  
  564.    Algebraic:     max(a,b)
  565.    RPN:           a b max
  566.  
  567.    Algebraic:     if(x>-2 and x<=2, 3x+2, abs(x))
  568.    RPN:           x -2 > x 2 <= and 3 x * 2 + x abs if
  569.  
  570.  
  571.  
  572.  
  573.  
  574.                                                           Plotting Programs
  575.  
  576.  
  577.  
  578.                                                                     Page 10
  579.  
  580.    The  following  is  a  list of  options  used  by  each of  the  plotting
  581.    programs.  The  Function Plotter contains  most of the  options found  in
  582.    the rest of the programs.
  583.  
  584.                        Two Dimensional Function Plotter
  585.  
  586.     <F2> Function:
  587.    ( ) RPN notation         On: RPN, Off: Algebraic
  588.  
  589.    f(x) =                   The function to be entered.
  590.                             Example: sin(2x)
  591.  
  592.    
  593.     <F3> Plot Type:
  594.    (1) Cartesian            Normal  Vertical  vs  Horizontal Axis.   1  or 2
  595.                             functions may be plotted at once.
  596.  
  597.    ( ) Polar                Polar Coordinate  System (in  radians).  1  or 2
  598.                             polar functions may be plotted at once.
  599.  
  600.    ( ) Parametric           Cartesian  Coordinate System  with both vertical
  601.                             and  horizontal  variables  are  expressed as  a
  602.                             function of yet another variable.  
  603.                             Example: x(t) = sin(t), y(t) = sq(t)
  604.  
  605.    
  606.     <F4> Plotting Style:
  607.    steps = 160              The number  of increments to use in plotting the
  608.                             function.
  609.  
  610.    ( ) Show Axis            On: Draws the X and Y axis.
  611.                             Off: No axis and no grid.
  612.                             (overrides Grid option below)
  613.  
  614.    ( ) Grid                 On: Places a grid on the graph.
  615.                             Off: No grid.
  616.                             (overridden by Show Axis option above)
  617.  
  618.    (X) Overlay graph        On:  Overlays next plot on top of the previous 
  619.                             plot.
  620.                             Off: Clears the screen between plots.
  621.  
  622.    ( ) Log on x axis        On: Makes the x/y axis logarithmic.
  623.    ( ) Log on y axis        Off: Uses normal linear scale.
  624.  
  625.    
  626.     <F5> Plotting Area:
  627.    Reset Plotting Area      Restores default plotting area.
  628.  
  629.    x min = -10              Allows the  values of  the plotting  area to  be
  630.    x max = 10               entered manually.
  631.    y min = -7.5
  632.    y max = 7.5
  633.  
  634.  
  635.  
  636.  
  637.  
  638.                                                           Plotting Programs
  639.  
  640.  
  641.  
  642.                                                                     Page 11
  643.  
  644.  
  645.     <F6> Variables:
  646.    Purge Unused Variables   Deletes  all variables  not  being used  by  the
  647.                             current functions.
  648.    x =                      Numeric value of variables.
  649.    a =                      Example: x = i  (for independent variable)
  650.                                      a = 2.5
  651.     <F7> Domain:
  652.    min = -10                Allows the  region of the  graph to be different
  653.    max = 10                 than the  x min/max as declared in the "Plotting
  654.                             Area" section.
  655.  
  656.    (X) domain based on      On:  Domain changes with x  min/max changes made
  657.         x min/max           in "Plotting Area"
  658.                             Off:  Allows   domain  to   be  independent   of
  659.                             plotting area.
  660.  
  661.    
  662.     <F8> (actions)
  663.    Plot                     Plots the  graph.  Short  cut keys are: <Ctrl-P>
  664.                             or <Ctrl-Enter> or <Right Mouse Button>
  665.  
  666.    View                     Displays  the  last  plot.   Short  cut  key  is
  667.                             <Ctrl-V>
  668.  
  669.    Save                     Saves current  equations and  settings to  disk.
  670.                             Short cut key is <Ctrl-S>
  671.  
  672.    Retrieve                 Retrieves previously saved file.  Short cut  key
  673.                             is <Ctrl-R>
  674.  
  675.    Save-PCX                 Saves graph  in the  PCX format  usable by  many
  676.                             graphics programs.
  677.  
  678.    Retrieve-PCX             Retrieves a previously saved PCX file.
  679.  
  680.    Quit                     Leaves the program.
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.                                                           Plotting Programs
  703.  
  704.  
  705.  
  706.                                                                     Page 12
  707.  
  708.                             Conic Section Plotter
  709.    
  710.     <F3> Conic Section
  711.         Type:
  712.    ( ) Vertical Parabola    Selects which type of conic section to plot.
  713.    ( ) Horizontal
  714.         Parabola            Moving  from any  of the  top six  types to  the
  715.    ( ) Circle               Standard  type  will  cause   the  constants  to
  716.    ( ) Ellipse              automatically  be set  so  as to  regenerate the
  717.    ( ) Vertical Hyperbola   same  shape.   This  process is  not  reversible
  718.    ( ) Horizontal           since  the Standard  form  does  not necessarily
  719.         Hyperbola           fit any of the other types.
  720.    ( ) Standard
  721.  
  722.    
  723.     <F4> Plotting Style:
  724.    ( ) Focal Points         Displays the focal points  and asymptotes  where
  725.         & Asymptotes        appropriate on certain conic sections.
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.                                                           Plotting Programs
  767.  
  768.  
  769.  
  770.                                                                     Page 13
  771.  
  772.                               Derivative Plotter
  773.    
  774.     <F4> Plotting Style:
  775.    (X) Show Function        Determines  which  derivatives should  be shown.
  776.    (X) Show 1st             The function,  its  first  derivative,  and  its
  777.         Derivative          second   derivative   can   be   show   in   any
  778.    ( ) Show 2nd             combination.
  779.         Derivative
  780.  
  781.    
  782.     <F5> Plotting Area:
  783.    x  min = -10             The  vertical  range of  the  function and  each
  784.    x  max = 10              derivative  can  be  set  independently of  each
  785.    f  min = -4              other.   The horizontal  domain is the  same for
  786.    f  max = 4               each plot.
  787.    f' min = -4
  788.    f' max = 4
  789.    f" min = -4
  790.    f" max = 4
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.                                                           Plotting Programs
  831.  
  832.  
  833.  
  834.                                                                     Page 14
  835.  
  836.                                Relation Plotter
  837.    
  838.        <F2> Function:
  839.    0 =                      A  relation  whose  value is  to be  compared to
  840.                             zero or true/false. 
  841.                             Examples: x^2 + y + abs(x)^y
  842.                                       y < x and y > x^3 
  843.  
  844.    
  845.     <F4> Plotting Style:
  846.    Horizontal Resolution=   Determines how many pixels  to skip in  plotting
  847.    Vertical Resolution=     the relation.   Using a resolution = 1 can  take
  848.                             quite  a  long  time.    Values up  to  10  give
  849.                             acceptable results.
  850.  
  851.    
  852.     <F6> Variables:
  853.    x =                      Numeric   value  of   variables.     Since   the
  854.    y =                      relations    plotted    are    not   necessarily
  855.    a =                      functions,  both  horizontal axis  and  vertical
  856.                             axis need to be declared.
  857.                             Example: x = h  (for horizontal variable)
  858.                                      y = v  (for vertical variable)
  859.                                      a = 2.5
  860.  
  861.    
  862.    <F8> Plot                A graph is  made by using solid shading in areas
  863.                             where the  relation is  greater than zero  or is
  864.                             true; light  shading in  areas where it  is less
  865.                             than zero  or is  false; and no  shading at  all
  866.                             where the  relation is  not real.  The  value is
  867.                             equal to zero where the two shaded areas meet.
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.                                                           Plotting Programs
  895.  
  896.  
  897.  
  898.                                                                     Page 15
  899.  
  900.                              Bifurcation Plotter
  901.    
  902.     <F3> Recursion Loops:
  903.    pre-plot loops = 100     Indicates  the  number  of iterations  to "throw
  904.                             away" before the points are to be plotted.
  905.  
  906.    plot loops     = 64      Indicates the number of points to plot.
  907.  
  908.    initial value  = 0       Indicates the  initial value of the  independent
  909.                             variable.
  910.    
  911.    <F8> Plot                Plotting  with   bifurcations  is   considerably
  912.                             different   than   with  the   normal   function
  913.                             plotter.   The dependent  variable is  described
  914.                             by  a recursive  formula,  such as  z=z^2+c,  so
  915.                             that  z is  defined in  terms  of itself.    The
  916.                             dependent    variable's    initial    value   is
  917.                             determined by the "initial  value" option.   The
  918.                             right  side  of the  equation  is evaluated  and
  919.                             this  becomes  the new  value  of  the dependent
  920.                             variable.   This is  done a number  of times  as
  921.                             set by  the "pre-plot loops"  option before  any
  922.                             plotting  is  done.    Then the  values  of  the
  923.                             equation are  plotted for the  next few times as
  924.                             set by the "plot loops" option.
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.                                                           Plotting Programs
  959.  
  960.  
  961.  
  962.                                                                     Page 16
  963.  
  964.                               Data Curve Fitting
  965.    
  966.     <F2> Data:
  967.    Clear Data Points        ERASES ALL DATA POINTS!!!
  968.  
  969.    Number of Data           Indicates the  number of data points up to 1500.
  970.         Points = 0          The  number  may  be changed  after  data points
  971.                             have  been  entered.    If the  number  of  data
  972.                             points  are increased,  the (x,y)  values  (0,0)
  973.                             are added to the end of the list.
  974.  
  975.    Edit Data Points         The   editing  window  is   where  the  data  is
  976.    ┌───────────────────┐    entered.
  977.    │                   │    Editing keys:
  978.    ├─  X  ───────  Y ──┤    Enter: accepts the value currently being edited
  979.    │                   │    Left/Right  Arrow:  moves left/right  within the
  980.    │                   │         data being edited.
  981.    │                   │    Up/Down arrow: moves up/down  to the another X-Y
  982.    │                   │         pair
  983.    │                   │    Tab: moves back and forth between the  X and the
  984.    │                   │         Y data
  985.    │                   │    Home/End: move to the beginning/end of the  data
  986.    │                   │         being edited
  987.    │                   │    PageUp/PageDown:  moves  up/down by  one  window
  988.    │                   │         screen
  989.    │                   │    Ctrl-Home/End:  moves  to the  top or  bottom of
  990.    └───────────────────┘         the list
  991.                             Esc: exits the editing session
  992.  
  993.     <F3> Plot Type: 
  994.    ( ) Linear               Selects the type  of mathematical model to  use.
  995.    ( ) Exponential          When a  type is  selected,  an equation  showing
  996.    ( ) Logarithmic          the form of  the model is  shown just  below the
  997.    ( ) Power                list  of   types.    If   "Best  Fit  Curve"  is
  998.    ( ) Polynomial           selected, all  five types are tested and the one
  999.         Degree = 2          with the  highest  R²  is used.   If  "None"  is
  1000.    ( ) Best Fit Curve       selected,  the  points  are plotted  without any
  1001.    ( ) None                 best fit curve show.
  1002.  
  1003.    R² =                     R² is  the square  of the correlation.   A value
  1004.                             of 1  would mean a  perfect fit.   A value of  0
  1005.                             means no  correlation, a  result of a  line with
  1006.                             zero slope or a randomly distributed points.
  1007.  
  1008.    
  1009.     <F8>
  1010.    Save                     Stores the  data and options  in a tab delimited
  1011.    Retrieve                 ASCII file.   This format allows the data to  be
  1012.                             entered/retrieved    from    most    spreadsheet
  1013.                             programs.
  1014.  
  1015.    
  1016.     Plot Information Menu
  1017.    (X) Automatic x-y        On: The  next 10 values are set automatically by
  1018.         Values                   the program.
  1019.                             Off:  The  user  is   responsible  for  entering
  1020.                                  appropriate  values.    It  is  recommended
  1021.  
  1022.                                                           Plotting Programs
  1023.  
  1024.  
  1025.  
  1026.                                                                     Page 17
  1027.  
  1028.                                  that  the  automatic values  be  calculated
  1029.                                  and the user  then adjust these manually if
  1030.                                  desired.
  1031.  
  1032.    x min   = 0              Determines the  range of  values to  use in  the
  1033.    x max   = 7              plot of the data points.
  1034.    y min   = 0
  1035.    y max   = 8
  1036.  
  1037.    x scale = 1              Determines how  much each unit on the graph will
  1038.    y scale = 1              actually represent.
  1039.  
  1040.    x scale title:           Gives  a title  descriptive of  the  scale being
  1041.    y scale title:           used.
  1042.  
  1043.    x axis interval = 1      Indicates the  interval between  the hash  marks
  1044.    y axis interval = 0.5    on the axis.
  1045.  
  1046.    steps   = 160            Indicates  how   many  iterations   to  use   in
  1047.                             plotting  the  curve.   This  value is  not used
  1048.                             when using the linear model.
  1049.  
  1050.    ( ) Grid                 On: Uses a grid across the graph, Off: No grid.
  1051.  
  1052.    ( ) Log on x axis        On: Uses logarithmic scale.
  1053.    ( ) Log on y axis        Off: Uses linear scale.
  1054.  
  1055.    Plot Title:              Allows two  lines descriptive of  what the graph
  1056.    Plot Subtitle:           represents.
  1057.  
  1058.    x axis title:            Describes what the axis is representing.
  1059.    y axis title:            Example: mass
  1060.  
  1061.    Plot Graph               Actually plots  the data.   Short  cut keys  are
  1062.                             <Ctrl-P>   or   <Ctrl-Enter>  or   <Right  Mouse
  1063.                             Button>
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.                                                           Plotting Programs
  1087.  
  1088.  
  1089.  
  1090.                                                                     Page 18
  1091.  
  1092.                                Revision History
  1093.  
  1094.    1.0  Original Program
  1095.  
  1096.  
  1097.    1.01 Fixed garbled error messages for certain RPN stack errors.
  1098.  
  1099.  
  1100.    1.1  Changed  the   menu  program  filename  from  the  more  descriptive
  1101.         "plotmenu.exe" to  the more  rewarding "wlplot.exe."   Also  changed
  1102.         the name of the relation plotter from "last.exe" to "relat.exe."
  1103.  
  1104.         The  name   of  the  trinary   function  "ifte"  (if-then-else)  was
  1105.         shortened to "if."   The name "ifte" is still legal for  the sake of
  1106.         compatibility.
  1107.  
  1108.         Changed  the method of  error trapping  to allow  better handling of
  1109.         the if(boolean,true statement,false statement).  Now, 
  1110.                        if( x<0 , x , sqrt(x) )
  1111.         is  properly evaluated  when x<0.   Before, both the  true and false
  1112.         statements had to evaluate to a  real number in order for the result
  1113.         to be  evaluated.  Now, only  the final answer of an expression must
  1114.         evaluate to a real number.
  1115.  
  1116.         Added the unary function "isreal."
  1117.  
  1118.         Changed the names of the Bessel  functions from j0, j1,  jn, y0, y1,
  1119.         and yn to j_0, j_1, j_n, y_0, y_1, and y_n.
  1120.  
  1121.         The Relation  Plotter  was speeded  up  considerably.   It  is  also
  1122.         considerably more  accurate.  This speed and accuracy improvement is
  1123.         a consequence of having  the program automatically  reduce the pixel
  1124.         resolution value  at the borders between  two regions.   The default
  1125.         resolution was  changed  from 4  to  1/40th  the resolution  of  the
  1126.         screen.  (Thanks  goes to The  Stone Soup Group's  Fractint for  the
  1127.         "solid guessing" speed up concept.)
  1128.  
  1129.         The way  in which numeric values  are converted  into boolean values
  1130.         was changed.   Values greater than  zero are  considered true, while
  1131.         values less  than or equal to zero are false.  Also, non-real values
  1132.         are considered  false.  Previously, only  values equal  to zero were
  1133.         considered false and non-real values were not evaluated at all.  
  1134.  
  1135.         An  option to turn the axis  on or off has been added.  If Show Axis
  1136.         is  turned off,  then the  function is  graphed  on a  blank screen.
  1137.         Show Axis overrides the Grid option.
  1138.  
  1139.         Selecting "Save" now stores the current equation(s) and settings  to
  1140.         a file.   Previously,  a bit-mapped  image was  saved to disk  along
  1141.         with  some   of  the  settings.     Retrieved  files   must  now  be
  1142.         regenerated,  but they are  a tiny  fraction of  the size  of a bit-
  1143.         mapped image file.
  1144.  
  1145.    1.11 Changed maximum equation length from 80 characters to 200.
  1146.  
  1147.         Now  prevents  steps=0,  which caused  "division by  zero" problems.
  1148.         Also now correctly reports large number of steps.
  1149.  
  1150.                                                           Plotting Programs
  1151.  
  1152.  
  1153.  
  1154.                                                                     Page 19
  1155.  
  1156.         In the Conic Section program, added  the automatic conversion to the
  1157.         Standard form.
  1158.  
  1159.    1.12 Fix  a bug  in the  Conic  Section  plotter that  would occasionally
  1160.         cause the  program to  abort  when trying  to plot  a Standard  Form
  1161.         equation.
  1162.  
  1163.         First version to be distributed through Data Warp BBS (see p. 3)
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.                                                           Plotting Programs
  1215.  
  1216.  
  1217.  
  1218.                                                                     Page 20
  1219.  
  1220.  
  1221.                                   In Closing
  1222.  
  1223.    A special word of thanks  goes to my Physics and Algebra II students  who
  1224.    unknowingly  were my  beta testers.   They  are the  reason  I  put these
  1225.    programs together and made them publicly available.
  1226.  
  1227.    These programs  are intended for use in educational settings only.   As a
  1228.    teacher,  my  reward  comes  from  knowing  that  my  efforts  have  been
  1229.    fruitful.   Although  donations would  be  appreciated, the  only payment
  1230.    that I  require is that each  user send a  letter or  postcard letting me
  1231.    know  that he/she is using my program.  Teachers may send a single letter
  1232.    with the  names (or  at least the number)  of students using  the program
  1233.    each year.   This serves  no purpose other than to give  the author a pat
  1234.    on the back and make him feel as though he has contributed to mankind.
  1235.  
  1236.    If this program should prove useful  to someone outside of an educational
  1237.    setting (such as in a  job or even research), a reasonable payment of $25
  1238.    is required.   If anyone is interested in the source code, please contact
  1239.    me.
  1240.  
  1241.                   Copyright is retained by Wesley B. Loewer.
  1242.  
  1243.  
  1244.    If you are a  teacher and would like to  swap ideas on how these programs
  1245.    can  be used  in  class, or  if  you  are  in the  Houston  area and  are
  1246.    interested in an inservice, feel free to contact me.
  1247.  
  1248.    Please send any questions, suggestions, and contributions to:
  1249.  
  1250.         Wesley B. Loewer          or     Wesley B. Loewer
  1251.         78 S. Circlewood Glen            McCullough High School
  1252.         The Woodlands, TX  77381         3800 S. Panther Creek Dr.
  1253.         (713) 292-3449                   The Woodlands, TX  77381
  1254.                                          (713) 367-1025 ext. 251
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.                                                           Plotting Programs
  1279.