Contents
Graphmatica for Windows	Version 1.50

by Keith Hertzer

CIS ID: 70711,2071

Mon 7 August 1995

Copyright © 1995 kSoft, Inc.

Help by topic

Introduction	<-- Read me first!

The Display

The Button Bar

Graphing Equations

Using the Redraw Queue

Using a printer with Graphmatica

Using Command Line Arguments

Shareware Information

Help by menu item

File Menu: file and printing operations

Edit Menu: exporting text and images

Redraw Menu: manipulating the redraw queue

View Menu: Changing the appearance of the screen

Labels Menu: Labeling the grid with text

Options Menu: Viewing and setting special options

Point Menu: Finding the coordinates of a point

Calculus Menu: Differentiating and integrating


Introduction to Graphmatica
INTRODUCTION to Graphmatica for Windows

Graphmatica is an interactive algebraic equation grapher that can be used as an aide to plotting mathematical curves. While it is designed to be extremely simple to use, its advanced features may not be readily apparent to the first-time user. Please take a moment to acquaint yourself with them:

1.	The Redraw Queue. Graphmatica remembers the last 25 equations you typed in or loaded from a file. You can save your work for use in a later session or with any text editor or Graphmatica 3.5 for DOS.

2.	Automatic functions. Graphmatica will automatically

+	determine the type of graph you are entering based on the variables used,

+	recognize an equation's domain if you include one,

+	alter the sampling rate dynamically while graphing to make sure steep graphs like y=tan x are tracked correctly,

+	adjust the x/y ratio when you reset the range or change the size of the graph window so proper aspect ratio is maintained,

+	redraw the most recently-entered equation(s) when you change the size or shape of the grid by any means, and

+	restore the grid and special options settings when you load an equation list that has them.

You don't have to do anything to use these functions, but the Options menu still gives you complete control over them.

3.	Advanced equation parser follows mathematical rules--not the computer's. You can use implied multiplication, a complete library of math functions (including trig), and even leave out those annoying parentheses in appropriate places. Forget about isolating variables before graphing! As long as there is only one instance of the dependent variable in the equation, Graphmatica will isolate it for you, and even graph relations. You also get the power of 6 styles of graphing: regular Cartesian, polar, parametric, and slope-field and initial-value approximations for up to fourth-order ODEs (and fourth-order linear systems as well), all detected automatically. Cartesian inequalities are supported as well.

4.	Easy to use controls, including the convenient Button Bar which provides one-click access to the most frequently-used commands, the status bar, which displays relevant information and help messages, and the Redraw Queue combobox, which lets you select any equation in memory to graph, delete, or edit to form a new equation.

5.	Pause and Print tables options let you see the coordinates of points on your graphs... as they are drawn. Print tables shows values at whole-number intervals so you can practice sketching curves yourself.

6.	Convenient mouse-oriented operations. You can use the mouse to select a new range or view the coordinates of a point, select the initial value for an ODE, and even find the tangent line of a curve or integrate a function without pressing a single key.

7.	Flexible graph paper. Choose between regular graph paper and paper appropriate for trig, polar, and logarithmic functions, at four levels of detail.

8.	Lots of output options. Graphmatica lets you copy equations, point tables, and graphs to the clipboard [See Edit Menu options for details], and you can choose from three levels of print quality for faster or better printouts when you print your graphs. [See Printing Pictures of your Graphs].

9.	Every automatic option is also user-settable to give you absolute control over your graphs. The Options Settings dialog not only shows you the current settings, but also acts as a master control panel to let you change any customizable option from one dialog box. And the Save Setup Info command lets you save your preferences so they are automatically restored whenever you run Graphmatica.

10.	Instructive help topics explain the basics of each type of graph...and included demo files show you examples of each form of equation. See Demo Files for a list of these files.


DEMONSTRATION FILES

Graphmatica comes equipped with the following demonstration files to show you examples of each kind of graph it can draw. Each file contains a group of related equations, and each equation has a comment attached describing the curve it generates.

Try loading each file up (with the Open List command in the File menu), manipulating the view of the equations, redrawing, and modifying some equations. I suggest clearing the screen (if not the redraw queue as well) before loading a new file so the screen doesn't become too cluttered.

DIFEQ.GR	slope field and Runge-Kutta approximations of a first-order differential equation.

GRAPHMAT.GR	draws Graphmatica's name, to demonstrate parametric equations

INEQUAL.GR	sample of several inequalities

LOGLOG.GR	sample of using logarithmic graph paper

ODE2.GR	common second-order ODE approximations for simple harmonic motion

POLAR.GR	graphs using polar coordinates

TRIG.GR 	graphs of trigonometric functions

XYDEMO.GR	Cartesian-coordinate equations, quadratic equations, relations


ELEMENTS OF THE DISPLAY

Besides the standard Windows display elements like menus, Graphmatica also includes controls that you might expect in a retail application. The bottom of the main window holds the status bar, which displays help messages from the menus, the result of the latest action completed, the status of a selected equation, and during graphing, the equation being graphed, any warning error messages (if desired), and the pause message. So as not to obstruct the graphs, any message that does not require immediate attention or input will be posted in the status bar.

Next, the Button Bar at the top of the window contains controls that allow you to perform the most common commands with one click of the mouse or a chorded keystroke (Alt+letter). In addition, the zoom buttons allow you to zoom in and out using the default scale factor, as well as select an arbitrary range with the mouse so you don't even have to type in the new coordinates.

The Redraw Queue combobox serves two functions: first to accept input of new equations (you can type in a new equation at any time as long as you aren't currently graphing one) and second to retrieve old equations from the queue. If you want to enter a new equation, just type it in and press enter or click Graph to graph it. If a previous equation is highlighted on the input line, just start typing to start from scratch or press a direction key to clear the selection and edit it. To retrieve an old equation, use the up and down arrow keys to scroll through the list one equation at a time or click on the icon to the right of the edit field to drop down the list box for mouse selection (if there are more equations in the queue than fit in the box, it will have a scrollbar so you can see them all). You can also select equations just by clicking on their graphs!

The Printout window (toggled on or off by the Print Tables menu item) shows the coordinates of selected points from the last graph(s) done with the option on. You may scroll through this list at will. Select however much of the point list you like and then select Copy from the Edit menu to copy the text of the printout to the Clipboard, so you can insert it into a document, print it, etc.

Finally, there is also the floating Variables Panel, which can be displayed from the Point menu and allows you to modify the values of parameters without editing the equation(s) manually.


THE BUTTON BAR

Along the top of the screen below the menu bar is the Button Bar. This not only gives you convenient ways to perform tasks that can be done using the menus, but also lets you do a few more things. Following is a list of the buttons and their functions (note that Zoom in and Zoom out have different meanings when you have selected a region with the mouse):

Graph	Draws an equation you typed in or redraws the currently selected equation. Equivalent to pressing Enter.

Pause	Activated only when you are drawing a graph. Clicking this button (or pressing enter or escape) pauses the current graph. When you are pausing, the Graph button becomes ABORT. Click it to quit graphing or Pause again to restart.

Clear	Clears the graphing screen. Same as selecting Clear Screen from the View menu.

Zoom in	1. If you have selected an area with the mouse, zooms in to make this region the new range. See Selecting a Range with the Mouse. (same as the Range button in versions 1.3 and earlier)

2. If no area is selected, zooms in on the current grid using the default scale factor. This is the last scale factor you entered using the Scale command. (When you start Graphmatica, the default scale factor is 2.) This allows you to do the same thing as calling up the Scale dialog box and pressing OK with one mouse click.

Zoom out	1. If you have selected an area with the mouse, center the grid on that region and zoom out by the default scale factor. See Selecting a Range with the Mouse for details.

2. If no area is selected, zooms out on the current grid using the default scale factor. Similar to the Zoom in button above.

Redraw all	Same as selecting All Graphs from the Redraw menu. Draws every graph in the queue.

Default grid	Sets the grid back to the default specified in your graphmat.ini file, or if you dont have one, the factory-set default. This is useful if you have selected a weird range that is really large or small, not centered, or not squared and you want to quickly resize the grid to reasonable proportions.

Coord cursor	Turns on the coordinate cursor, which allows you to find the numerical coordinate of any point on a graph using the mouse.

Delete eq	Same as selecting Delete Equation from the Redraw menu. Deletes the currently selected equation from the queue and the screen.

NOTE--Defunct button:

Range	Since the functionality previously provided by this button in versions 1.3 and earlier has been completely duplicated by the new interpretations of Zoom in and Zoom out when a region has been selected, the Range button has been removed to make space for other features.


GRAPHING HELP TOPICS

Graphing Equations: Basic Knowledge

These help topics apply to all types of graphs.

Entering Equations

Operator Table

Drawing Graphs

Error Messages

Graphing Equations: Advanced Topics

These topics describe advanced features available for most types of graphs.

Specifying a domain for graphs

Using Free Variables

Graphing Families of Functions

Different Graphing Techniques

Each topic describes how to draw one type of graph. Overview provides a brief description of each type with a link to the full topic.

Overview

Normal Cartesian coordinate graphing

Graphing Inequalities

Polar-coordinate Graphing

Parametric Graphing

Differential Equations

Systems of ODEs


DRAWING A GRAPH

Once you have successfully entered an equation, Graphmatica will proceed to draw it. If warning messages are on, any non-fatal errors that are encountered will be displayed in the status bar. If you want to pause the graph at any time,  just click the Pause button, or press ESC or enter on the keyboard. Graphmatica will display the message

Pause at var1=value1, var2=value2. Press ESC to abort or enter to restart...

which displays the current values of the variables in the equation. Since Graphmatica cannot start a new task while it is in the middle of drawing a graph, while you are pausing you have only two options: turn off Pause and continue graphing by Clicking the Pause button again or pressing enter, or abort the graph by clicking the ABORT button or pressing ESC. You may find that you prefer using the keyboard to clicking the pause button with the mouse, because the response time is somewhat better (i.e. graphing will actually stop sooner) when the computer doesn't have to do the 3-D pushbutton effect.

You may work on other applications while drawing or pausing a graph, but Graphmatica will not respond to anything but pause, restart, and abort requests. (It may look like you can select menu items, but they will not be executed. In fact, drawing will stop while you are in the menu, so don't waste your time trying make Graphmatica do anything else while it is graphing.) You may also move or minimize and restore the Graphmatica window. Do NOT, however, attempt to resize the window while you are graphing. Although Windows will not try to stop you, Graphmatica will ignore any attempts to resize the window as this would likely change the size or shape of the grid and render any points already plotted invalid. This will result in a grid which does not fit the size of the window (if this happens, just minimize and restore the window once graphing is completed and Graphmatica will recalculate the screen size properly).

When the graph for your equation is complete, the status bar will change from "Graphing: xxx" to "ON SCREEN: xxx" to indicate drawing is done. Also, the pause button will be dimmed and the other buttons in the button bar re-enabled. If you'd like to start all over with a completely different equation, just start typing (the last equation is automatically selected in the edit field so the text is automatically cleared once you start typing). If you'd rather modify the last equation, click the mouse or press a direction key to turn off the selection and then go right ahead; it's already stored safe and sound in the redraw queue (for more information see The Redraw Queue). Or you can modify any previously entered equation by using the drop-down listbox. (Clicking the mouse on the down arrow icon to the right of the graph prompt drops down a scrolling listbox from which you can view and select equations with the mouse.) You can also use this capability to redraw a graph that is in the queue but not presently on the screen: just select the equation you want and press enter or click the Graph button.

If you want optimum performance and you are not running any timing-sensitive applications (e.g. communications programs doing background file transfers), you can use the Hog CPU option to prevent Graphmatica from yielding the processor to other applications while it is graphing. See Hog CPU option for details.

Since you can draw as many graphs on the same grid as you want, Graphmatica does not provide for having multiple grids on screen at the same time. However, if you would prefer to look at two graphs side-by-side instead of superimposed, just run two copies of Graphmatica next to each other. (You can share data between them using the clipboard or by saving and loading equation lists.)


Operator Table
OPERATORS

Graphmatica uses an operator set almost identical to BASIC's, with several additions to make it more powerful and user-friendly. Almost all of the math functions provided in the C library are available. The supported operators, functions, and variables are as follows:

Operator	Meaning

==========	===============================

+	addition

-	subtraction

*	multiplication

/	division

^	Exponentiation

[( )]	Parentheses*

; (semicolon)	Separate halves of a parametric equation

' (single quote)	Make rest of the equation a comment

{m, n}	Specify domain**

*	parentheses may be nested to any extent, but the parser won't differentiate between ( and [.

**	m is the start of the domain and n is the end. Either end may be left open by omitting an operand.

Function	Meaning

==========	===============================

abs	absolute value

acos, asec	arc cosine (inverse cosine), arc secant

asin, acsc	arc sine,  arc cosecant

atan, acot	arc tangent, arc cotangent

cos	cosine

cosh	hyperbolic cosine

cot	cotangent (1/tan x)

csc	cosecant (1/sin x)

exp	Euler's number to the given power

int	greatest integer ([x] notation not supported)

ln, log	natural logarithm, logarithm base 10

sin	sine

sinh	hyperbolic sine

sec	secant (1/cos x)

sqrt (sqr)	square root

tan	tangent

tanh	hyperbolic tangent

Variables	Usage

================	===============================

x, y	rectangular coordinates

r, t	r and θ in polar coordinates

x, y, t	x and y as functions of t in parametric form

t, x, dx	dif-eq mode, solves first order ODE*

x, y, dy	  (alternate notation)

d2x, d3x	for higher order ODEs**

t,x,y,z,w,dxdw	systems of ODEs

t,x1x4,dx1dx4	  (alternate notation)

a, b, c	user-settable free variables

*	dx is actually dx/dt in dx/dt = f(x,t)

**	d2x is d²x/dt²

Constant	Value

==========	===============================

d	converts degrees to radians = π/180

e	Euler's number = 2.718...

pi (or p)	π = 3.14159...

Note: by default, all trig functions work in radians, not degrees. You can convert using the constant d: e.g. sin(45d) = sin (π/4)

cos (x*d) = cosine of x, in degrees (you will need to change the range of x to 0 to 360 to get the full graph)


ENTERING EQUATIONS

There are few restrictions on the form of your equations, and those are probably pretty familiar to you if you have ever worked with BASIC.

Your equation must include: *

+	exactly one dependent variable (y, x, or r)

+	exactly one equality or inequality operator (=, <, or >)

+	some sort of expression on each side of the equals sign

The rest is up to you. You can also include:

+	as many instances of the independent variable (x or t) as you like, or none.

+	special free variables a, b, and c

+	constants (decimal numbers, pi, d, and e are valid)

+	basic math operations (+, -, *, / for division, ^ for exponents). Multiplication can be implied.

+	nested parentheses to any extent

+	trigonometric, exponential, and other functions

+	a domain, which may be open or closed on both sides

+	a comment, so you can make notes to yourself or others

(* Parametric equations, because they are inherently different from most others, have different requirements which are explained in detail in Parametric Graphing.)

For an exact list of these operators, see the Operator Table.

The order of operations is the standard algebraic left to right of:

Functions

Parentheses

Exponents

Unary minus (-)

Multiplication and division

Addition and subtraction

In order to simplify your expressions, Graphmatica supports implied multiplication, as in 3x or 5(2x+3). It will handle constants followed by identifiers without a space in between, but you must separate alphabetic identifiers with a space, paren, or an arithmetic operator (except for the single special case "xy"). In addition, numbers which follow a variable or function must be separated from it by an operator or space, in order to support variables and functions with numerals in their names (currently only d2x, d3x, etc.)--x3 would have to be expressed as x*3 or x 3.

You also do not have to surround arguments to functions with parentheses in most cases. If you choose not to use them, the first term following the function name (e.g. up to the first + or - sign outside of parentheses) will be taken as the argument.

For brief or in-depth information about each of the types of graphs Graphmatica supports, read the Overview of Graphing Techniques.


GRAPHING INEQUALITIES

You can graph rectangular-coordinate inequalities by replacing the = sign with < or > for many simple functions and relations. This feature is presently only available for Cartesian graphs.

The region that solves the inequality is hatched in with the graph color. (The curve itself is not actually dotted to indicate a strict inequality, however, so < is effectively "less than or equal to".) In most cases, asymptotes are detected and a boundary added there as appropriate, so graphs like y < tan x  or xy > 1 are drawn correctly. In addition, the valid domain of the function being graphed is detected automatically, so y > log x, for instance, shades only the first and fourth quadrants.

To accommodate intersecting regions, the graphing routine alternates between \ and / hatching. Best results will be obtained when you graph no more than two inequalities on the same screen.  Not only does this make it easier to interpret the graph, but it can also prevent conflicts between graphs that cause the inequality to shade incorrectly. The graphing routine first defines a region by solid lines in the current graph color plus the edges of the screen. It then "seeds" this region in one or more places and flood-fills it. Since the flood-fill operation does not know anything about the actual curves, but rather stops as soon as it finds the boundary color, the region may shade incorrectly if another graph of the same color intersects it.

Printing more than one inequality on the same grid is not recommended. If there is any overlap between the regions, the results may not be satisfactory.

In monochrome mode, as well as printing and copying to a monochrome bitmap, every feature of the grid becomes a potential barrier to the fill routine. Thus a dramatic speedup (especially in printing and copying a bitmap) will occur if you switch the graph paper detail level to Dots or Axes only.


ERROR MESSAGES

Fatal Errors occur when either the parser of the evaluator cannot make sense of and expression you have typed in. They are presented in a popup message box and require you to edit your equation.

Warning Messages are errors encountered trying to evaluate specific point(s). By default they are not displayed but you can toggle this with the Warnings Option.


FATAL ERROR MESSAGES

A number of error messages may be encountered when graphing (apart from messages ingrained in the library functions which I cannot control). Most of them are fatal; the equation cannot be graphed and you must edit it. They will present a popup message box so you know there is a problem.

[Please note that all messages which refer to the variables 'x' or 'y' will actually be 't' or 'r' when you are dealing with a polar equation.]

"Please type an equation in the edit field (or select one from the listbox) first; then press enter or click the Graph button."

You pressed enter on the graph line without selecting or typing in an equation. You need to type in an equation or select one in the list box before you can graph.

"The parser couldn't interpret your equation because of a bad operator or mismatched parentheses. Please edit your equation and try again."

You either left out a paren somewhere, left out one or both of the operands for a binary operation or the argument for a function, or typed some other weird thing the parser and evaluator couldn't digest. Examine your equation carefully and fix whatever seems to be the problem.

"Your equation included a variable or function that Graphmatica does not support, or you mis-typed a function name. Please edit your equation and try again."

Unfortunately, the evaluator isn't set up to return what caused the error, so you'll have to look for it yourself. Check that your equation contains only valid identifiers (see the Operator Table) and that you separated each of them with an operator, space, or some other punctuation.

"The parser couldn't find one of the operands of a binary operation like '+' or the argument to a function you used. Please edit your equation."

The parser couldn't find any identifiers or expressions to use as one of the operands to a binary operation (+, -, *, etc.) or as the argument for a function, like cos(x). All of Graphmatica's functions require one argument following the function name, preferably enclosed in parentheses.

"One or both sides of the equation seems to be blank. Please check that there is an expression on both sides of the equals sign."

Make sure there is some sort of expression on each side of the equation. Obviously, an entry like y= can't produce a meaningful graph.

"No equals sign or more than one found. Press any key to edit equation."

To be a valid and graphable, your equation must include exactly one equals sign [=]. If you get this error, you either left out the = or accidentally typed two or more of them. For parametric equations, there must be an = on each side of the dividing semicolon.

"No dependent variable or more than one 'y' found. Please edit your equation."

Although Graphmatica can isolate ONE 'y' or 'x' variable and graph some relations, it cannot perform the factoring needed to isolate the a variable when both 'x' and 'y' occur more than once. It also cannot plot polar graphs as a function of r instead of t or isolate 'r' when more than one instance is found. If you can adjust the equation so it uses only one instance of the dependent variable, do so; otherwise it can't be graphed. In parametric graphing, this message may also indicate that no 'x' variable was found in the x(t) equation.

"Graphmatica only supports inequalities for single rectangular equations. Please replace the < or > with = and try again."

Inequalities cannot presently be evaluated for polar, parametric, or differential equations. You may still be able to draw the graph if you can express the inequality in rectangular form. Also, the meaning of an inequality operator is ambiguous for an equation containing the "family of functions" parameter a.

"Can't find the inverse of this function of 'y'. Please edit your equation."

You tried to graph an equation like int(y)=x for which y cannot be isolated by taking the inverse of the function. The functions which cannot be isolated are cosh, sinh, tanh, and int. If you can't adjust the equation so this error does not occur, it is not graphable.

"The domain you entered could not be parsed or did not evaluate to one or more constant values. Please edit your equation and try again."

The domain you entered either could not be parsed, or was found to contain a non-constant identifier, like x or y. Valid domains must have at least one side of the range defined and can't contain variables, although any other expression that evaluates to a constant is OK.

"Parametric equation requires that you specify domain! See Parametric Graphing in help file for details."

You typed in a parametric equation (or accidentally hit the semicolon) and neglected to include a closed domain [like {1,6}]. Because the diversity of parametric equations makes it hard to pick a default domain, you have to include one with each parametric graph. [See Parametric Graphing or Specifying a Domain for more help.]

"Not enough initial values supplied to draw graph. Make sure this ODE. includes ## IVs and try again."

Although first-order ODEs may be graphed as a slope-field without providing an initial value, second and higher order equations require that you provide initial values for t, x, dx..., up to the derivative one order less than the highest one in the equation. Make sure that you have specified the right number of valid initial values.

"Drawing flow fields is not supported when using logarithmic graph paper. Change back to linear paper to graph this ODE."

Since it would have required extra work to handle this case, and the meaning of slope on a logarithmic scale is somewhat dubious anyway, I elected not to bother. Please tell me if you have a problem with this.

"Cannot accurately draw the graph of a discontinuous function (like y=w^x, w<0)"

The correct graph of this class of functions has singularities all over the place and thus cannot be drawn accurately using the algorithms Graphmatica normally uses on smooth curves.

See also Warning Error Messages


WARNING ERROR MESSAGES

Theses messages apply only to specific point(s) for which a y-value cannot be generated. They will not appear unless you ask for them using the Warnings option and then they appear silently.

[Please note that all warning messages which refer to the variables 'x' or 'y' will actually be 't' or 'r' when you are dealing with a polar equation.]

"Overflow at x=#.##."

Some function or operation generated a number too large to fit into a 8-byte floating point variable. The point at x=#.## was not graphed. This error is not fatal, so the graphing process is continued, but if the message is repeated and no image is graphed, you may need to abort graphing and look at your equation again.

"Division by zero at x=#.##."

At x=#.## your equation included division by zero so that point was skipped. Unless you get this error repeatedly, there's no real problem.

"Can't raise a negative number to a fractional power. [x=#.##]"

Due to the possibility of getting an even root of a negative number (like -16^(1/2) which actually equals the square root of -16), the C Library pow() function refuses to process any arguments like these. This is not a fatal error, and the portion of your graph (if any) where the base is not negative or the power is not fractional should be graphed perfectly. This error also occurs when you try to take the square root of a negative number with the "sqr" function.

"Can't find the logarithm of a negative number. [x=#.##]"

The natural logarithm (ln) and base 10 logarithm (log) functions are defined only on x greater than zero.

"Inverse of abs() not defined on negative numbers. [x=#.##]"

This reminder warning occurs when you graph a curve like abs(y)=x without restricting the domain of the expression equal to abs(y) to be positive.

"Domain error: asin/acos are defined only on -1<=x<=1, acsc/asec on x < -1 or x > 1. [x=#.##]"

The arcsine (asin) and arc cosine (acos) functions are only defined between -1 and 1 (the range of the sin and cos functions). The asec and acsc functions are only defined outside this range.

See also Fatal Error Messages


Specifying a Domain
SPECIFYING THE DOMAIN

Graphmatica allows you to specify the domain of each equation independently. This allows you to draw only a particular part of a graph or change the domain without using the Range or Theta range functions to change the default domain. To specify a domain for an equation, type anywhere on the line the expression

{ m, n }

where m is the start of the domain and n is the end. If you want the domain to start at the default start, leave m out. Then, whatever you change the start of the default domain to, that will always be where the equations starts graphing. To leave the end of the domain open, leave out n. So if the range on-screen is (-10,10), specifying a domain of { ,5} will graph from -10 to 5, and one of {-4, } will go from -4 to 10.

To graph a parametric equation, you must specify a domain that is closed (i.e. one that has neither number left out). When entering a parametric equation, you also have the option of specifying the step rate for the equation by adding a third clause to the domain. ({start, stop, step by})

The domain is parsed like any other expression, so you can use all of the arithmetic operators and functions available in the rest of the equations, as well as numbers and the constants d, e, and pi. The only restriction is that you may not use a variable (including free variables--see the Operator Table for a list) in your domain, since this would yield ambiguous results.

When specifying domains for polar functions, you may find it easier to give the domain in radians as a multiple of pi (such as {-2pi, 2pi}) or in degrees (like {0, 180d}, where d is the built-in constant that converts degrees to radians).


USING FREE VARIABLES

In any equation, in addition to the pre-programmed constants such as e and pi, you can also include the free variables b and c which you can define yourself. These parameters are effectively symbolic constants that make it easier to "play around" with the exact shape of the curve without editing the equation extensively.

The values of parameters used in each equation must be specified along with that equation, but if you don't type them in explicitly, Graphmatica will take the value(s) from the Variables Panel and insert this information in the equation for you. If you want, you can type in a value manually using a format similar to the normal domain specifier, for example:

{b: 1}

{c: -1/2}

{b: -pi/4}

As usual, enclose the "domain" in curly braces. You must specify which parameter you want to set by its name (b or c) and a colon, followed by a value, which can be any expression that evaluates to a constant. You may not use other parameters either, since this could become self-referential.

The special free variable a is described in Graphing Families of Functions.

You can change the value of a free variable after you have typed in equations and Graphmatica will automatically update and redraw all of the graphs using it with the new value. See Variables Panel for details.


GRAPHING FAMILIES OF FUNCTIONS

The free variable a is fundamentally different because you can specify not just a single value, but a range of possible values that it can take. This allows you to graph families functions or level curves of a 3-D surface easily. For instance, y = a*cos(x) will graph cosine curves of varying amplitudes, and x^2+y^2 = a will draw level curves of the surface f(x,y) = x^2+y^2.

You don't even need to know the syntax described below to use this feature, since you can enter  the needed values in the Variables Panel and Graphmatica will insert them in the equation for you. If you don't specify a range for a, Graphmatica will take the current values from the Variables Panel for the start of the range, end of the range, and amount to step by. Graphmatica starts by graphing the function with a set to the start of its range, and then increments a by the step value and draws another graph until a exceeds the end of its range. (You can also specify a negative step value as long as the end of the range is less than the start.)

To type this information in on the command-line, add the domain specifier {a: start, end, step} to your equation, replacing start, end, and step with the desired values. For example, y=a*cos(x) {a: 1,6,2} will draw graphs of y=cos x, y=3cos x, and y=5 cos x.

Although the program does not put any limit on the number of curves in the "family" you can graph, be aware that this feature uses memory rapidly. In any case, the screen will likely become too cluttered to be useful if more than ten or so graphs are drawn, so try to make your step rate proportionate to the size of the range.

The other free variables b and c are described in Using Free Variables.

You can change the value of a free variable after you have typed in equations and Graphmatica will automatically update and redraw all of the graphs using it with the new value. See Variables Panel for details.


OVERVIEW OF GRAPHING TECHNIQUES

Graphmatica offers the following methods for graphing equations. Each method is detected automatically by the use of distinctive variables.

Normal Cartesian (rectangular) Graphs	Typical graphs like y=x^2 including only the variables x and y. Also includes relations like x^2 + y^2 = 36.

Inequalities   Most Cartesian equations can be graphed as inequalities as well by replacing = with < or >.

Example: y < x^2

Polar Graphs   Graphs using the polar coordinate system and the variables r and t (for theta).

Example:  r=cos t

Parametric Graphs   Graphs using the rectangular coordinate system but specified by equations of a third variable or "parameter," t. These graphs must include a domain.

Example: y = sin t ; x = cos t {0, 2p} draws a circle.

Differential Equations   Approximate numerical solutions to differential equations; use variables dx (for the differential dx/dt), x, and t, or dy, y, and x. You can draw slope fields for first-order equations, and initial value approximations for first-order up to fourth order ODEs.

Example: dx = x^2 + t plots a slope field for "dx/dt = x^2 + t."

Example: d2y + y = 0 {0,0,1} plots a sine wave, the solution to "d²y/dt² + y = 0" with initial values y=0 and dy/dx =1 at x = 0.

Systems of ODEs   Approximate numerical solutions to linear systems of differential equations, up to fourth order; use variables dx,dy,dz,dw (for the differentials dx/dt, etc.), x,y,z,w, and t, or x1...x4 and t.

Example: dx = 3t-y ; dy = y-x {0,0,1} plots the solutions x(t) and y(t) for initial values x=0 and y=1 at t=0.

Graphmatica comes with pre-defined equation lists demonstrating each of these graph types. See Demo Files for details.

While some curves can be drawn by Cartesian relations, polar coordinates, and parametric functions, each technique is better suited for some graphs than for others. For instance, a circle with radius 5 around the origin which can be produced by the equation

x^2 + y^2 = 25

can be drawn faster by the parametric equations

x = 5 cos (t) ; y = 5 sin (t)  {0, 2p}

and can be drawn faster and much more simply by the polar graph

r = 5.


NORMAL CARTESIAN EQUATIONS

Graphmatica's equation parser will automatically isolate the variable y wherever it is in the equation. It will graph some relations, like circles (x^2 + y^2 = 36) and ellipses (x^2/3 + y^2/4 = 20), as well as hyperbolas, sideways parabolas (x = y^2) and many other conic sections. (Consult a good Algebra II textbook for help on their formulas.) The only limitation for functions is that there must be a single occurrence of one of the variables y or x. Graphmatica cannot perform the factoring needed to isolate the variable y when it occurs more than once (e.g. x+cos x = y^2+3y). The relation graphing module (for graphs which may have more than one y-value for a given x value) works like this: if in isolating the y in an equation Graphmatica finds an even power of it (i.e. y^2), it makes two equations for that graph, one with the positive and one with the negative root. This method by no means covers all possible relations, but it is adequate for the most common.


Drawing Polar Graphs
INTRODUCTION TO POLAR GRAPHS

Polar coordinates are a fundamentally different approach to representing curves in two-dimensional space. The concept is pretty easy to grasp graphically, but if you have never used polar coordinates and want to understand them, you should probably read the section below.

The traditional Cartesian method relies on an x and a y coordinate to mark how far a point is from the axes in two perpendicular directions; polar coordinates plot the location of a point by one coordinate represented by the Greek letter theta which is simplified to t in Graphmatica and another called r. The t tells what direction to go in from the origin, and the r tells how far to go out in that direction to reach the point. The direction is measured in radians as an angle starting from the positive side of the x-axis and turning around counter-clockwise (like measuring the angle the hand on a clock has traveled starting at the 3 o'clock position and going backwards). There are 2pi radians in a complete circle, corresponding to 360 of the degrees you're familiar with. To put a polar coordinate into Cartesian terms in order to graph it, we use the equations: x = r cos t  and  y = r sin t.

To make a graph using polar coordinates, we let theta be the independent variable and calculate a distance to plot out from the origin as we let the angle sweep around in the positive direction. The domain for the graphing is 0 to 2pi (the first complete circle in the positive direction), but you can easily change these values using the Theta Range function in the View menu. Polar graphs can be typed in the equation combobox just like normal graphs. The only difference in what you type, and the way Graphmatica detects a polar graph, is that you must use the variables t and r instead of x and y. The restrictions are still the same: you can have one and only one instance of the dependent variable r, although it can be located almost anywhere in the equation. You can embed the r in a term like r^2 to graph functions that cannot be simplified by normal means and Graphmatica will evaluate both positive and negative roots automatically. You should watch as your graph is drawn, because often the direction it is going is almost as important as the figure it draws. (When you have a "double" equation with r^2 in it, though, note that the positive roots are drawn first and then the negative roots are drawn: theoretically they should be drawn simultaneously but this is not practically possible.)

Please note that the x and y coordinate ranges and the range for the variable theta function completely independently; in normal Cartesian graphing, theta's value is irrelevant, and in polar graphing, theta controls the domain of the graph, but the x and y ranges still control the physical screen you see. If you want to change your view of a polar graph, you use the scale or range functions just as you would normally.

See also Specifying Domains for hints on how to specify an angular domain.


Drawing Parametric Graphs
INTRODUCTION TO PARAMETRIC GRAPHS

Parametric graphing, like polar graphing, uses a different method of calculating points on the plane to come up with curves that may be difficult to compute using normal rectangular coordinates. They are unique in that the Cartesian x and y coordinates are calculated based on a third variable (the "parameter" of x and y) which is traditionally called t (not to be confused with the t used by Graphmatica to represent theta). t is allowed to increase from the start of the domain you specify to the end. At each value, the functions x(t) and y(t) are calculated to give an (x,y) coordinate which is graphed. Graphmatica then connects these points to form a smooth curve--if something you graph begins to look jagged, you probably need to adjust the fineness. (Parametric graph fineness is linked to the same fineness control as Cartesian and polar graphing, and should be decent at the default fineness value, but if you need to, you can increase or decrease this value. Be aware that this will affect the fineness of non-parametric graphs as well. See Adjusting the Fineness for details.)

To enter a parametric graph, you need to remember four basic parts: the x(t) and y(t) functions, the semicolon between them (this is how Graphmatica knows it's a parametric graph), and the domain for t.

semicolon

 x-function 	|      y-function	domain

        |      	|           |	|

  x = 2t 	;  y = 2t^2 {-10, 10}

Although as in all other Graphmatica equations you don't need to solve for x and y (i.e. t = 5x would be OK), only one x and one y can appear in the whole equation, and "double" equations like x^2 = t where Graphmatica would normally solve for both the positive and negative roots are not supported (you can enter them but only the positive root will be found). You can type the x and y equations in either order, as long as they are separated by a semicolon, and the domain will be recognized anywhere on the line. You must specify a domain for each parametric equation! The variety of curves that can be drawn with parametric equations is great and makes choosing an appropriate default domain impossible. Some curves (like those including the circular functions sine and cosine) tend to work best over a {0,2pi} domain, like polar graphs. Others will match up better with the default domain of the normal graphs, the size of the viewing area. Some have a very compact domain, between say 0 and 1, where they will appear on the screen. If you over- or under-estimate the domain, you can always abort the graph and edit your equation.


Graphing Differential Equations
DIFFERENTIAL EQUATIONS

Graphmatica also provides the ability to approximate the solutions of up to fourth-order ordinary differential equations. [I will not provide background material on this function because if you need to use it, you probably know more about differential equations than I do.] To let the parser know you want to graph a differential equation, you must include the differential dx (which actually represents dx/dt) as one of your variables. If you specify an equation as

dx = f(x,t)

where f(x,t) is some combination of the variables x and t (such as x^3 + t or t * x ) and do not include the domain operator { , }, the program will draw a slope field for dx/dt = f(x,t), with t as the horizontal axis and x the vertical.

If you do include a "domain" {m, n} , however, it will not be interpreted as a domain but will instead indicate that you want to graph a specific solution to the initial-value problem x(m)=n by Runge-Kutta approximation.

Graphmatica will also solve second, third, and fourth order initial-value problems using a Runge-Kutta method for linear systems. To specify a second or higher order derivative, use the variables d2x, d3x, or d4x. Remember that for an nth order equation, you must also specify n+1 initial values. You can type these into the equation using the "domain" notation described above; the order of values is t, x, dx, d2x, d3x. Thus d2x + x=0 {0,0,1} graphs a sine curve as the solution to d²x/dt² + x = 0 for x = 0 and dx/dt = 1 at t=0.

Note: You can also use the notation dy = f(y,x) if you prefer; both sets of variables are automatically recognized as differential equations.

You can also choose the initial value point and first derivative using the mouse. See Setting the initial value... for details.

The algorithm used to compute the approximation is the 4th order Runge-Kutta routine with adaptive step size documented in chapter 15 of Numerical Recipes in C.


SYSTEMS OF DIFFERENTIAL EQUATIONS

Graphmatica can also approximate the solutions of up to fourth-order systems of ordinary differential equations. [Refer to your local textbook for more background information.] You can pose your system in either of two sets of variables: { t, x, dx, y, dy, z, dz, w, dw} or { t, x1, dx1, x2, dx2, x3, dx3, x4, dx4 }. In each case, t is the independent variable, and the variables dX are the derivatives dX/dt. You specify the complete system in a manner similar to parametric equations, namely (for a fourth-order system):

dx=f1(x,y,z,w,t); dy=f2(..); dz=f3(..); dw=f4(..) {t0,x0,y0,z0,w0}

where f1...f4 are some functions of the variables x,y,z,w, and t, and x0...w0 are the initial values of the system at t0. (You need not isolate the differentials on the left of the equals sign, but you can only use one per equation.) Separate equations with semi-colons, and enclose the initial values in curly braces.

If you want to graph a third- or second-order system, just leave out the equations for dw, or for dz and dw, and use the appropriate number of initial values instead.

Note that to simplify the process of parsing the system and associating each equation in the system with a graph, the order of equations dx, dy,dz,dw (or dx1, dx2, dx3, dx4) is required, and the program will not graph a system whose equations are listed in the wrong order.

The values for each curve in the system are calculated simultaneously, but only the curve for x(t) is drawn as it is calculated; the others are displayed as soon as calculation is finished. Each curve plots in a different color, which corresponds to the color of its equation in the system when it is listed in the status bar.

You can also choose the initial value points using the mouse. See Setting the initial value... for details.


COMMAND LINE ARGUMENTS

Specifying the name of a valid equation list file (with or without the ".GR" extension) loads that file upon startup. Unless autoredraw=off is specified in the [options] section of the file, the graphs are drawn as soon as the grid is drawn. You can abort the whole redraw by aborting one of the graphs.

You can provide any number of files for loading; the only restriction is that if they contain a total of more than 25 equations, some of the first equations loaded will not be stored. Also the graph title and options will be set to those found in the last file specified, and any other file's settings may be forgotten.

If you associate the .GR extension with Graphmatica (using the File Manager Associate command or by adding a line to you win.ini file), you can load a file by double-clicking on it in the File Manager.


Sharware Screen
SHAREWARE

Feel free to distribute copies of Graphmatica to your friends and upload it to bulletin board systems as long as 1) you charge no fees for its use or distribution and 2) you do not modify the program or documentation files in any way. Shareware vendors may distribute the program with the additional restrictions that 1) you charge less than $5 per diskette, for materials and handling only, and 2) you contact me to be sure you have the current version first.

You have license to use this program as you see fit but it is to be taken as is with no warranties, express or implied.  I know of a few minor bugs, but nothing serious that could cause loss of data (although with Windows a General Protection Fault is always a risk). Please tell me about any bugs you may find so that I can correct them for the next release.

If, after using Graphmatica, you find that it is easy, helpful, and convenient to use, please support the release of future versions by printing and filling out the registration form included (either REGISTER.WRI [Windows Write] or REGISTER.TXT [ASCII text]) and sending your contribution (payable to Keith Hertzer, in U.S. funds) to the address below:

kSoft, Inc.

345 Montecillo Dr.

Walnut Creek, CA 94595-2613

If you send $25 or more, you will be registered to receive a diskette with the next versions of Graphmatica for Windows and DOS when they become available. For releases after that, you will be informed that a new version is available and how you can obtain it.

Site licenses are also available at a substantial discount for users of multiple copies; ask me for details if you are interested. Government and school purchase orders are acceptable for site licenses.

Graphmatica support is available via CompuServe®. New releases are uploaded to the Math and Science forum ("GO SCIENCE"). You may also register the program using CompuServe's Shareware Database.("GO SWREG" and specify #112.) On the Internet, look for the latest version in the Software/msdos/graphing/grmat directory of archives.math.utk.edu using FTP or gopher.

CREDIT CARD ORDERS ONLY -

You can order with MC, Visa, Amex, or Discover from Public (software) Library by calling 1-800-2424-PsL or 1-713-524-6394 or by FAX to 1-713-524-6398 or by CIS Email to 71355,470. You can also mail credit card orders to PsL at P.O.Box 35705, Houston, TX 77235-5705. The item number for Graphmatica is #14133. PsL operators are available from 7:00 a.m. to 6:00 p.m. CST Monday-Thursday and 7:00 a.m. to 12:30 p.m. on Friday.

The above numbers are for credit card orders only. The author of this program cannot be reached at these numbers.

Any questions about the status of the shipment of the order, refunds, registration options, product details, technical support, volume discounts, dealer pricing, site licenses, non-credit card orders, etc., must be directed to kSoft at the address above.

To insure that you get the latest version, PsL will notify me the day of your order and I will ship the product directly to you. I am required by my contract with PsL to ship you a disk immediately regardless of whether you have the current version already. Therefore, if you order through PsL, you will receive the most current version right away, as well as an upgrade to the next major release. To help defray the additional costs, you will be charged an extra $2.50 in the U.S. and Canada ($5 outside North America) for handling.

If you have any questions or feedback, please send me e-mail. (My CIS ID is 70711,2071, but for faster service, you can use my Internet address: khertz@uclink.berkeley.edu, until May 1996.)

Even if you cannot send any money, please help me out by filling out the response form found in REGISTER.TXT and (e-)mailing it to me, especially if you have any suggestions about what I should add to the next upgrade.

WHAT'S NEXT?  There are still several weak points in this program that I intend to work on, especially color support. If you have any suggestions, please tell me; aside from the bugs I caught, users suggested nearly every change made in this version. I am resuming work on the 3-D version immediately after this release. Graphmatica for DOS will continue to be available, functionally equivalent to the Windows version but still able to run on less powerful platforms. I also may begin work on a version for the Macintosh.

If you would like a copy of the source code for Graphmatica (developed using Visual C++® for Windows version 1.5), please send the fee of $25 and a short note explaining why you would like it.


File Menu topics
File Menu

Open List	Saving and Loading Equation Lists

Save	" "

Save Setup Info	Saving Setup Information

Print	Printing Pictures of Your Graphs

Printer Setup	" "

Exit	Quit Graphmatica for Windows


PRINTING PICTURES OF YOUR GRAPHS

Graphmatica for Windows takes advantage of  Windows' universal printer support and spooled output from Print Manager which allows you to work while the printer is running. To print, select Print from the File menu, then select the print quality you want, and click the Print button.

Graphmatica offers three methods of printing, since printing graphics is always a trade-off between speed and image quality. Below is a description of each quality level.

PROOF QUALITY

When printing in Proof quality, Graphmatica creates a new graph screen in memory that has the same logical size as the one on screen, but whose physical size uses the printer's better resolution. This means you can get 300 dpi or better output on ink jet or laser printers. Plus, the quality of the printed output is independent of the size of the window you are using (the shape of the grid is determined by the on-screen window, though). Proof quality also looks better on dot-matrix printers, since it compensates for their non-square dots while the draft modes must stretch or compress an image with square pixels to look normal. Since Graphmatica must recalculate each of the graphs on-screen before sending an image to the printer, proof quality printing may take several minutes longer than draft on 386sx or slower computers.

The grid in a Proof Quality printout will not necessarily look like the one on the screen. Although it will have the same dimensions, the grid markings and the legends along the axes may be placed at smaller intervals due to the increase in resolution. Although this routine is much more sophisticated in its use of memory than the old one, 300 dpi is still a lot of data. If you don't have a lot of RAM, check to be sure you have at least 1 MB free (according to the Program Manager About box) before trying to print, or there is a slight possibility the program could hang your system. Also, without sufficient memory, Windows may not be able to render the image correctly if it is too complicated. In any case, printing will be faster and less likely to fail the more memory you have.

While you are printing in Proof Quality, Graphmatica gives you progress reports on which equation it is graphing using the status line.

Color printing: Color printing is presently supported only in proof quality. You should not have any problems getting color output, but be forewarned that it is slow and there may be discrepancies between the colors on the screen and those printed. Unfortunately I cannot guarantee good results for every printer due to my very limited ability to test it. If you cannot produce good color output in proof quality, you can print indirectly by doing the following: run Paintbrush or another paint program, switch back to Graphmatica and copy a bitmap to the clipboard using the Edit, Copy Graphs BMP menu item, switch to Paintbrush and Paste the bitmap in a new picture, and then print from Paintbrush. Tip: the larger the Graphmatica window, the better this process will turn out. You can also copy high-quality color images into your word processor using either the bitmap or Windows Metafile format. See Edit menu options for details.

DRAFT MODE

When printing in Draft mode, Graphmatica redraws the current graph screen in black-and-white in memory, and then expands that bitmap to fill the width of a page (8 inches). This does not take as much time as Quality mode, since the graphs are not recalculated, but setting up the bitmap can still take 2 minutes or more (the actual printing may take even longer, but this is entirely dependent on your printer). The trade-off in quality is that the smaller your grid on-screen is, the more it will have to be expanded to fill the page and the lower its resolution will be.

SUPER DRAFT MODE

This is the fastest way to print: Graphmatica does not manipulate the image you see on the screen at all except to adjust the aspect ratio on printers that do not have square pixels. Thus the printout will be faster because it is not expanded, although it will be smaller as well -- Super Draft printouts are dependent on the current size of the graph window.  This is a good way to get a quick sketch on a dot matrix printer; I do not recommend using Super Draft on high resolution devices (300 dpi or better), especially if the graph window is not maximized, unless you literally want just a thumbnail sketch. If your printer has a lower-resolution draft mode, you may want to use Printer Setup to select it prior to printing in Super Draft.

Draw graphs with wide lines

If you have trouble distinguishing between graphs and other markings on the grid on the printout, you may want to mark this checkbox.  This increases the width of the "pen" used to draw graphs from one pixel to two.  If you have selected wide lines in the Options Panel, the state of this checkbox is ignored.

CANCELING PRINTING

You can abort any print operation by pressing Escape or clicking the cancel button in the dialog box. However, the Print Manager may not close itself as it should after you abort the print operation, and repeated aborts may make the link between Graphmatica and the Print Manager unstable and prohibit printing. I am still investigating the cause of this problem, but I will fix it as soon as I can.

PRINTER SETUP

Use the Printer Setup menu item to call up the setup dialog box of the current default printer driver if you need to change the settings on your printer. If you do not have a default printer installed, or you want to change printer drivers, you can't use Printer Setup; you must use Control Panel or Print Manager.

NOTES

1.	In Proof Quality, on non-Postscript printers, inequalities may not always shade correctly if there is not enough memory to draw the whole image in one pass. (On Postscript printers, you will not be able to print at all if there isn't this much memory available.) This problem may be particularly bad in landscape mode. Unfortunately, I can't do anything about it.

2.	In Draft mode only, when Graphmatica's window takes up almost all the width of the screen, and the graph being printed has labels on the sides but the Show Labels option is not on, there will not be enough room across the screen to print in Draft mode. In this case, either turn the labels on or print using Proof Quality.

3.	Besides being a silly idea in the first place, printing in Super Draft mode on a laser printer may fail and cause an error message. If this happens, just use another print mode.


SAVING SETUP INFORMATION

You can save your preferred grid size and settings of other user options so that whenever you run Graphmatica again they will automatically be restored. You can do this at any time by selecting the Save Setup Info item in the File menu. The options will be saved in the GRAPHMAT.INI file in the current directory. If this is not where the program files are stored, Graphmatica will not be able to find it again, so if you change the directory using the load or save list commands, be sure to reset it before you save the setup (or be prepared to copy this file into the proper directory).

The setup file is just a special equation list that is loaded automatically when you start Graphmatica. It follows the exact same format as a normal equation list (described in Editing Equation Lists) except that when you save it Graphmatica leaves out the labels and the equations (the important parts of normal equation lists). If you do want to save equations and labels in it, use the normal save command (with the Save setup option checked), and just enter the filename GRAPHMAT.INI.

When Graphmatica saves your options, to simplify things it only records those options that are different from its own internal defaults. (See Default Settings for a list of these.) If  your settings are close to the defaults, your setup file will be very short.


SAVING AND LOADING EQUATION LISTS

To save the list of equations you're working on, as well as the title and y-axis labels if you've entered them, simply select Save from the File menu and enter a filename. This file will be saved in the current directory with an extension of ".GR" (for GRaphmatica) unless you specify differently. You can also use the list box to change the directory before saving. If you want to save the current grid and special options along with the file (these are then automatically re-instated when you load the file), mark the "Save setup information too" checkbox.

To reload your list of equations or load up one of the demo files provided with Graphmatica, you have more options. You can automatically load a file when you run Graphmatica by typing its name (with or without a file path or the ".GR" extension) as a command-line argument (or associate ".GR" files with Graphmatica using the File Manager. Then those equations will be loaded up (and graphed) immediately, unless the file contains options specifying AutoRedraw off. You can also load an equation list at any time by selecting Open List in the File menu. Select the file you want from the list box (directories are included at the end of the file list so you can search for files anywhere on the disk).

After you select a file to load, if the redraw queue is not empty, you must decide whether to add the new file's equations to the existing queue or replace its current contents. Check the "Clear old equations from queue" box to do so. Also, you can select whether or not you want to draw all of the equations you have just loaded immediately [the default is to do so] using the "Redraw all after load" checkbox.

The graph title and Y-axis labels (if the file had any) that were loaded will also be displayed if the Show Labels option is selected.

If the file was saved with the Save setup option on, the grid and special options settings recorded in the file will be loaded and set automatically.


Editing Equation Lists
EDITING EQUATION LISTS and GRAPHMAT.INI

Graphmatica does not really provide facilities for maintaining equation lists; although you can edit an equation, delete old ones that are no longer needed, and change the order of equations by redrawing selected graphs, determining the precise order of equations in the list is difficult since they are dynamically shuffled each time an equation is entered or redrawn to make Graphmatica more interactive. However, the equation list is just a text file whose structure is virtually identical to the win.ini file; you can create or modify one with virtually any editor. The structure goes like this:

[saved-setup]

[labels]

title = xxxx	any character string

left = xxxx

right = xxxx

[annotations]

x0 = #.##	position of label

y0 = #.##

text0 = xxxx	any character string

...

x9 = #.##	replace '0' with 1-9 for more...

y9 = #.##

text9 = xxxx

[grid]

left = #.##	any decimal number

right = #.##	or "auto" to autoscale

top = #.##

bottom = #.##

[options]

paper = polar, trig, rect, slog [#.##], or llog [#.##]

detail = none, axes, dots, or grid

autoredraw = on or off	"on" or "off"

autonum = ##	any integer 0-25

legends = on or off

hogcpu = on or off

color = 1, 2, or mono	colorscheme 1, 2, or monochrome

widelines = on or off	draw graphs with wide lines

drawdots = on or off	draw graphs with dots, not lines

autosquare = on or off

labels = on or off

tables = on or off

warnings = on or off

defscale = #.##	any decimal number

fineness = #.##

tstart = #.##

tstop = #.##

[equations]

up to 25 equations, each up to 200 characters, each on a separate line.

The [saved-setup] tag tells Graphmatica to reset all options to their defaults before loading the new options. It should be left out if you want the current options at the time of loading to be used. The [labels] section specifies the title and y-axis labels. The [grid] section gives the left, right, top and bottom coordinates of the grid. Type "auto" for any one to auto-scale that coordinate based on the other three. Type auto for both the top and bottom to auto-scale the y-axis so the top and bottom coordinates are equal and opposite.

You can omit any item or even a complete section if you don't want to change the default. Type exactly as specified above, including the brackets "[ ]"  around the section headings, and replacing the underlined portions with your own values. If you don't know or don't care what the value is for an option, just leave the line out. Don't worry about capitalization, extra spaces, or even extra blank lines. (However, each entry must be on a separate line or some may be ignored.) You can put the options and sections in any order ... the only requirement is that the [saved-setup] tag must  come first and the [equations] section must come last, if there is one. Invalid options are also ignored.

If you want to create a file with no titles or options, simply type the "[equations]" header and then type all of your equations. Each equation must be on a separate line. There is one catch, however: since Graphmatica graphs the most recently entered equation first when it redraws, when the list is loaded and graphed, the equation listed last will be graphed first. (It is certainly possible to correct this situation by graphing the equations as they come in, but then every subsequent "redraw all" command would draw the list backwards anyway.) If you load an equation list and immediately save it without changing anything, the net effect will be that the order of the equations in the file is reversed.

The GRAPHMAT.INI file, which is loaded whenever you run Graphmatica without specifying an equation list to load, uses the exact same format... when you choose the Save Setup Info command, Graphmatica simply saves the setup file as it would an equation list, except the [labels], [annotations], and [equations] sections are omitted.


EDIT MENU OPTIONS

Undo Grid Range backs out of the last change you made to the grid range using the Grid Range or Scale commands in the menu, or the Zoom in and Zoom out buttons on the Button Bar. This option is always available except when you have just started the program or loaded a file. If you select it twice, it will undo your Undo.

Copy Graphs BMP copies the current graphing screen into a bitmap and places it into the clipboard. You can then paste it into virtually any paint program and do whatever you like with the image. (If you have a color printer and the internal printing fails, you can copy a color image into your paint program and print it there.)

Copy Graphs WMF prepares a Windows metafile of the graphing screen, so you can import a scalable image into many Windows programs. This is a vector image, so it will appear natural and not jagged at any size you make it (within reason). However, the nature of metafiles prevents precise text handling; for this reason, the title labels are never copied, and the axis legends and annotations may be rendered at slightly wrong sizes or positions if you manipulate the metafile much. You may want to turn off the legends if they become a problem. Although you can scale each axis independently, for best results you should keep the aspect ratio the same.

For each of these options, a cascading menu allows you to choose between color or monochrome:

Color uses the current color scheme (the default gray scheme if in monochrome mode).

Monochrome uses only black and white, so you can insert the image into a document and print it on a normal printer.

Hint: for the best possible image quality, let Graphmatica size the bitmap or metafile for you instead of scaling it with the paint program or word processor. The copied image is will always be the same resolution as the grid shown on the screen, so if you want a large picture, maximize the window, or for a smaller size, make the window smaller.

Copy Tables copies all of the text in the Printout window to the clipboard. If the Print Tables option is not selected, this menu item is disabled.

Copy Equations copies the selected equation (or, if no equation is selected, all of the equations entered in the redraw queue) to the clipboard, from which you can paste the text into any Windows application.


Redraw Menu topics
Redraw Menu: Manipulating the Redraw Queue

Last Graph	Redraws the equation at the head of the queue, typically the last one entered.

All Graphs	Redraws all graphs in the queue that are not already on-screen.

Hide Graph	Hide the graph of the selected equation

Delete Equation	Delete the selected equation

Clear All	Clear the whole queue


USING AutoRedraw

Whenever you change the scale to look at a graph in greater detail or from farther back, or you shift the range of the axes so that the graph you just drew will be centered, the graphs on screen must be recalculated over the new range.

As its name suggests, AutoRedraw will redraw the equations on screen automatically when you change the scale or range. This is a nifty timesaving feature if you're running on a 486, since it might take you longer to select the equations to redraw than it does to draw them, but if your machine is a little slower and you don't want to wait for the graphs to be redrawn, you can abort the redraw by pressing ESC twice.

You can limit the number of equations AutoRedraw draws by reducing the number on the line

AutoRedraw On--Draw Last ___ equations

in the Options Settings dialog box. This can be anything from 1 to 25, the maximum number of graphs. If this number is greater than the number of equations in memory, all graphs on screen will be redrawn. The default is 25.

Finally, you can turn off AutoRedraw completely by selecting AutoRedraw under the Options menu.


THE REDRAW QUEUE

Every time you type in an equation, the character string you typed and the program's internal representation of that equation get stored in the redraw queue. From this queue, or list, you can call up any of the last 25 equations you typed to graph again with fewer keystrokes than retyping it. Or you can redraw all of them or the just the last one you typed with even fewer keystrokes. The equations in the queue are stored in an order that puts the most-recently-used at the beginning and the least-recently-used at the end. Hopefully, when the queue fills up, the equations that are bumped off the queue at the end will be the ones you won't miss very much.

The screen clears whenever you execute a Range or Scale command. If you execute either of these functions or clear the screen accidentally with the Clear menu option, you can redraw the last equation (if AutoRedraw hasn't already) by selecting Last Graph from the Redraw menu, or you can redraw all of the equations in the queue using the Redraw All menu option or button. Note that the redraw all function does not care which graphs were on the screen before it was cleared; it just redraws all the graphs in the redraw queue that are not currently on the screen. If you cleared the screen manually, and have not changed the size of the grid before you choose Redraw All, Graphmatica will detect which graphs have already been calculated using that grid and redraw them without recalculating their points (this is much faster than plotting the graph from scratch).

You can scroll through every equation you have entered into the redraw queue using the combo box at the top of the screen. When you select an equation using the arrow keys or mouse, Graphmatica displays its current status (on or off screen) and the text of the equation in the same color the graph was drawn in at the bottom of the screen in the status bar.  Press the down arrow key or pull down the listbox with the mouse to scroll back one equation. Press the up arrow key or button to scroll back up the list if you want to. When you have found the equation you want, press enter or click on it and press enter or click the Graph button (do not modify the equation) and the graph will be redrawn. Afterwards, the equation will be displayed for editing, except now it is at the head of the queue.


SELECTING AN EQUATION

Once you have entered an equation, you can easily pull it up and manipulate it again at any time. To select an equation in the redraw queue, do one of the following:

1.	Using either the down arrow key or the mouse, highlight the equation in the redraw queue combo-box. You can also select the equation by retyping it in the edit field, but it must match exactly.

2.	If the equation's graph is currently on screen and is not completely covered by another graph, just click on the curve; the corresponding equation will automatically be selected in the listbox (This works for all graphs except slope-fields. However, you must click on the curve, even if the graph is an inequality.)


HIDING A GRAPH

Sometimes the graph screen may get a little cluttered, but you don't want to clear it and redraw most of the graphs just to get a couple of them off the screen, and you don't want to delete the offending equations completely.

In this case, just select the equation you no longer want to see and choose Hide Graph from the Redraw menu. The graph will disappear from the screen immediately, but its equation will remain in the same place in the queue so you can refer to it later.


DELETING AN EQUATION

If you enter an invalid equation that can't be graphed, Graphmatica will automatically prevent the equation from being added to the redraw queue. But sometimes, you may need to trim unwanted equations from the redraw queue (for example, before saving a list of equations).

To delete an equation, first select it, and then choose Delete Equation from the Redraw menu. If the equation is currently on screen, its graph will disappear immediately.

See also Clearing the Redraw Queue for how to clear the entire redraw queue at once.


CLEARING THE REDRAW QUEUE

To clear the entire redraw queue, simply select Clear All from the Redraw menu. All the equations in the queue will be deleted.

This command also clears the screen and the graph titles and annotations, if there are any. Except for the grid settings and special options, which are left alone, it is equivalent to starting a new session.

See also Deleting an Equation for how to remove a single equation from the queue.


Redraw Queue Help Topics
Using AutoRedraw and the Redraw Queue

The Redraw Queue

Using AutoRedraw

Selecting an Equation

Hiding a Graph

Deleting an Equation

Clearing the Whole Queue

Saving and Loading Equation Lists

Editing Equation Lists


View Menu topics
View menu: Changing the appearance of the screen

Clear Screen	Clearing the Screen

Graph Paper	Changing the Background Graph Paper

Scale	Changing the scale

Grid Range	Adjusting the Range

Theta Range	Changing the Range of Theta

Colors	Changing Color Schemes


CLEARING THE SCREEN

Since Graphmatica allows you to superimpose one graph on top of another indefinitely, after a while the grid may be a huge mess. At this point you might want to select Clear in the View menu to clear the screen. Everything will be erased and the grid will then be redrawn. Up to 25 equations you have typed are still stored and can be redrawn even after you have cleared the screen.  In fact, every graph that was on the screen prior to clearing can be recalled instantly and will not even need to be recalculated until the grid size changes.

You can also clear the screen using the Clear button on the button bar.


CHANGING THE GRAPH PAPER

Graphmatica provides several styles of background graph paper to enhance the different types of graphs it can draw. Since Graphmatica allows you to put equations of all types on the screen at once, it does not attempt to guess what kind of graph paper you prefer for each graph you enter. But you can easily switch between styles using the Graph Paper item under the View menu.

Besides the default rectangular coordinate paper, you can also select the following styles:

Polar paper 	Lined with radiating circles and straight lines at angles of +/- pi/6 and pi/3 (i.e. every 30 degrees). The traditional choice for polar and some parametric graphs. Select by marking the Polar radio button. (Note that polar and rectangular paper look the same when you set the grid detail level to none.)

Trig paper 	Rectangular grid, but x-axis is marked in multiples of pi to make it easier to work with trigonometric functions. Select by marking the Trig paper radio button.

Logarithmic	Scales one or both axes logarithmically, so that, for instance, 0.1, 1, and 10 are equally spaced. You can set the base and switch between semi-log and log-log using the Log Options button. If you are using base 10, you will see 9 lines per decade just like real graph paper if there is enough space to display them (generally when less than four decades are shown). Otherwise, the graph paper will look just like normal, with gridlines at integer powers of the base.

You can also control the level of detail of the grid on your graph paper. There are three possibilities:

None	No gridlines are drawn

Reference Dots	Show dots where the gridlines would cross

Gridlines	Dashed lines like real graph paper; this is the default

Finally, you can control the following decorative aspects of the graph paper using the check boxes in the lower-right corner of the dialog box. By default all of these options are selected. If you prefer a grid with less decoration, you can turn some of them off:

Draw Border	Check to draw a border around the grid

Draw Axes	Draw x and y axes when they are on-screen

Arrows on axes	Draw arrows in the positive direction at the end of the axes. Will not appear unless Draw Axes is checked also.

Label axes	Label the axes x and y. Will not appear unless Draw Axes is checked also.

Remember that even with Draw Axes turned off, legends may still be displayed along the invisible axes unless you turn them off independently using the Legends option.

When you change the style of graph paper, the screen is redrawn immediately. Usually, all of the graphs on it are redisplayed as well, but when you switch to or from log paper, the shapes of the graphs change also, so they must be recalculated. Thus, only the number of graphs you have specified for AutoRedraw will be redrawn automatically after changing to or from log paper.

Since the logarithm of negative numbers is not defined, when you switch to log paper Graphmatica will sometimes have to alter the range displayed. If the low end of the range is below zero, it will be reset to approximately 6-8 major separations below the high end of the range. If the high end of the range is also below zero, you will be required to modify the range yourself before proceeding.

The style of graph paper that you are currently using is recorded when you save the setup file or save an equation list with setup information included, and the appropriate graph paper is automatically displayed when you load the file again (see POLAR.GR, TRIG.GR, and DIFEQ.GR for use of this feature.)


Log Options Dialog
LOG PAPER OPTIONS

Graphmatica supports an arbitrary number of variations of logarithmic graph paper. In order to simplify the Graph Paper dialog box, these choices have been placed in a sub-dialog, Log Paper Options. To reach it, click on the Log Options button in the Graph Paper dialog box.

You can set the base for your logarithmic paper using the top part of this dialog. For convenience, base 10 and natural log can be selected using radio buttons, or you can enter an arbitrary (greater than zero, though!) value for the base in the edit field.

You can also choose between semi-log and log-log paper using the bottom half of this dialog.  (Semi-log means logarithmic along the y-axis only, the x-axis remains linear. Semi-log x-axis paper is not presently supported.)


CHANGING THE SCALE

The scale function allows you to change the scale of the graph you have on-screen while keeping the center of the display the same. The origin may move, but if, say, (2,2) is at the middle of the window, it will stay there. The scale is relative to the size of the grid that is presently on the screen. To rescale the grid, select Scale from the View menu. The Scale dialog box appears.

Enter a positive number greater than one to specify the amount to zoom (the "scale factor").  Then select the appropriate radio button to zoom in or out and press the OK button. Zooming in by a factor of 2 halves the width and height of the grid. Zooming out by a factor of two makes the grid twice as wide. (In Camcorder terminology, zooming in acts as a telephoto and zooming out as a wide-angle lens.)  Scale factors less than 1 are not allowed because they produce meaningless values. Decimals greater than 1 are valid though (e.g. a factor of 1.05 changes the dimensions of the screen just slightly).

The scale factor you enter is remembered for future reference and presented as the default the next time you scale the grid. Also, this default value is used when you press the Zoom in and Zoom out buttons on the button bar so that you do not need to specify a new scale factor. The default value upon startup is 2.


Adjusting the Range
ADJUSTING THE GRID RANGE

Graphmatica allows you to adjust the start and end of the x- and y-ranges independently, so as to create a perfect fit for whatever function you are graphing. Or, you can constrain one or more of the coordinates to produce a graph with a square aspect ratio without actually figuring out all of the values by hand.

Choose the Grid Range item from the View menu to modify the grid. To create a "custom" grid, estimate the top-, bottom-, left- and rightmost extremities of the graph, and fill in these values in the appropriate edit fields. The new grid may be somewhat expanded or compressed depending on the aspect ratio, but it will show the part of the graph you're interested in the best possible detail.

To create a "square" grid where both x and y axis have the same scale, just leave any of the four coordinates blank and mark the "Autoscale fourth coordinate" checkbox, and the fourth coordinate will automatically be scaled properly to fit the other three. If you pick the least significant coordinate to AutoScale, you can match the other three exactly, framing your graph almost as well as a custom range, but with a more natural aspect ratio.

Select the Defaults button to reset the range to the default grid saved in your graphmat.ini file (or the preset default if you havent saved your setup).

You can also easily change the range using only the mouse; see Selecting a Range with the Mouse.


Selecting the Range with the Mouse
SELECTING A RANGE WITH THE MOUSE

Graphmatica allows you to select an arbitrary new range using only the mouse. To zoom in to any part of current grid, first select the area you want to see with the mouse by holding down the left button and enlarging the selection rectangle. Then click the Zoom in button in the Button Bar (or select Range from the View menu). Graphmatica will draw the new grid and display the exact coordinates of the new range on the status line.

To zoom out around a point, click the Zoom out button after selecting the area you want to be at the center of the new grid. (The new grid that results is essentially the same as what you would get by centering the current grid around the selection, then zooming out at the default scale factor.)

The highlighting of the selection will be cleared as soon as you click Zoom in or Zoom out, click the mouse in the graph window, clear the screen, draw another graph, or make a new selection.

You don't have to worry about matching the shape of the selection to the shape of the grid perfectly; the computer will take care of it for you. Depending on how you draw the rectangle, either the top or bottom y-coordinate will be AutoScaled. If you start from the bottom and draw up, the bottom coordinate will be fixed and the top one computed automatically. If you draw downward, the top coordinate will be fixed and the bottom one AutoScaled. Move the pointer horizontally to change the size of the selection; aside from checking whether you move it up or down, Graphmatica completely disregards the vertical position of the pointer and calculates the y-axis size automatically. As you draw the selection, Graphmatica prints out the range numerically on the status line.

Note: If you want to select a grid that is not square, turn the AutoSquare option OFF, and you will be able to select any shape you please, regardless of the effect on the aspect ratio. When you zoom out using a non-square aspect ratio, the region you select is used not only to determine the new centerpoint of the grid, but also the new aspect ratio (the horizontal size remains the same before zooming out, but the vertical size is adjusted to match the aspect of the selection).


CHANGING THE COLOR SCHEME

If you prefer different colors for the graphs and grid elements than the defaults, you can change any of these color selections using the Color Scheme dialog box. Select Colors... from the View menu to bring up this dialog.

Graphmatica has four pre-selected color schemes: monochrome (black on white), and color with a gray, white, or black background. You can choose one of these by selecting the appropriate radio button along the top of the dialog box. In addition, you can create your own custom color scheme. Just select the item whose color you want to modify in the listbox on the left, and then select the color you want to use in the listbox on the right. (At this time, the color selections are limited to the default 16-color Windows palette.)  The results of your selections are displayed in the preview window on the right side of the dialog box. When you are satisfied with the new color scheme, click OK, and the graph window will be redrawn to match it.

The grid elements you can select colors for are the following:

Background - background of the graphing area

Border - border around the graphing area

X/Y Axes - lines for the x and y axes

Gridlines - dashed lines or dots (depending on the detail level selected) of the graph paper

Legends - numbers along the axes which give the coordinate of the corresponding vertical or horizontal line

Annotations - free-form text elements you can create using the Annotate... option in the Labels menu

Graph1-Graph7 - seven slots for graph colors

If you want to make your color selections permanent, make sure you choose Save Setup Info from the File menu before you quit the program (remember the grid size and other setup information will be saved at this time too). The color scheme is not saved with the setup information of a normal equation list, so you cannot lose your color setup by loading an equation list that was saved under a different color scheme.

The selected color scheme applies to the screen and color bitmap output. Black-and-white printers and monochrome bitmaps are always black-on-white. A white background is suggested (but not used automatically) for color printing, for obvious reasons. Color printing is only supported in Proof Quality mode at this time, all other printed output is monochrome regardless of which color scheme you select. You can copy either a monochrome or color bitmap at any time by selecting the appropriate option in the Edit menu. Color bitmaps are drawn using the default color scheme (gray) if you have selected the monochrome color scheme.


Labels Menu topics
Labels Menu: Labeling the grid with text

Legends	Turning Axis Legends on/off

Title	Adding a Title to the Graph

Annotate	Adding Annotations to the Graph

Show Labels	Show Labels Option


AXIS LEGENDS

By default, Graphmatica labels the hatch marks across the graph with the number of their coordinate so that you can more easily locate points or find the coordinates of a graphed point. In some cases, though, especially when doing graphs near the axes, the numbers can be confusing and you may want to turn them off. To do this, select the Legends option in the Labels menu. In the Axis Legends dialog box, select the No legends radio button.

If you find that the interval that is automatically chosen for the grid spacing is not well-suited to your task, you can set Custom spacing increments independently for the X and Y axes by filling in the two edit boxes. If you select custom spacing, you can choose between two behaviors when the grid size changes: 1) Lock the legend spacing to the values you selected, or 2) Scale the grid spacing along with the grid itself. Unfortunately, neither option will be likely to satisfy you if you change the grid spacing by a non-integer factor or by too much, so you may have to reset the spacing to more suitable increments again manually.

To go back to the default behavior, select the Automatic spacing radio button in the Axis Legends dialog.


Adding Labels to your Graph
ADDING A TITLE TO YOUR GRAPH

If you want to add a title line to your graph, or add labels to the left or right sides, select Title from the Labels menu.  You can type in a new title, or edit one you typed in previously, When you print, the title is written across the top of the graphs, and it is automatically centered. When you are graphing, unless you have selected the Show Labels option in the Labels menu, the labels are not shown on the screen.

Graphmatica can add text labels (regular printing going down instead of across) to both sides of your graph.  Like the title, these labels are automatically centered (vertically) on the graph.

Click the Clear All button to delete all three fields. If you do this by mistake, just Cancel the dialog box and the labels will not be affected.

Unless the Show Labels option is on, Graphmatica does not draw these labels immediately, since they are intended mainly to enhance printouts and no space is reserved for them on the screen.


ADDING ANNOTATIONS TO YOUR GRAPH

Graphmatica also lets you place up to ten short text labels directly on the graph surface. This allows you to attach annotations to specific points on the graph, such as intersections, zero-crossings, etc. to convey extra information to the users of your .GR files or printed graphs. Note that the annotations are attached to real-number coordinates on the graphing screen, not any specific equations. At this point, determining the text labels is up to you, although in the future there may be the option to label intersection points automatically.

To add an annotation, choose the Annotate item from the Labels menu and type in a short phrase. Press enter or click the place button to position the text. You will notice that the mouse cursor changes to an arrow dragging a block of text. Click the mouse where you would like the upper-left corner of the text to start. (Or, use the arrow keys and press enter to drop the text at the cursor position.)

You can also edit the annotations list. In the Annotate Graph dialog box, first click on the label you want to modify. To delete it, click the Delete button. To modify the text, change the text in the edit control and click Change. If you want to change the placement of the selected annotation, click the Place button to end the dialog; otherwise press the Close button.

Annotations are saved with an equation list, as are the text labels, regardless of whether you choose to save setup info with the file. Also, the setting of the Show Labels option is ignored for annotations.


Labels Always On Option
SHOW LABELS OPTION

Selecting the Show Labels option from the Labels menu or marking the "Always Draw Labels" checkbox in the Settings dialog box makes Graphmatica always leave space on the screen to display the graph labels (title and left- and right-side), as well as display them if you have entered any. When this option is on, the labels will also be copied to the clipboard along with the grid whenever you perform the Copy Graphs BMP command. (By default they are ignored except when you are printing.)

This function was called Always On in versions 1.1 and earlier.


Options Menu topics
Options menu: Viewing and setting special options

Settings	Settings Dialog Box

Fineness	Adjusting the Fineness

AutoRedraw	Using AutoRedraw

Warnings	Turning Warning Messages on/off

Print Tables	Printing Point Tables

Hog CPU	Hog CPU Option

AutoSquare	AutoSquare Feature

The default values of each option are listed in Default Settings of Options


THE DEFAULT SETTINGS

When you first run Graphmatica without a GRAPHMAT.INI file, the following settings are in effect. Using the Defaults button in the Range, Theta Range, or Settings dialog boxes resets the options to these "factory" settings.

OPTION	DEFAULT

Grid Range	Start 	(-8.0, ___*)

End	(8.0, ___*)

Graph Paper	Rectangular/Gridlines, with border, axes, arrows, and labels

Fineness	1.0

Legends	ON

Always Draw Labels	OFF

Wide Lines	OFF

Drawing Mode (Lines or Dots)	Lines

Warnings	OFF

Print tables	OFF

AutoRedraw	ON

max # of eqns to redraw (AutoNum)	25

Hog CPU	OFF

Color Scheme	gray background

AutoSquare	ON

Theta Range	0 to 6.28 (2pi)

Default Scale Factor	2.0

Title, left, and right labels, and annotations are all cleared by default.

* Y ranges vary to provide a square aspect ratio; they are by default equal and opposite.

This provides a basic rectangular grid of decent size with the origin centered, a square aspect ratio (a 1x1 square on the grid really looks square), and a good resolution graph.

VIEWING THE SETTINGS

You can quickly see the settings of the on-off options by seeing if they are checked in the menus. You can also look at almost all of the settings at once by selecting the Settings dialog box from the Options menu.


SETTINGS DIALOG BOX

The Settings dialog box in the Options menu allows you to control just about every option available in Graphmatica. Following is a description of its controls, from top to bottom:

Grid Range	displays the current range. The two coordinates are the lower-left and upper-right hand corners.

Theta Range	shows the current domain of theta.

Fineness Factor  Displays the current fineness factor; type in a new one if you like.

Checkboxes:

Draw Legends along Axes

Mark to draw numbers indicating scale along the axes. On by default.

Always Draw Labels

Mark to keep title and y-axis labels on-screen all the time.

Draw graphs with wide lines

Mark to draw graphs with double-wide lines for better visibility (slows down graphing and redrawing; not recommended on slower machines). This option has no effect when Draw graphs with dots, no lines (below) is selected.

Draw graphs with dots, no lines

Mark to draw only calculated points on graphs, not the segments connecting them. This option may speed up drawing somewhat, although visibility of graphs is reduced. Not recommended with full gridlines graph paper on. This option has no effect on inequalities; they  must be drawn with lines, or the shading will "leak out" of the proper region.

Print warning error messages

Mark to display warning error messages while graphing. Off by default.

Print point tables

Mark to show the Printout window and tables of points graphed while graphing. Off by default.

AutoRedraw On--Draw Last ___ equations.

Mark the checkbox to turn AutoRedraw on. When it is on, you can also type in the maximum number of equations you would like to redraw.

Hog CPU while graphing

Mark to "hog" the computer while graphing; increases performance at the cost of other programs that are running. Off by default.

Buttons:

OK	Accept the current changes.

Cancel	Forget the changes made in the Settings dialog box. If you changed the Grid Range or Theta Range, these changes will NOT be undone.

Change Range	Invokes the Adjust Range dialog box.

Scale Grid	Invokes the Scale Grid dialog.

Change Theta	Calls up the dialog box to adjust the range of theta.

Graph Paper	Invokes the Graph Paper dialog.

Colors	Invokes the Colors dialog.

Defaults	Set all the options to their default (as specified by Graphmatica, not your GRAPHMAT.INI file) settings. See Default settings for details. To reset the Grid Range and Theta Range, however, you MUST call up and use the Defaults buttons in their own dialog boxes.

Help	Brings up this help screen.


CHANGING THE RANGE OF THETA

Because the independent variable (theta) in polar coordinates is fundamentally different from the x of Cartesian coordinates, the Cartesian x/y ranges can only be used to determine the size of the screen and not the domain of the equation graphed for polar graphs. Although the default 0 to 2pi range is the typical range of theta used for most graphs that go on forever (like spirals) and some closed graphs (like circles), other graphs cannot be completely drawn in this range of theta. For instance, the figure-8-shaped r^2=64cos(2t), because it is undefined where the right half is less than zero, is missing a couple of spots unless theta's range is extended to -2pi to 2pi. To allow the greatest flexibility, Graphmatica allows theta's range to be changed independently of all other options.

To change the range, select Theta range from the View menu and enter the start and end of the range you want. For each end of the range, you can specify whether to use radians or degrees by marking the appropriate radio button. (The default is radians.) You can also specify that a number is given as a multiple of pi by marking the "x pi" box of each coordinate.

You can reset the domain to the default (0.0 to 6.28) by pressing the Defaults button.

The Theta Range dialog box can also be obtained by pressing the Change button next to the Theta Range display in the Settings dialog box.

If you would rather not change the default domain but simply change the domain for a single graph, see Specifying a Domain.


ADJUSTING THE FINENESS

The fineness factor determines how high the resolution of the graph will be, and in effect, also the amount of time it takes to complete the graph. The fineness factor of 1 is quite adequate in most circumstances, but you can still manually control the fineness to fill the need for especially sharp graphs or for extra-quick renderings. As the fineness is increased, more of the curve will be smoothed out, but remember that if you increase the fineness factor to 5, the computer will be slowed down to 1/5 its normal graphing speed under the load of all the extra calculations.

Fineness is also linked to the rate at which the angle is allowed to change in polar graphs, and both Cartesian and Polar graphs will be of comparable quality at the same fineness factor. Fineness is also linked to the step rate of parametric graphs and differential equations; because they vary so much, it is harder to insure that all parametrics and ODEs will graph well at the default fineness, but those that I have tested look fine.

When graphing differential equations (slope fields), the fineness factor controls the interval at which the hatch marks are drawn. If you use too high of a fineness value on this type of graph, you may not only get an awful mess on the screen, but also exceed the capacity of the data structure that records the points that were graphed for later redrawing. [At this point Graphmatica simply stops recording, so no harm can be done, but the graph will not redraw properly when the screen is repainted but not recalculated.]

To change the fineness factor, select Fineness from the View menu. You can either type a value in directly or use the scroll bar to select a value (the scroll bar is scaled in a logarithmic fashion so any distance to the right corresponds to the same increase in fineness as the same distance to the left of the middle). Any value greater than zero is valid; the default value is 1.0. Theoretically there are no other limits on the fineness, and you can type any value into the edit field you wish, but the scroll bar slider is limited to the reasonable range of about 0.2 to 6.  I would recommend not going below 0.25, as the image quality suffers and the graphs begin to look like modern art. Also a  factor greater than 5 can bring even a fast computer to a snail's pace.

If you increase the fineness, the graphs on screen will be redrawn at the higher resolution. If you decrease the fineness, the change will take effect the next time you draw a graph.


Turning Warning Messages On/Off
WARNING MESSAGES

By default, the error messages which do not require the equation to be retyped are suppressed, because they slow down the graphing process, cover up the equation, and are somewhat annoying when you know the graph shouldn't produce any values in some area. (Also, it saves you the effort of specifying the domain for each equation.) If something goes wrong (e.g. the graph doesn't show up on screen when it should and the reason isn't readily apparent), you can turn on the warning messages (using the Warnings function of the Options menu) and redraw it to see what the problem is. You can use the same menu option to turn the messages off later.

See Warning Messages for a complete list of warning error messages.


Hog CPU OPTION

By default, Graphmatica acts like a good little Windows application and yields the computer's resources to other applications as Windows sees fit at all times, including when it is calculating a graph. This can lead to performance degradation, especially if while graphing you do something equally power-hungry like load up and recalculate a 200k spreadsheet in Excel. Also if another application starts a time-consuming task that cannot be interrupted, Graphmatica cannot continue to draw until that application yields control back. If you want to get lean and mean, check Hog CPU in the Options menu. With Hog CPU on, every time Graphmatica draws or recalculates a graph it will keep the CPU exclusively to itself and not allow Windows to process any messages from other applications until the graph is finished.

WARNING: This option should be used with discretion. While you are drawing a graph with the Hog CPU option on, no other application can run, even while you are pausing the graph. If you are also running a timing-sensitive application like a communications program doing a background file transfer, that application will likely fail in the time it takes Graphmatica to calculate and draw a new graph (unless you have a very fast processor).


AutoSquare FEATURE

Since working in a window that can be resized means that not only the size but also the shape of the grid can change at any time, the coordinates of the grid must be managed dynamically to prevent unwanted effects on the aspect ratio (simply put, whether a square on the grid looks square or is actually "scrunched" one way or another into a rectangle). Graphmatica has a feature to handle this called AutoSquare.

Whenever you resize the window, turn the print tables option on or off, or turn the graph labels on or off, the dimensions of the grid rectangle change. To keep the grid square when it matches the logical coordinates to the physical screen, Graphmatica keeps the logical width of the grid the same and figures out how much height must be added or subtracted to maintain good aspect ratio. It then divides this height difference by two and adjusts both the top and bottom of the grid by that much. (This way, whatever point on the grid was centered stays centered.)

The state of the AutoSquare option has several important side effects as well. When you save an equation list and include setup information, Graphmatica checks the AutoSquare option. If it is OFF, the dimensions of the grid will be recorded exactly. If it is ON, at least one coordinate will be recorded as "auto" so that no matter what shape the grid is when you load the file again, it will be squared correctly. (If the top and bottom coordinates are equal and opposite, they will both be saved as "auto" so they will be regenerated that way; if they are not, only the bottom coordinate will be saved as "auto". The x-coordinates are always saved exactly.)

When you select a new range using the mouse and one of the Zoom buttons, Graphmatica also refers to AutoSquare. If it is on, the height of your selection will be modified automatically as you draw it so that square aspect ratio is maintained. If AutoSquare is off, you're on your own.

AutoSquare is ON by default. You can turn it off by selecting it in the Options menu.

When you turn AutoSquare off, the coordinates of the grid will stay the same no matter what size it is. However, this does not prevent the need to recalculate graphs before displaying them again, since to conserve memory graphs are remembered as a list of physical points, not logical coordinates. Future versions of Graphmatica may support translation of coordinates between different physical grids, making faster redraw possible (at the expense of quality), but presently it does not.

The status of the AutoSquare option does not affect automatic coordinate calculation when loading an equation list that contains a [grid] section. If AutoSquare was on when the file was saved (or it specifies "auto" for either or both y-coordinates), the grid will be squared. Otherwise it will be drawn with the exact dimensions it had when saved, regardless of x/y ratio.


Print Tables option
PRINTING POINT TABLES

This feature allows you to see a table of coordinates as the program is drawing your graph. When you select the Print Tables option, the rightmost third of the screen is devoted to the Printout window: a listbox displaying the coordinates of graphs as they are drawn. Later you can copy the contents of the Printout window to the clipboard for importing into a document, printing, etc. using the Edit Copy Tables feature. This option is available to aid the drawing of graphs by hand and provide a reference for labeling the axes if you print the graph without the legends on. Also, the results of calculating specific points using the Point Evaluate dialog box are accumulated here.

By default, the print tables option is OFF; it restricts the space available for the grid and the process does slow graphing a bit.

You can turn it on or off by selecting Print Tables in the Options menu.


Point Menu topics
Point Menu: Getting a Point's Coordinates and Setting Parameter Values

Evaluate	Numerically evaluating points on a graph

Coordinate Cursor	Using the coordinate cursor

Set Initial Value	Setting the initial value for difeq approximations

Set Domain	Using the mouse to select an equations domain

Variables Panel	Interactively modifying the values of free variables


EVALUATING POINTS ON A GRAPH

The Evaluate option in the Point menu allows you to quickly find the value of any equation you've entered at a specific point. Before choosing the Evaluate command, you must select an equation to work with by highlighting it in the redraw queue. Differential equation graphs cannot be evaluated at a point since they are not explicit functions of one variable.

If you've selected a valid equation, the Point Evaluate dialog box will appear, and the equation you are working with will be displayed on the status line. You can now type in points at which you want to find the value of the function at leisure.  For angle measurements you can use the Radians and Degrees radio buttons and the "X pi" checkbox to specify whether you want the value to be interpreted as radian or degree measure or as a multiple of pi. You can also use the d and p constants; in fact, any expression you could type in as part of an equation that evaluates to a constant is valid.

When you press enter or click the Calculate button, Graphmatica will calculate the value of the dependent variable(s) at this point and display the result. For families of functions using the parameter a, only the starting value of a will be used, since only one result is displayed. (Note: if an error occurs when evaluating at the point, a message will be displayed on the status line regardless of the state of the Warning Messages option.) Continue typing in numbers and observing the results as long as you wish, then press ESC or click the Close button to dismiss the dialog box.

If you want to see the values of multiple points at once, turn the Print Tables option on. Each result that is printed in the dialog box will also be added to the Printout window.


THE COORDINATE CURSOR

The coordinate cursor allows you to use the mouse to select any point on the graphing screen and display its coordinates. This feature is available both in the button bar and in the Point menu. To turn on the coordinate cursor, select the Coordinate Cursor option in the Point menu, click the Coord cursor button, or press Alt-U. The mouse pointer will change into crosshairs to make it easier to spot particular points and the coordinate that it is currently at will be displayed in the status bar. As you move the pointer around, the status bar will continue to display its current position.

If you want finer control of the exact cursor position, you can use the arrow keys to move one pixel at a time (holding down on a key moves progressively faster).

When you move the cursor close enough to one of the curves on-screen, it will automatically lock on to make it easier to trace the path of the curve. When this happens, the equation of the curve being traced is also displayed in the status bar. The crosshair will stick to the curve you chose, even if it intersects other graphs, as long as you move the cursor gently in the general direction of the curve. If you use the arrow keys appropriate to the slope of the curve (up/down for a steep slope or left/right for a more horizontal slope) and dont hold down the keys too long, the cursor will also stick to the curve. To release the cursor from a curve, move perpendicularly to the slope of the curve at that point, or just move quickly in any direction.

Note that you cannot access the menu or move the pointer out of the graphing screen while the coordinate cursor is active. Also, you should not switch to another application while the coordinate cursor is on. Turn the coordinate cursor off by clicking either mouse button or pressing Alt-U.

As a shortcut, you can also turn the coordinate cursor on by holding down the RIGHT mouse button while positioning the crosshairs over the point you want to inspect.  The coordinate cursor is on, exactly as described above, until you release the mouse button.


Setting the Initial Value for Dif-eqs
SETTING THE INITIAL VALUE FOR ODEs

Instead of typing in the initial value for a differential-equation approximate solution, as described in the differential equations topic, you can also select the coordinates using the mouse.

First, type in a dif-eq or select one from the equations combobox to modify. Choose the Set Initial Value item from the Point menu. The mouse cursor will change to a crosshair. Click the left mouse button to choose a point on the graph screen as the initial value (or use the arrow keys and press enter to choose a point). Graphmatica will insert the text representation of this choice into the currently selected equation, replacing any IV specification that it contained already. Now press enter in the equation editor or click the Graph button to graph the solution.

For second-order or higher ODEs, you can also specify the first derivative using the mouse. After you click on the IV point, Graphmatica displays a "rubber band" line from this point to the current mouse position until you click on a second point. The coordinates of the first point are then taken to be the t and x values for the, and dx/dt is initially set to the slope of the line between the two points. Thus on a square grid, drawing a line at a 45º angle yields a slope of 1. But, since the slope is calculated based on the logical coordinates of the line segment, if the grid is compressed  or logarithmic along one axis, this will not always be the case. To make things easier, the slope of the current line is displayed numerically in the status bar while you move the cursor.

For systems of ODEs, this function allows you to click on 2, 3, or 4 initial value points, one for each equation in the system. Since all IVs are required to be at the same coordinate for t, after selecting the first IV you are restricted to selecting points on the vertical line defined by the t-coordinate of your first click. Graphmatica marks each IV as you select it so that you will not forget how many IVs you have placed already and how many you have left.

Be aware that, like the coordinate cursor, the accuracy of this function is limited by the resolution of your display; on the default grid, the granularity may be as much as 0.05 graphing units.

The Set Initial Value menu item is only available when Graphmatica detects that an equation with one of the differential "variables" (dX) is selected.


Setting the Domain Graphically
SETTING THE DOMAIN

In addition to typing the domain for an equation by hand, for some types of equations you can also select the domain graphically using the mouse or arrow keys. First select the equation you want to add a domain to in the combobox (or type in a new one). Then choose Set Domain from the Point menu and drag out the region along the x-axis you want to plot. (Using the keyboard, use the arrow keys to move the crosshair to one end of the domain, and then hold down shift while moving to the other end.)

The corresponding textual form of the domain will be added to the equation on the edit line (or will replace the previous domain). You can now graph the new equation, which will be added to the queue (it will not replace any previous entries which differ only by domain).

You can use this feature with Cartesian rectangular equations (functions of x) and ODEs. It is not available for polar or parametric curves, since the domains for these equations do not naturally correspond to horizontal regions on the grid. If the text of the current equation is incomplete and cant be recognized as any particular type of equation, Graphmatica will let you add the domain, assuming that you are typing in a Cartesian equation.


VARIABLES PANEL

The variables panel allows you to modify the value of any free variable and update several graphs without editing a single equation.

Edit boxes

In the top ("a=") section,

from	is the value to start calculating the value of the parameter a from.

to	is the maximum value a can take (or minimum if step by is negative)

step by	is the amount to increment a by between each graph.

Uses of a are described in Graphing Families of Functions.

b =	is the value to assign to the free variable b

c =	is the value to assign to the free variable c

Uses of b and c are described in Using Free Variables.

The other lines are reminders of the values of the built-in constants.

Buttons

Update	finds all equations using the free variables you have most recently modified and makes a copy of each one using the new value(s), then graphs the new equations. This allows you to modify the value of a parameter in several equations simultaneously without editing any of them!

Help	calls up this help screen


Calculus Menu topics
Calculus Menu: Differentiating and integrating

Find Derivative	Displaying the derivative of a function

Draw Tangent	Drawing the tangent line to a curve at a point

Integrate	Performing numerical integration to find the area under a curve

Integration Options	Controlling the method and accuracy of integration


FINDING THE DERIVATIVE OF A FUNCTION

Graphmatica is able to perform symbolic differentiation on most common functions and to display the derivative of a given curve in both text and graphical formats. To differentiate a function, select it in the queue and then Choose Find Derivative from the Calculus menu. (If the function you want to use is not in the queue, you must graph it first.) The program will then manipulate its internal representation of the equation to produce its derivative, add the resulting equation to the queue, and immediately graph it.

Note that while the curve produced by this process will always be correct, the equation of the curve may not be very well simplified, especially for complex equations. Therefore, the best way to check a derivative you found by hand is to overlay its graph with what the Find Derivative function generates .

Finding the derivative is only supported for Cartesian, polar, and parametric functions. For relations such as equations containing y^2, the derivative is only found for the function with the positive root.

Also, the derivatives of equations containing the following functions cannot be found, for the given reasons:

int	not a continuous function

abs	not guaranteed to be a smooth function


DRAWING TANGENT LINES

At times you may be interested in knowing the slope of a curve at a given point. Graphmatica will provide this information both numerically and graphically about any curve on the screen with just a few clicks of the mouse.

To calculate the slope of a curve and draw the tangent line at a specific point, first select Draw Tangent from the Calculus menu. The cursor will change to the crosshairs. Use the mouse or arrow keys to move to a point on any curve on the screen, then click or press enter to select it. The program will draw the tangent line and display the point selected and the slope on the status line as well as in the Printout window if it is on. The tangent line will be displayed only until you hide or delete the equation it belongs to, clear the screen, or draw another tangent line.

Currently, you can only find the tangent line for differentiable Cartesian and polar equations (i.e. those which do not include the int() or abs() functions). At this time, there is no efficient way to produce accurate results for other curves (for parametric equations you will get a rough approximation based on the slope between the two consecutive points nearest where you clicked). Support for other equation types and saving and restoring tangent lines along with equation lists will be added to a future version of the program if enough people request it.


Integrating to Find the Area under a Curve
FINDING THE AREA UNDER A CURVE

Graphmatica can perform numerical integration to find the area under the curve for any function on the screen. Just select Integrate from the Calculus menu. The cursor will change to the crosshairs. Now position the cursor over any point on a curve on the screen to select the function to integrate and the beginning bound of integration. Then click and drag the cursor along the x axis to highlight the interval you wish to evaluate and release the mouse button. (Using the keyboard, maneuver over the initial point, then hold down shift as you use the arrow keys to select the desired region.)

The program will shade in the area that was found and display the numerical result in the status bar, as well as in the Printout window if you have it on. If you select a region under the axis, or highlight the region above the axis from right to left, you will get a negative area. The shading will be cleared as soon as you hide or delete the equation it belongs to, clear the screen, or perform another integration.

You can choose from several methods of integration, as well as specifying how many segments to divide the region into, to select more accurate or faster computation. See Integration Options for details.

Any integral shading you create will appear on the grid when you print or copy to a bitmap; however, it will not be listed with the rest of the equations. Currently, there is no provision for saving or restoring integration regions, or for showing more than one shaded region at a time. This, along with finding the area between two curves, will be implemented in a future version of the program.


INTEGRATION OPTIONS

This dialog box allows you to choose between the following methods of integration:

Trapezoidal Rule	Region is decomposed into trapezoids with the base of the trapezoid on the x axis and the slanted edge of the trapezoid approximating the curve

Simpson's Rule	Each segment of the curve is approximated by a quadratic function. Generally more accurate for smooth curves.

By default, the program chooses how many segments to use based on the amount of screen space the region covers. Alternatively, you can specify the number of segments you wish to use in the approximation in the edit box. This number must be a positive integer, and must be even if you want to use Simpsons Rule.

The integration options you select are saved in GRAPHMAT.INI when you choose Save Setup from the File menu. They are not included in normal equation list files.