!FUNCY2 - A GRAPH PLOTTER
-------------------------

This file contains information about how to use the software and the all
important licence conditions.  Please read carefully but don't be scared to
play with the software - it's easier to use than the instructions suggest (I
think).  Please also read the file 'Notes' as it contains some valuable
information.

LICENCE CONDITIONS
------------------

This shareware application is supplied "as is".  No warranty is made and I
will accept no responsibility for any loss, damage or other problems arising
from use of the software.  This includes data stored on any medium.  The
application is NOT guaranteed to be bug free.

This software can be freely distributed as long as the following conditions
are observed:

1.  No changes can be made to any of the files within the application
directory or any of its subdirectories.

2.  No charge can be made for the software except for a reasonable amount to
cover only the distribution/copying of the software ie cost of the disc, p&p
and handling charges.  If you paid over the odds for this software, let me
know.  Anyone charging excessively - eg trying to use 'wear and tear on
their disc drive' as an excuse for charging 10+ - will be investigated...

THIS APPLICATION IS SHAREWARE...
--------------------------------

You shouldn't have paid anything when you bought the software except money
to cover the costs mentioned above.  However if you are still using the
software after 21 days of first using it then you should register with me at
the address shown below.  If this is being used in a non-domestic
environment (eg a school) then I would particularly like to know.

The main benefit of registering is that I will keep you informed of further
updates to the software.  I do not fix a registration fee - it's entirely at
your discretion.  However the more I get, the more likely I am to develop
the software and the more likely I'll implement any suggestions.  See the
accompanying file 'Notes' to find out what I've done so far and how I want
to improve.

I would like to take this opportunity to point out that I do not have access
to any Programmers Reference Manuals.  Any monies received will go towards
purchasing these and if I get even more I'll treat myself to a decent
desktop editor.  If I can do this then the quality of the application should
improve 100fold and many advanced features can be implemented as I'll be
able to find out how to do them.  So as you can see any money sent will go
into software development and not into the tills of the Godolphin Arms.

Please send any communications regarding the software, any bugs found, any
information I might find useful - eg does it work on a network? - ANY
SUGGESTIONS FOR IMPROVEMENT and ANY MONEY IF YOU WANT TO REGISTER to:

Richard Blythe
37 Well Way
NEWQUAY
Cornwall
TR7 3LS

I promise to write to anyone who sends money, but be patient if during
(university) term time - partly because mail will have to be forwarded.

COPYRIGHT DETAILS
-----------------

WimpHeap routines  Ben Summers/Acorn Computing Magazine December 1993. 
Used with kind permission of Steve Turnbull, Editor of Acorn Computing.  If
you would like to use it yourself then I'm sure Europress Enterprise will be
able to furnish you with the relevant back issue.

All other code and files  Richard Blythe May 1994

MANY THANKS...
--------------

Firstly to everyone at Acorn Computing (and the Micro User before that) for
allowing me to glean various programming titbits which almost obviate the
need for PRMs (but not quite).  Thanks particularly to the Editor, Steve
Turnbull, who quickly and politely responded to my request to use the
WimpHeap routines in this application.  Thanks also Steve for returning an
unrequired sae.

To Acorn themselves for writing applications like Maestro in Basic so that I
can look at them and see how various things are done.  Also for adding the
CRUNCH command to Basic which removes all spaces except necessary ones.

To all family and friends.  Maths teachers - obviously without whom I
wouldn't have seen the need to write the application, let alone known how to
do it!



INTRODUCTION
------------

!Funcy2 is an application that allows you to plot graphs of functions of y
expressed in terms of x.  Once plotted these functions can be processed in a
number of ways: their colour and quality can be changed; you can plot
derivitives and integrals of a function and you can transform the function. 
Obviously this has many uses - for example for checking that the derivitive
or integral of a function is correct, for seeing where a maximum or minimum
value of a graph is or simply to see how a function varies with different
values of x.  A number of basic functions are provided for immediate
plotting, but you can also build up a library of functions that you may
require frequently.  Anyone who has used a graph plotting calculator should
feel at home with !Funcy2, although some of the features are much more
advanced.

NOTE
----

This manual assumes that you are familiar with the RISC OS desktop.  If not,
then consult the Welcome guide which came with your machine.  Interactive
help has not been implemented yet.

GETTING STARTED
---------------

To get a flavour of the software follow the following instructions.

1. Double click on the !Funcy2 icon to load it.

2. Click on the !Funcy2 icon on the icon bar.  A large window ('Graphs')
opens filling the whole screen.  In front of this is the list of plotted
functions (the 'Plot list') which initially is empty.

3. At the bottom of the Plot list window are three buttons: 'Preset',
'User'and 'y='.  Click on 'Preset'.

4. A new window opens - a list of functions should appear in a scrollable
window.  Click on one of them so that it becomes highlighted in light blue.

5. Make sure that the icon marked 'Reset axes' is selected (ticked).

6. Click on 'PLOT' with Select.  After a pause, the Preset functions window
should disappear and the highlighted function will appear in the Plot list. 
The plot itself appears in the Graphs window.

Now you have plotted a graph you can 'play' with it in one, or more, of the
following ways:

change the colour and quality of the plot - double click on the item in the
Plot list.

plot derivatives, integrals or transformations of the function - highlight
the item in the Plot list and click on Calculus or Transform.

change the range, axis colour and style - click menu over any of the main
!Funcy2 windows or icon bar icon and select 'Range'from the 'Windows'
submenu (or press F3)

plot a grid behind the graph - do this by accessing the appearance window
from the Windows submenu (or press F4).  You can also move the graph around
from this window.

Having done this you should have got a general feel for the software.  You
can superimpose further graphs over the one you've got by clicking on one of
the three plot buttons at the bottom of the Plot list window.  



IN DEPTH
--------

Before we look at the features of !Funcy2 in detail, it is worth looking at
some of the basic concepts behind the software.

The output in the Graphs window is dictated mainly by the data shown in the
Plot list window.  The functions plotted, their colours and quality can all
be changed from the Plot list window, or a window accessible from it.  The
range of the graphs (ie the upper and lower limits of the x and y axes) and
the overall appearance are changed through two windows: the range window and
the appearance window.  These are accessed via a Windows menu which is
invoked by clicking Menu over many of the !Funcy2 windows or by clicking
menu over the icon-bar icon.  Windows can also be opened by pressing
function keys.

A graph that has been entered into the Plot list is known as a 'plotted
function'.  Any plotted function can be made invisible.  If this is the case
it appears in the plot list in light grey rather than black.  Making a
function invisible allows you to replot it later without typing the function
in again - the only other way to stop a function being plotted is to delete
it from the list completely.  An invisible function is still refered to as a
plotted function even though it isn't actually plotted.

STANDARD CONTROLS
-----------------

There are a few controls which appear in more than one window.  Therefore it
makes sense to describe them once:

The colours of graphs and axes can be changed from their default black. 
This is done via a set of controls (labelled 'colour') which consist of two
arrows which when clicked on cycle through the 16 Wimp colours.  The current
colour is shown inbetween the two arrows.

A further set of controls dictates the quality of graph or axis.  When the
left-hand icon is clicked on the best quality is selected - that is a solid
line.  The other icons represent dotted lines with the rightmost icon
usually representing the line with the dots furthest apart.  The only
exception to this is the quality control for the grid - the rightmost icon
represents no grid at all.  The advantage of using a lower quality is that
screen updates can be faster.  See the sections headed Appearance and Speed
for more information.

THE WINDOWS SUB-MENU
--------------------

This is a feature that is accessed from many of the windows in !Funcy2. 
Sometimes it is the only menu available from a window, other times it is a
submenu.  Either way it indicates currently open windows with a tick.  If
you select a window from the menu that is closed it will be opened at the
front of the pile.  Otherwise the window will be closed.

You can also use function keys to open or close windows, however these only
work if any !Funcy2 window has a yellow title bar or one of the following
windows is open: graphs, plot list, preset functions.

The windows that can be opened or closed from this menu are:

Plot list (F1) - controls which functions are plotted and how.

Output (F2) - shows the currently visible functions is the defined range.

Axes/range (F3) - allows you to decide the extent of the range and the
appearance of the axes.

Appearance (F4) - controls the overall appearance of the graph: it's
position, the quality of plot and grid colour and quality.

Trace (F5) - gives a read-out of the mouse position in the graph in
cartesian coordinates.

Preset functions (F6) - gives access to a set of preset functions which can
be plotted setting a suitable range if required.

User functions (F7) - allows you to create your own set of functions which
can then be referred to by name.

The purpose of using a menu to open these windows is so that they can be
accessed from any part of the software.

THE ICON BAR
------------

The effect of clicking on the icon bar icon depends on which mouse button
you use:

SELECT:  opens the plot list and the graphs (output) window so that the plot
list is in front of the output which is in front of everything else.

ADJUST: has a similar effect to select except that the graphs window is
opened behind any other window that is open at the time.

MENU: opens a menu which lets you find out information about the software,
open windows (via the windows sub-menu, explained above) and quit the
application.  If you have any unsaved work on quitting you will be asked if
you really want to quit.

CREATING PLOTS
--------------

The creation of a plot is done via the three icons at the bottom of the Plot
list window.  Which icon you click depends on the type of function you want
to plot.  Click on 'User' to plot a user function - user functions will be
discussed later on.  Preset functions, like parabolas and exponential
curves, can be plotted by clicking on 'Preset'.  Finally your own function
can be plotted by clicking on 'y='.  You may enter up to 50 functions in the
plot list.

PRESET FUNCTIONS
----------------

When opened - whether by means of the windows sub-menu, a function key-press
or by clicking in the plot list window - you should see a scrollable list of
preset functions with names such as square and cuberoot.  To plot a preset
function, click on it so that it becomes highlighted and click on PLOT.

If the 'Reset axes' icon is ticked then a suitable range will be selected
for the function when it is plotted.

When you click on PLOT the preset functions window disappears and, if open,
the name of the preset function appears in the plot list.  If the graphs
window is open, the plot will be calculated and drawn.  If not, open the
graphs window to view the plot.

Note that once a preset function has been added to the plot list, it then
behaves like a 'y=' function - see next section.

'Y=' FUNCTIONS
--------------

If you want to plot a function that is different to those in the preset
functions window, click on the 'y=' icon in the plot list window.  Enter the
function you want to plot - eg 2x - into the white writeable icon, and set
up the colour and quality of plot as described above.  The default quality
is the one set up in the appearance window. (See appearance later).  You can
also decide if you want the graph to be visible or not.

Once you have done this click on OK and the plot will be added to the list
and plotted if the respective windows are open.  The Solo icon can be
clicked on instead of OK.  If you do this then the function you have just
created will be the only visible function in the graphs window - the rest
will be made invisible.

When you click on OK or Solo, the function you have entered will be checked
to see if it can be evaluated.  If you get a message 'Error in definition
with...' then the program is having difficulty with the function definition
at the point mentioned in the error.  You will also be told if brackets
don't match up.

You will be also told if you have made reference to a function which doesn't
exist - that is one you haven't defined as a user function.  This may be
because you haven't defined the user function yet.  In this case you should
click on OK - note that the graph will be made invisible as it can't be
plotted.  If you mis-typed a function name then click on the Whoops icon to
correct the function definition.

FUNCTION SYNTAX
---------------

The syntax for functions is as close to written algebra as possible.  This
means, for example, that multiplication signs can be omitted. 
Multiplication (symbol *) and division (symbol /) is done before addition
and subtraction and the power sign (^) has the highest precedence.  A
function should be followed by a parameter in brackets.  If the brackets are
missing then the parameter is taken as being everything up to the next
explicit operator.  The following examples should give you an idea as to how
the functions are evaluated.

Function as   Evaluation     Comments 
typed in                     
---------------------------------------------------------------------------

2x            2*x            Times sign inserted

2x+3          (2*x)+3        Multiplication done first

2x/3          (2*x)/3

2/3x          2/(3*x)        3x is treated as a denominator as it doesn't
                             contain an explicit operator (eg a * / + or -)

2/3x+2        (2/(3*x))+2    3x+2 is not treated as a denominator because it
                             does contain an explicit operator

sin(2x+3)     sin((2*x)+3)   2x+3 taken as parameter as it's in brackets

sin2*x        sin(2)*x       2 taken as parameter because explicit operator
                             (*) closes bracket

sin2x+3       sin(2*x)+3     2x taken as parameter as + sign closes bracket

-x^2          (-x)^2         Negative sign is unary operator here (makes x
                             negative before being squared)

0-x^2         0-(x^2)        Minus sign is binary operator here (x is
                             squared before being taken away from 0)


If in doubt, put in brackets for everything that should be evaluated
seperately.  Try taking out brackets to see if it makes any difference to
the plot.


BASIC FUNCTIONS
---------------

You can refer to any of the following BASIC functions in your definition:

ABS     Absolute value - removes the sign 

ACS     Inverse cosine

ASN     Inverse sine

ATN     Inverse tan

COS     Cosine

DEG     Converts from radians to degrees - DEG(PI)=180

EXP     Inverse log natural

INT     Integer value - removes everything after the decimal point

LOG     Log (base 10)

LN      Log natural (base e)

RAD     Converts from degrees to radians - RAD(180)=PI

RND     Random number

SGN     Returns +1 if parameter is positive, -1 if parameter is negative
        and 0 if parameter is zero

SIN     Sine

SQR     Square root

TAN     Tan

The trigonometrical functions all work in radians unless you use the RAD
function like this: SIN(RAD x).

OTHER BASIC KEYWORDS THAT CAN BE USED IN FUNCTION DEFINITIONS
-------------------------------------------------------------

NOT, AND, DIV, EOR, MOD, OR, FALSE, PI, TRUE

Of these MOD, DIV and PI are the most useful.  MOD finds the remainder after
a division whereas DIV finds the quotient.  PI is the constant 3.141592.



EDITING FUNCTIONS
-----------------

Having created a function you may want to edit it.  To do this, highlight it
in the Plot list and either double-click on it or click on edit.  This will
take you to the 'y=' window even if you used the preset or user functions
windows to create the plot.  Click on OK or Solo to complete the Edit, or
close the window if you want to cancel the edit.



USER FUNCTIONS
--------------

You will probably have used preset functions.  You can define your own
functions that can be referred to by a name.  This can save time when
entering 'y=' functions.  It also allows you to add functions or divide one
function by another.

CREATING USER FUNCTIONS
-----------------------

Control of user funtions is from the User functions window, opened via the
windows sub-menu, by clicking User from the Plot list or by pressing F7. 
The user functions window is similar to the preset functions window except
you are able to create, edit and delete functions.

Initially the scrollable pane is empty - to create a user function click on
Create.  In the window that opens you must enter a function name in the
uppermost box and a definition in the other one.

The function name must consist only of letters and must not begin or end in
'x' as it will get confused with the variable, x.  The name will be
converted so that all the letters are in lower case.  The name must also be
unique - ie not the same as another user function, preset function or basic
function.  You will be alerted if you do this.

The syntax of the definition is the same as that of a y= function.  The
parameter of a user function is x so the definition should be in terms of x. 
When you click on OK you will be alerted if the function name is illegal, if
the definition cannot be evaluated or if the function would lead to
recursion.  These means that when evaluated, the function definition refers
to itself and an endless loop occurs, as in this example:

f(x)=2g(x) ; g(x)=f(x)+4

To evaluate f(x), g(x) must be calculated.  To get a value for g(x), f(x)
must be calculated - which in turn references g(x) and so on and so forth.

PLOTTING USER FUNCTIONS
-----------------------

A user function can be directly plotted by highlighting it in the pane and
clicking on PLOT.  User functions can of course be referenced in y=
functions, for example like this:

y=12x+6f(x)

This of course is the main reason for using user functions: you can combine
functions in a number of ways and investigate the effect of changing part of
the definition.

The parameter of a user function doesn't need to be just x either - it can
be as complicated as you like, eg f(2x+1), f(16x/2x^2+7x) or
f(g(8x+3sin(x))).  Note composite functions cannot be entered in the form
fg(x) as it will be interpreted as a single function fg.  Instead use
brackets or leave a space - eg f g(x) or f(g(x)).

EDITING USER FUNCTION DEFINITIONS
---------------------------------

Like y= function definitions, user function definitions can be edited by
double-clicking on them in the relevant pane (ie in the User functions
window), or by highlighting one and clicking on Edit.  If you change a
function definition that is plotted, the graphs window will be redrawn to
reflect these changes.

One of the menus available from the user functions window is a select menu
which gives control over the selection (highlighting) of user functions. 
The submenu contains the following options:

All - selects all user functions

Used - selects all the user functions that are involved in a plotted
function

Unused - selects all the user functions that are not refered to in any of
the plotted functions.

Clear - cancels the current selection

Copy - copies the selected user function (there must be only one) with the
name specified in the sub-menu.  The name must be unique and not cause
recursion (as above).

Delete - deletes all selected user functions.

Saving and loading of user functions will be described later.

PROCESSING PLOTTED FUNCTIONS
----------------------------

Part of the power of !Funcy2 is the ability to process the plotted functions
whether they're visible or invisible.  Initially you can change the colour
or quality of a function either by double-clicking on the function in the
plot list window and using the controls in the 'y=' window.  Alternatively
you can use the menu available from the plot list window.

THE PLOT LIST MENU
------------------

Apart from opening windows (see above) and saving (see later) you can
control the selection of functions in the plot list.  In the select menu you
have the following options:

All - selects everything in the plot list

Visible - selects only visible functions

Invisible - selects only invisible functions

Invert - inverts the current selection (ie unselected items made selected
and vice versa)

Clear - cancels the selection

Make - leads to a further sub-menu.  It applies an effect to the currently
selected function(s).  You can make the selection visible or invisible.  You
can also set the colour or the quality of all the selected functions to a
particular value, which is quicker than setting each one in turn.  The solo
option will make the selected function(s) visible and the rest invisible.

Copy - copies the currently selected function (only works if only one
function is highlighted)  If you copy a function that has derivitives,
integrals or transformations you will be asked if you want those copied as
well.

Delete - deletes a function.  Can also be done by clicking on delete in the
plot list window.  If the function has derivitives, integrals or
transformations they will be deleted as well.

FURTHER PROCESSES: CALCULUS PROCESSES
-------------------------------------

The two calculus processes - integration and differentiation - can be
applied to any plotted function.  To do this, highlight the function you
want to integrate or differentiate (it must be the only highlighted
function) and click on Calculus in the Plot list window.

From the calculus window you can select the process you want to apply.  You
can also set up the quality and colour in the usual way.  Click on Solo or
OK to complete the operation, or on the close icon to cancel.  Note that
integral functions can take a while to be plotted.

In the plot list, a calculus process appears as Derivitive or Integral. To
edit it, double click on it in the usual way.

FURTHER PROCESSES: TRANSFORMATIONS
----------------------------------

To transform a function, make sure it is the only one highlighted in the
plot list and click on Transform.  The bottom half of the Transform window
is familiar - the top half is complicated.  In the pane there is a list
containing the transformations applied to the graph (in order) - initially
of course this pane is empty.  To create a transformation, click on Create. 
A default transformation will appear at the end of the list.  As the default
transformation has no effect, you will want to edit it.  Highlight it by
clicking on it and then use the buttons to the right of the pane to change
the type of transformation.  If applicable enter a factor into the box.

Further transformations can be added to the list (to a maximum of 20) by
clicking on Create again.  Make sure you highlight the function you want to
edit before using the buttons to change the transformation.

The transformation that results depends on the combination of buttons
pressed:

Translate + x + factor: will translate (move) the graph in the x direction
by the number of units in the factor box.  A positive value will translate
the graph right, a negative number will move the graph left.

Translate + y + factor: will translate the graph in the y direction by the
number of units in the factor box.  A positve value will translate the graph
up, a negative number will move it down.

Scale + x + factor: will stretch the graph in the x direction (from the y
axis) by the factor.  A factor between 0 and 1 will contract the graph, a
higher value will stretch it.

Scale + y + factor: will stretch the graph in the y direction (from the x
axis) by the factor in the box.

Reflect + x: will reflect the graph horizontally - that is about the y axis.

Reflect + y: will reflect the graph vertically - that is about the x axis.

Reflect + y=x: will reflect the graph in the line y=x.  Therefore produces
the inverse of the function entered.

To plot the transformation, click on OK or Solo (see y= functions for
information).

Double clicking on a transformation in the plot list will take you back to
this window.  There is a menu available from the transform window: it allows
you to select all the transformations in the list, cancel the selection and
delete the selected transformations.  Alternatively the Delete icon will let
you delete the selected transformations.



GLOBAL SETTINGS WHICH AFFECT ALL PLOTTED GRAPHS
-----------------------------------------------

There are a number of things which are set up via the range and appearance
windows which affect the look of the whole graph.

RANGE AND AXIS CONTROL
----------------------

Selecting Axes/Range from the windows sub-menu or pressing F3 will open a
window where you can set the extent of the graph and determine the
appearance of the axes.

Both x and y axes have minimum and maximum values.  The minimum value must
be lower than maximum value, but the origin need not be included in the
graph's range.  The step value determines how often reference marks appear
on the axes and the seperation of grid lines (see appearance).

Like individual graphs the axes can be made invisible, the colour of them
can be set and the quality ranges from a solid line to one point every
'step' as defined in the step boxes.  The graph can also be labelled along
the axes at intervals if label is ticked.

Clicking OK will set the range, closing the window will cancel any changes.

STORED RANGE SETTINGS
---------------------

You can store and recall up to six range settings.  Initially they are all
set to the default (ie x and y from -10 to 10 with step size 2) but the
current range - the one that is reflected in the graphs window - can be
stored by clicking with adjust on one of the icons numbered 1 to 6 in the
range window.  Note that if the entries in the range window are different
from the actual range shown in the output/graphs window then the range of
the graph window will be stored: to make sure that you store the correct
range, click on OK in the range window with adjust before storing the range.

Recalling a range is done by clicking select on one of the 1 to 6 icons.  To
make the graph assume the settings click on OK.

The function keys can also be used to store and recall ranges.  Shift+F1 to
Shift+F6 recall range settings one to six respectively.  Ctrl+F1 to Ctrl+F6
store ranges.  Note these have instant effect.

NB Compare changing the range with zooming - see later.

APPEARANCE
----------

This is opened with F4 or via the windows sub-menu.  The top half of the
window controls the positioning and extent of the graph.  The resize arrows
expand or shrink the graph in the direction shown by one step unit (as set
up in the range window) - experiment to find out which arrow does what.  The
move arrows moves the 'window' through which you are looking at the graph in
the direction shown so that you end up looking at a different part of the
graph.  Both these functions have instant effect and work even when the
graphs window is closed.

The bottom half of the window lets you set up a grid. The quality buttons
range from a solid line to one dot per step unit to no grid at all.  The
colour selection works in the usual way.  Click on OK to set the grid or
close the window to cancel.

The overall refers to the overall quality of all the plots.  Changing the
overall quality affects all the graphs that have been set up with default
quality.  By setting a low overall quality you can speed up plotting
considerably.



MISCELLANEOUS
-------------

THE TRACE WINDOW
----------------

This window - accessed by F5 or the windows submenu gives a readout of the
current mouse position on the graph in the graphs co-ordinates.  You get
very long numbers due to the resolution of the screen - on a real graph the
x and y values are continous but on screen one pixel refers to a range of
values.  The one given is at the centre of the pixel.  The accuracy of the
readout can be toned down using the rounding functions - either in
significant figures or decimal places.  Before you can set the degree of
rounding you must turn it on by making the 'Round' option ticked.

THE GRAPHS WINDOW
-----------------

This shows the actual plots defined in the plot list and can be opened by
pressing F2, clicking with select or adjust on the icon bar or using the
windows submenu.  Only the plots that have been defined as visible will be
seen.  The control of axes is done via the range and appearance windows; the
grid and overall quality are defined from the appearance window (see above
for description).

The graphs window is designed so that at zoom factor 1:1 (see next section)
the graph fills the whole screen.  If you change mode so that the screen
becomes bigger or smaller, the window will be resized to take this into
account.  If the screen resolution is increased the resolution of the graph
increases as well - so in effect you get a better quality plot.

ZOOMING
-------

By default the graph is set to fill the whole screen.  If you wanted to see
the graph in more detail, you could change the range of the graph so that a
smaller extent is covered.  However, you may want to be able to keep the
current range extent (eg x from -5 to -3) but still see lots of detail.  For
this you can zoom in on the graph so that the extent covers more than a
screen's worth of space.

To do this, click menu over the graphs window, and move to the zoom
sub-menu.  This works in a similar way to a zoom window in !Draw or !Paint
except you can have different zoom factors in the x and y directions.  If
you're not familiar with zoom boxes, the zoom factors are expressed as
quotients, so 2:1 means twice as large (2/1) whereas 1:3 is a third (1/3) of
the size.  You can use the arrows to change the number nearest, or enter
values into the boxes directly.  The arrows have instant effect; entering
values directly only comes into effect when you press Return when the caret
is in one of the right-hand boxes.

If the button in the middle of the zoom window is pressed, the contents of
the x and y boxes are tied so that any change you make in one appears in the
other as well.  This means that the zoom factor is the same in both
directions.  However if you click on the link icon so that it is not
depressed, you can set the x and y zoom factors independently.

Very large and very small zoom factors are attainable but should be avoided
unless you're very patient!

SAVING AND LOADING
------------------

Although there is only one filetype, different things can be saved or
loaded, depending on where you drag icons from/to.

The three types of information that can be saved or loaded are:

Plotted function definitions

User function definitions

Overall information - eg range, stored ranges, grid style, zoom factor etc



If you save from the plot list menu, all the functions in the plot list will
be saved along with the overall information. If the 'with definitions'
option in the save dialogue box is ticked, all the user function definitions
will be saved as well.  This means you can save everything in a single file.

If you only want to save user functions then open the User functions window,
and save from the menu there.  Overall information will not be saved.


When loading, if you drag the icon to the icon bar icon, then all
information in the file will be loaded.  If you drag to the plot list
window, then only plotted functions will be loaded; if you drag to the User
functions window, then only user functions will be loaded.  If you drag to
the graphs window, the overall information only will be loaded.  This allows
you, for example, to import range settings from another file.

Note that function definitions are added to the respective lists so you
never lose anything on a load.  User function definitions whose names clash
will not be loaded and neither will those that would cause recursive
definitions (see user functions section) to be set up.

SPEED
-----

Whenever you change anything which !Funcy2 thinks might affect the overall
appearance of the graph, it is recalculated, but only if the graphs window
is open.  This recalculation can take some time so here are some tips on
speeding things up

1. Don't leave the graphs window open if you don't need it to be when you
are changing a lot of things.

2. Use a small zoom factor - the time taken should be halved if the zoom
factor is halved.

3. Change to a lower resolution screen mode - a y value is calculated for
each pixel across the window, so the fewer pixels across the window there
are the quicker updates will be

4. Use lower quality plots - temporarily set the default quality to a very
low setting to reduce the number of calculations made.

5. Use integral functions with care - the way these are calculated means
that more time is spent if the graph's origin is a long way away from the
left hand side of the window and that reducing the quality doesn't help.

6. Make functions invisible if they don't need to be plotted.

7. If you really must, try typing *RMFaster BASIC after pressing F12 and see
if it works.

8. Finally, get a faster computer!

NOTE that medium quality grids and axes slow things down - have either the
highest or the lowest.  Also avoid using small step sizes in the range
window.

EXPORTING GRAPHS AS GRAPHIC IMAGES
----------------------------------

There is no facility to save files as sprites or draw files (yet) but there
is a workround (which assumes you've got RiscOS 3)

1. Set up the graphs so that the output in the graphs window is what you
want and at the size you want it (as long as it isn't bigger than the
screen)

2.  Close all the windows except the output window (to make a bit of space)

3.  If the icon bar is not visible, press Shift+F12

4.  If !Paint is not loaded, click on the Apps icon and double click on
!Paint with adjust.

5.  Click with menu over the !Paint icon on the icon bar and select
Snapshot...

6.  If you pressed Shift+F12 in step 3, press it again.

7.  If the graphs window takes up most of the screen, make sure that the
'whole screen' icon is ticked.

8.  Click on OK.

9,  If you didn't set the whole screen option, draw a box around the graphs
window.

10. A save box appears.  If the icon bar is not visible press Shift-F12
again.

11. Drag the Sprite file icon in the save box to the !Paint icon on the icon
bar.

12.  If you've got enough memory a sprite file window should open with a
miniature version of the graph you have just grabbed.  Double click on it so
that you can view and edit it.  You might wnat to trim off the window
gadgets or change some colours etc- see the Risc OS manuals to find out how
to do this.

If all you want is a Sprite file you can stop here.  However, you might want
to convert your sprite file to a draw file.

13. Close !Funcy2s output window and any of !Paints windows EXCEPT the
sprite file window containing the miniature version of the graph (you don't
want to get confused!)

14. If !Draw is not loaded, click on the Apps icon and double click on !Draw
with adjust.

15. Click menu over the miniature version of the graph in the sprite file
window.

16. Move to the save box from Sprite->Save menu.  Drag the sprite icon to
the !Draw icon.

17.  A !Draw window should open containing the graph at full size.  You may
need to change the page size of the draw document to be able to see the
whole graph.

18.  Use this sprite as a template over which you draw Bezier curves and
straight lines to form the shape of the graph.  By zooming the !Draw window
you can check that your version of the graph is close to the original.

19.  Once you have done this, select the original sprite in the !Draw
document and delete it.

20.  The path you have just created should be left and you can then group it
to form one object which can be resized, rotated, used in DTP documents with
no discernable loss of quality.



NB I intend to reduce this 20 stage process to a single drag in a future
version.  Please bear with me!



ENDPIECE
--------

I hope that you enjoy using this application - possibly even enough that you
feel like registering.  Please let me know of any bugs you encounter or of
any ideas for future improvements.  I apologise if I've missed anything out
in this documentation - it's taken me almost as long to write it as it did
to write the application!  Also apologies if some of the instructions aren't
very clear - as the software hasn't settled yet, I didn't want to write the
definitive manual!

PLEASE READ THE LICENCE CONDITIONS ETC AT THE TOP OF THIS FILE
--------------------------------------------------------------

PLEASE READ THE FILE 'NOTES' TO FIND OUT ABOUT THIS APPLICATION, PAST, 
PRESENT AND FUTURE...
------------------------------------------------------------------------

Text (c) 1994 Richard Blythe
