@database "GraphDQ.guide"
@author John E> Perry, ///
@(c) Copyright (C) 1994 John E> Perry, ///
@$VER: 0.01
@index MyIndex
@wordwrap
 
@node Main "The AmigaGuide Database to GraphDQ"
 
                              @{b}Table of Contents@{ub}
 
		  I. @{"General Information" link GenInfo}
		 II. @{"Graph Window" link GraphWin}
		III. @{"Animating" link Animating}
		 IV. @{"Tools Window" link ToolsWin}
		  V. @{"Printing" link Printing}
		 VI. @{"Palette Window" link PalWin}
		VII. @{"Equation Window" link EqWin}
	       VIII. @{"Scale Window" link ScaleWin}
		 IX. @{"Run-Time Help" link RunTimeHelp}
		  X. @{"Quitting Time" link QuittingDQ}
		 XI. @{"Troubleshooting" link Troubleshooting}
		XII. @{"Acknowledgements, etc." link Acknowledgements}
	       XIII. @{"Index" link MyIndex}
 
@endnode
 
@node Geninfo "General Information about GraphDQ"
				 General Info
 
GraphDQ is a program which graphs and demonstrates the flow of
2-dimensional differential equations.  You define two differential
equations, x' and y', in terms of x and y, then click anywhere on the graph
window, and your Amiga will generate the graph of the equation.  You can
change the scale of the graph for both x and y axes, translate the graph to
different points for further investigation, print out the graph, change the
colors of the flow to suit your tastes, and generally have a good time
exploring the fascinating world of Differential Equations.
 
	This program was developed while I was taking a class in graduate
school at Northern Arizona University in Nonlinear Differential Equations.
I needed something to check my work, and my Amiga, Sara, being such a
wonderfully intuitive machine, seemed to fit the bill.  All it would take
was a few hours' work.
	...famous last words, yes?
	So I spent the next few months developing this program for fun, and
became more and more engrossed in it, until I decided I wanted to release
it as a study aid for other students.  Hope you enjoy it!
 
	GraphDQ requires AmigaDOS 2.0 or higher and probably at least one
megabyte of RAM.  If you want to print out the graphs, you need to see the
section on @{"Printing" link Printing}.
 
			       LEGAL STUFF
NO WARRANTY OF ANY KIND IS IMPLIED OR GIVEN.  YOU USE THE SOFTWARE
INCLUDED AT YOUR OWN RISK.  IF YOU HAVE TROUBLE WITH THE SOFTWARE, FEEL
FREE TO CONTACT ME AT ONE OF THE ADDRESSES BELOW AND I WILL DO MY BEST TO
HELP YOU (because I like the program and I like you for caring :) BUT YOU
CANNOT HOLD ME RESPONSIBLE FOR ANY DAMAGE INCURRED TO YOUR COMPUTER
SYSTEM, OTHER SOFTWARE, YOUR PERSONAL RELATIONSHIPS, OR YOUR SANITY
THROUGH USE OF THIS PRODUCT.  THIS PRODUCT HAS BEEN TESTED ON AN AMIGA 500
MICROCOMPUTER WITH A GVP A530 TURBO, RUNNING UNDER AMIGADOS 2.1.  I HAVE
TESTED THIS SOFWARE AS THOROUGHLY AS I HAVE BEEN ABLE TO DO DURING SEVERAL
MONTHS' DEVELOPMENT.
 
THIS PROGRAM IS COPYRIGHT (C) 1994 JOHN E. PERRY, III.  THIS PROGRAM IS
@{i}NOT@{ui} IN THE PUBLIC DOMAIN BUT @{i}IS@{ui} FREELY DISTRIBUTABLE.  IF YOU LIKE THIS
PROGRAM AND USE IT FREQUENTLY, PLEASE SEND ME EITHER A CARD OR A SMALL
DONATION ($10 US) TO HELP DEFRAY THE COST OF FURTHER DEVELOPMENT.  THOSE
PEOPLE WHO DONATE OR SEND A CARD WILL BE NOTIFIED OF THESE ENHANCEMENTS AND
WILL BE GIVEN FREE (shipping excluded) UPGRADES.
 
I can be reached at any one of the addresses below:
		John E> Perry, ///
			TEMPORARY
		Northern Arizona University Box #6220
		Flagstaff, Arizona
		86011
			PERMANENT
		124 Archer Road
		Newport News, VA
		23606-1102
			INTERNET
		jep@nauvax.ucc.nau.edu
@endnode
 
@node GraphWin "Graphing a function"
				 Graph Window
 
The Graph Window is the centerpiece of GraphDQ.  It lies at the back of the
screen, and has a pair of axes on it.  In order to simplify the program and
keep the graph uncluttered, the axes have no labels and no marked scale
(however, that information @{i}is@{ui} only a @{"click" link ScaleWin} away).  Naturally, "up" is
positive y and "right" is positive x.
 
	You can graph the currently defined equations by clicking the mouse
buttons anywhere on the graph window.  Clicking the left mouse button moves
you forward in time; clicking the right button moves you backwards.
	The computer will graph forever unless:
		a) you hit a mouse button or press a key, or
		b) the graph runs off the screen, or
		c) it gets close enough to a previously-drawn trajectory
			to make the two trajectories indistinguishable.
When the computer has stopped graphing, it animates the flow temporarily.
(You can determine the flow colors in the @{"Palette Window" link PalWin}.)
	If you want to examine the flow, you can simply click on an
existing trajectory and the computer will animate it for you.
 
	To exit GraphDQ, either press a key while the screen pointer looks
like a cross-hair or use the @{"Quit Button" link ToolsWin}.
@endnode
 
@node ToolsWin "The Tools Window"
                                 Tools Window
 
The Tools Window sits in the front of your screen, waiting for you to do
something with it.  It provides access to the following functions:
	
		@{"Printing the graph" link Printing}
		@{"Changing the flow colors" link PalWin}
		@{"Changing the differential equations" link EqWin}
		@{"Changing the scale or origin" link ScaleWin}
		@{"Run-Time Help" link RunTimeHelp}
		@{"Quitting" link QuittingDQ}
 
If you'd like, you can see a diagram of the Tools Window by clicking on the
box below:
		@{"SHOW ME!!!" SYSTEM "SYS:Utilities/Display ToolsWindow.iff"}
@endnode
 
@node Printing "Printing a graph"
                                   Printing
 
Clicking on the @{"Printer button" SYSTEM "SYS:Utilities/Display ToolsWindow.iff"} will print the graph for you.  In order to
do this, your Amiga setup must satisfy the following requirements:
 
		a> you must have a printer capable of graphics
			output (obviously :)
		b> you need to make an assignment for TOOLS:
			which contains the "GraphicDump" command
			supplied by Commodore with the AmigaDOS
			operating system.  This is almost always
			in the SYS:Tools/ drawer, so most people
			should just have to execute the command:
				"assign TOOLS: SYS:Tools/"
 
	Once you click on the button, a few seconds will pass before
printing begins.  The screen will turn a very light color and the Tools
Window will disappear.  @{i}This is to be expected! @{ui}  When the printout is
done, the screen will return to normal.
	@{i}Do not switch screens until the printout starts!@{ui}  The delay is
due to GraphicDump, which waits ten seconds before printing.
	The standard printout has a grey field in the background.  If you
don't like the grey background and just want a black and white printout,
then disable the grey field with the "Grey Field on Print?" check-box
in the @{"Palette Window" link PalWin}.
@endnode
 
@node PalWin "Changing flow colors"
				Palette Window
 
The Palette window allows you to change the flow colors.  It is a semi-
standard window with slider gadgets to adjust the palette for the six flow
colors.  You have probably used something like this before if you've done
much with your Amiga.
	When you are done, or if you've changed your mind, you can press
either the @{"check gadget" link CheckCross} in the lower left or the @{"cross-out gadget" link CheckCross} in the
lower right.
	The default flow colors are shades of grey.  I've found that
experimenting can produce really nice results.  Being able to see the flow
is a powerful tool in the study of differential equations, so this is a
nice feature (if you don't mind my tooting my own horn :).
 
	The top row of boxes allow you to select which color you want to
change.  Notice that, when animating, the "lead" flow color is the one on
the left, the next flow color is the one next to that, and so on.
	The three slider gadgets allow you to change, from top to bottom,
the red value of the color, the green value of the color, and the blue
value of the color.  Naturally, they only affect the color in the box
currently selected (like most of the gadgets, "selected" means "looks
pressed in").
	The check box at bottom allows you to decide whether, on printing
graphs, you would like the graph to have a grey background.  I have found
this to have an interesting effect on graphs.  The default is to use the
grey field.  If you would rather have a standard black-and-white graph,
then you should disable this.  (The grey field is disabled when there is
no check in the checkbox.)
@endnode
 
@node EqWin "Changing the differential equations"
			       Equation Window
 
The Equation Window allows you to change the differential equations x' and
y'.  It presents you with two string prompts, a @{"check gadget" link CheckCross} and a
@{"cross-out gadget" link CheckCross}.
	The two string prompts are for the two different differential
equations: x' and y'.  In the equations, you may use the variables "x" or
"y", specifiy a constant number (e.g.: -2.256), or use one of the functions
defined below.
	You should note the following:
	
	a> Precedence rules operate as in standard mathematics: unary
	   operators are highest (exponents, functions like sine,
	   cosine, etc.), followed by multiplication and division,
	   followed by addition and subtraction.
	b> The interpreter does NOT have very strong error checking!
	   While it @{i}should@{ui} recover from most errors (though the graph
	   may look peculiar), it may simply stop running if you
	   make a mistake!  Be careful and you should never have
	   this problem, but you may.  If it @{i}does@{ui} happen, reset
	   your Amiga and try again.  If you are certain you are
	   having trouble with the program, reach me at one of the
	   addresses listed in @{"General Info" link GenInfo} and I will attend to
	   the matter right away.
	c> Naturally, there are the standard big four: +, -, *, /.
	   There is also the ^ function, indicating exponentiation.
	   You may also use any of the following functions:
			sin		sine
			cos		cosine
			tan		tangent
			asin		arcsine
			acos		arccosine
			atan		arctangent
			ln		natural logarithm
			log		common logarithm
			exp		exponential (e^whatever)
 
Some examples:
	x^2 + 4*x + 4
	asin (x * 2)
	3 + x^2
	-y + x * (x^2 + y^2 - 1)^2
	-4y + 2 * x * y - 8

Please note that the interpreter will not understand if you leave out the
multiplication sign, as is common in mathematics (2x, 2sinx, 2(x + y)).
You must be careful not to do this!  If the interpreter stumbles on this,
it won't halt the program, but simply confuse you because the graph will
be wrong.
 
@endnode
 
@node ScaleWin "Changing the scale and translating the origin"
				Scale Window
 
The Scale window allos you to zoom in on any point of interest in your
graph.  It contains four string gadgets which request the scale and new
origin.  It contains @{"check gadget" link CheckCross} and a
@{"cross-out gadget" link CheckCross}.
 
	The top two string gadgets request the new scale.  The "scale" is
the length of the positive axis; for example; an x scale of 10.0 means your
graph window will graph x values from -10.0 to +10.0.
	The lower two string gadgets request the new origin.  This means
the program want to know where the center of the graph window is on the x-y
plane.  The default is the origin (0.0, 0.0), just as in regular Cartesian
graphs.  You can specify any number you like.
@endnode
 
@node Animating "Animating the flow"
				Animating
 
Animating is accomplished in one of two ways.  The program always animates
the flow briefly after drawing a new trajectory.  If you don't want to
draw a new trajectory but would still like to see the flow, you can click
on an existing trajectory and GraphDQ will animate the flow.
@endnode
 
@node RunTimeHelp "Getting help while in GraphDQ"
				Run-Time Help
 
GraphDQ offers a modicum of run-time help, though nothing as comprehensive
or fancy as this guide.  This is accessed by pressing the button in the
@{"Tools Window" link ToolsWin} that looks like a question mark.

@endnode
 
@node QuittingDQ "What? leave ALREADY?"
				  Quitting
 
There are two ways to quit the program (not that you'd want to :).  The
first is to press a key while the pointer looks like a cross-hair.  The
second is to click on the quitting gadget, located in the @{"Tools Window" link ToolsWin}.
@endnode
 
@node CheckCross "Two special gadgets..."
                         The Check and Cross Gadgets
 
You will see the check and cross gadgets on several windows in this
program.  I call them this because that is what they look like: one is a
check, the other a cross.  Clicking on the check indicates that "Yes, I
like what I've done; accept the changes (if any) and let's get back to
work", while clicking on the cross indicates that "Ouch- I really don't
like this!  Cancel all changes!"
@endnode
 
@node Troubleshooting "WHAT??? !@#$! program!!!"
			       Troubleshooting
 
You should not have too much trouble with this program if you follow the
directions.  If you do and none of the suggestions below help, contact
the author at the address given in @{"General Info" link GenInfo}.
 
@{b}GraphDQ won't start.@{ub}
	GraphDQ should run on any Amiga running AmigaDOS 2.0 or higher with
at least 1Meg.  Try freeing up memory.
 
@{b}GraphDQ won't graph my equation correctly.@{ub}
	Make sure you're using standard mathematical notation as described
in the @{"Equation Window" link EqWin} section.  If it's still not working right,
contact the author (me).  Maybe, even, there's not enough memory; close
some other application and try GraphDQ again.
 
@{b}GraphDQ won't graph my equation at @{i}all@{ui} and stops responding.@{ub}
	This shouldn't happen.  <gulp!>  Make sure your equation is legal;
probably there's a typo.  In either case, contact me and tell me what
equation you're trying to graph.  Perhaps there isn't enough memory; close
some other application and try GraphDQ again.
	Another possibility is that the stack may be too small.  Increase
the stack allotted to GraphDQ in its icon.
@endnode
 
@node Acknowledgements "People and things that helped bring GraphDQ to life"
			       Acknowledgements
 
	@{b}My Lord and Savior Jesus Christ@{ub}, for having created me with
ability and willingness to work.
	@{b}Armadillo Computing@{ub}, for their Benchmark Modula-2 compiler.
	@{b}Niklaus Wirth@{ub}, for Modula-2.
	@{b}P.D. Terry@{ub}, for one of the best books on teaching one how to
program: @{i}An Introduction to Programming with Modula-2@{ui}, published by
Addison-Wesley.
	@{b}Commodore-Amiga, Inc.@{ub}, for the Amiga and AmigaGuide. Let's hope
things look up for the wonderful Amiga community!
	@{b}Dr. Lawrence Perko@{ub}, at Northern Arizona University, for the
Differential Equations class, and for his book.  I learned a great deal
from both, typos and all... :)  For those who are interested, the book is
called @{i}Differential Equations and Dynamical Systems@{ui}.  Get the 2nd
or, if available, the 3rd edition.  Springer-Verlag publishes it.
	@{b}Dr. Vanessa Job@{ub}, at Marymount University, for teaching me
to think and use my head.
	And last, but not least, @{b}my parents@{ub}, for starting it all with
a TRS-80 Color Computer.  Way back when 16K was hot stuff and 64K was what
@{i}dreams@{ui} were made of...

@endnode
 
@node MyIndex "Index to AmigaGuide's GraphDQ Database"
                                    Index
 
@{b}Equations@{ub}
	@{"examples" link EqWin}
	@{"legal" link EqWin}
@{b}Flow@{ub}
	@{"animating" link Animating}
	@{"changing colors" link PalWin}
@{b}Functions@{ub}
	@{"examples" link EqWin}
	@{"legal" link EqWin}
@{b}Gadgets@{ub}
	@{"check" link CheckCross}
	@{"cross" link CheckCross}
@{b}Graphing@{ub}
	@{"stopping" link GraphWin}
@{b}Miscellaneous@{ub}
	@{"contacting the author" link GenInfo}
	@{"disclaimer and correspondence" link GenInfo}
@{b}Printouts@{ub}
	@{"grey field, enable/disable" link PalWin}
@{b}Scale
	@{"zooming in and out" link ScaleWin}
@{b}Time@{ub}
	@{"negative motion (backwards in time)" link GraphWin}
	@{"positive motion (forwards in time)" link GraphWin}
@{b}Tools Window@{ub}
	@{"diagram" SYSTEM "SYS:Utilities/Display ToolsWindow.iff"}
@{b}Translation@{ub}
	@{"new origin" link ScaleWin}
@endnode
