You are permitted to use it for an evaluation period of 30 days. At the end of this time you must either stop using it or send the single-user registration fee of £10 to the author. For multi-user and site licences please refer to the registration form.
Unauthorised use after the evaluation period is illegal.
Registered users are entitled to free upgrades and support from the author.
If you are reading this in the printed Manual then you should already be a Registered User. If not then you are bound by this Evaluation Licence.
Disclaimer
No warranty is made with respect of the software, its quality, performance, or fitness for any particular purpose. The software is supplied 'as is'. No responsibility will be accepted for any errors produced or the consequences of any erroneous results.
Distribution
You may distribute the unregistered version of this program provided you pass on the complete application including all files in the application directory. You may not alter any of these files in any way.
You may not copy, distribute or otherwise pass on copies of the printed version of the Manual and/or Tutorial.
Richard Sharpe
5 Camberwell Terrace
Leamington Spa
Warwickshire
CV31 1LP
Phone: 01926 772137
Contents
Licence
Introduction
The Main Controls
Menus
Dialogue Boxes
Appendix A (Formula Input)
Appendix B (Data Set Input)
Appendix C (Credits)
Appendix D (EventShell)
Appendix E (Keyboard Shortcuts)
Introduction.
Locus is a mathematical graph plotter and data analysis tool written
to provide ease of use with sophistication. It is sophisticated
enough for use with ‘A’ level and post ‘A’ level students and
straightforward enough to be used at late primary or early secondary
level.
It has the following features:
Formula based graph plotting in five operational modes:
* Cartesian (non-parametric)
* Polar (non-parametric)
* Cartesian (parametric)
* Polar (parametric)
* Implicit
* The user can watch the graph being plotted. This is very
useful and educationally important. It is also rare among
desktop graph plotters.
* Formulae can be entered in standard algebraic notation.
* Functions can be input in user defined function notation.
* Constants can be used
* 'Families’ of graphs can be plotted
* Commonly used functions in each of the five modes can be
saved and edited.
* You can choose fully automatic axis scaling or have complete
manual control.
* It features a drag box zoom and an automated zoom out facility.
* The graph can be moved up, down, right and left as required.
* It can analyse gradients of functions and areas under graphs
and draw gradient and integral functions.
* Bi-variate data sets in Text, CSV or SID formats can be imported
* User defined transformations of datasets using matrices or
descriptions can be applied.
* Statistical information including means, standard deviations
and least squares regression lines can be calculated.
* Data can be saved in DrawFile, Text, CSV, SID or its own LocFile
format.
* The user can print from the application.
* All user definable features can be saved as defaults.
Locus has been tested on a 4 Mb A5000, a 10Mb Risc PC700 and Strong ARM.
Theoretically Locus should run on a 2Mb machine but this would depend
on the configuration of the individual machine and is not guaranteed.
The Main Controls
In this section the main controls and their operation will be described.
They are arranged at the top of the main window in three rows of icons,
each dealing with a specific group of features.
Top Row: Settings which control how the application behaves.
Middle Row: Domain and range settings.
Bottom Row: Formula input.
Each row will now be described, starting at the left hand side and dealing
with each button in turn..
Top row.
1. Clear
This clears the screen and removes your work to date from memory. In
the interest of speed you are not reminded to save work if you have
not already done so. Clicking with SELECT will clear everything from the screen; clicking with ADJUST (the right hand mouse button) will clear
everything except for any loaded data sets.
2. Superimpose
This is primarily of interest to teachers for classroom demonstration
and is only available when auto-scaling is on. Click on this icon before
starting work and each time you plot a new graph Locus will redraw the
window, rescaled appropriately for the latest graph plotted, and will
then it each subsequent graph one in the newly scaled window.
3. Cartesian
Clicking on this changes Locus into Cartesian mode, changes the graph
type icon to 'y=' or ('xy=' if you are in parametric mode) and the
formula menu will change to the cartesian set.
4. Polar
Clicking on this changes Locus into Polar mode, changes the graph
type icon to 'r=' (or 'rØ=' if you are in parametric mode) and the
formula menu will change to the polar set.
5. Implicit
Clicking on this changes Locus into Implicit mode, it empties the
graph type icon and the formula menu will change to the implicit set.
In this mode you can type in formulae of the form x²-y²=36.
6. Parametric Switch
This switch toggles between parametric and non-parametric modes.
When the switch looks like this (see left) you are in non-parametric
mode.
7. Coordinate Input
This opens the coordinates input window, which allows the user to
input up to 20 coordinate points.
8. Internal dataset filer
This opens the Internal filer. I have included this in response to
requests that Locus will allow data input without recourse to dragging
files from a directory window. It is useful for teaching purposes and for demonstrations, as you can set up the files you require beforehand.
9. Radians
Clicking on this toggles the angle measurement between radians and degrees.
10. Step
This 'bump' icon set is used to define the plotting step. Locus works by
plotting the number of points specified (in this case 512) and then joining
them up with straight lines. There is obviously a trade-off between speed
of plotting and accuracy. For most simple graphs (ones that don't oscillate
too wildly) a step of 128 should suffice. For a complex formula like y=xsin(1/x). {-0.03<x<0.03} it would need to be considerably higher
(>1000).
11. Zoom out
The effect of the Zoom Out icon is to double the domain. If auto-scaling
is on, the range will be recalculated accordingly, if not the range will
be doubled as well.
12. Zoom in
The Zoom In icon works differently from Zoom Out. When you click on it
nothing will happen. However, if you then move the pointer over the main
window and 'click and drag' from the top left hand corner of the area
you want enlarged to the bottom right and release the mouse button, the
area defined will be redrawn. If you use this feature with students who
have difficulty with the mouse they may need to practice the 'click-drag'
technique until they become familiar with it.
13. Move
When you click on this icon you can then click and drag the graph to a
new position. When you release the mouse button the graph will be
redrawn in the new location.
14. Constants
This opens the Constants dialogue box which lets the user store useful
constants to be used in formulae and transformation expressions. Constants
are also used in plotting families of graphs.
15. Families
This opens the Families dialogue box which lets the user plot families
of related graphs by altering the values of any constants in use.
16. Coordinates
This opens the coordinates information window. Initially it will show
just the the x and y coordinates of the last clicked mouse position.
Clicking anywhere in the main window (ie. on the graph) will display
the coordinates for that position and a pair of horizontal and vertical
dotted lines will appear at the appropriate place on the graph.
Clicking with SELECT on the graph will change the coordinate values
according to the mouse position. Click/Dragging on the graph will allow
the user to trace along the graph seeing the various values change as
you do so.
Clicking on the 'Toggle size' icon will enlarge the window so that you
can see the polar coordinates and the derivative of the function at that
point. Clicking on the 'Coordinates' icon again will close the window.
17. Tangent
This can be used on its own or with the 'Coordinates' window. When this
icon is selected you will see both the horizontal and vertical 'Coordinate'
lines and the tangent to the curve at that point.
Click/Dragging on the graph will move the tangent along the graph.
The dy/dx entry in the coordinates window will also display the gradient
of the tangent at this point.
18. Derivative
When this is selected Locus will attempt to superimpose the derived
function (wherever it is defined) on top of the original function.
This is done numerically not algebraically, so the derived function
is not found for you. However, you can then attempt to fit a function
to the resulting curve manually, which is a useful way of acquiring
an intuitive grasp of derivative functions.
19. Integral
This works in exactly the same way as the derivative icon but this
time Locus will try to draw the integral function.
Middle row.
The five writable icons can be changed at any time (when they are not
'greyed out') to alter the extent of the graph. The 'max' number must
obviously be higher than the 'min' number. You can also click drag
the contents of one icon into another.
Auto scaling
When this icon is selected Locus will try to do some of the scaling
for you. Precisely what it does depends on which mode you are in.
This is explained in greater detail in the Tutorial.
Squaring up
When this icon is unselected it will show an ellipse and the graphs
will be drawn in a rectangular format. When it is selected the ellipse
will turn to a circle and the graphs will be drawn in a square on the
left hand side of the main window.
Bottom row.
Formula input icon
This is where you place your formulae and it can be done in one of two
ways. Either you can enter the formula directly by clicking on the icon
with the mouse pointer and typing the appropriate formula for the mode
you are currently in. For more details on this please see the Tutorial
and Appendix A which gives full details on Locus' data input procedures.
Alternatively you can click on the menu icon which will open a menu
displaying a number of functions. These are fully editable and you can
create your own set if you wish. The menu will change automatically for
the mode you are in. If, for example, you change to polar parametric
mode the menu will contain this type of formulae.
Save to file
To the right of the formula menu icon is an icon which will add the
current contents of the main formula icon to the formula menu and
update the menu automatically.
x squared
Clicking on this icon will insert the squared symbol at the caret
wherever that may be. This allows the user to type in such functions
as "y=x²" or "y=sin²x".
x cubed
The same as the above except that this time it is the cubed ³ symbol
that is inserted.
Plot
Clicking on this icon will plot the graph, assuming that there is a
formula in the input icon and the scales are set correctly, Locus
will try to do this even if you have typed garbage into the formula
icon although the results will then be useless.
If the plot takes too long or nothing happens, pressing ESCAPE will stop
Locus from plotting.
Menus
The icon bar menu.
This is a simple menu with three items.
Info A standard RISC OS info box.
Save Choices This will save all the currently selected preferences
to file. These settings will then become the default
setup the next time the program is used.
Quit This will quit the application. Any data and graphs
not saved will be lost
The Main Window menu.
This contains nine items which fall into three basic categories.
There are three which have an arrow to the right of them. These lead
either to sub-menus or to dialogue boxes. Three others are 'greyed out'
so you cannot select them.
Save leads to the Save sub-menu
Print leads to the Print dialogue box
Edit leads to the Edit sub-menu
Transform, Matrix and Statistics become active when a Data Set is loaded.
Clicking on Transform leads to the Transform dialogue box
Clicking on Matrix leads to the Matrix dialogue box
Clicking on Statistics leads to the Statistics dialogue box
Clicking on Settings leads to the Settings dialogue box
Clicking on Effects leads to the Effect dialogue box
The sub-menus will now be described.
The Save sub-menu
Locus can save data in five different formats. The format you use
depends upon what you intend to do with the data.
LocFile format is Locus' native format and saves settings and graphs
so that you can load these back into Locus at a later date. It is
particularly useful for lesson preparation so that when you want to
demonstrate something quickly you do not need to do all the settings
manually taking up valuable lesson time. You can save whole families
of curves in this way.
DrawFile format is the standard RISC-OS graphic format and is useful
for putting graphs into other documents (eg. Projects, Exam papers,
Tests etc..) All currently drawn graphs will be included in the graph.
The saving process may take a few seconds because the data must be
converted into the Drawfile format.
Text, CSV and SID formats are slightly less standard. Locus will
calculate values of the current function between the 'Start' and
'End' values and save them in two variable comma separated value
(CSV) format using the interval specified by the 'Step' field.
The Edit sub-menu
This has six items, each of which opens a dialogue box.
Functions opens the Edit Function dialogue box.
Families opens the Families dialogue box.
Constants opens the Constants dialogue box.
Formulae opens the Edit Formulae dialogue box.
Coordinates opens the Coordinates dialogue box.
Title opens the Title dialogue box.
These are all described in the next section.
Dialogue boxes
Functions dialogue box
Locus permits the use of function notation for formula input and the
letters 'f' to 'o' are recognised by the internal formula translation
routines as function names. It is important to remember this because
it means you must not use these reserved letters as constants.
Once a function has been defined it is saved to a file inside Locus
where it will remain until the contents of this dialogue box changes.
As an illustration, in the example shown the function definition f(x)
is defined as 'sinx + cosx'. This means that the formula y=f(x) will
draw the graph of y=sinx + cosx.
This capability is useful as typing f(2x) will draw the graph of
y=sin2x +cos 2x and typing 2f(x) will produce the graph y=2(sinx + cosx).
It is particularly valuable when teaching function transformations and
in looking at families of related functions. (see the next section.)
Clicking on the OK button will reset the preset functions to their new
values and clicking on the Cancel button closes the window without
altering anything.
Families dialogue box
The icon at the top of the Graph Families dialogue box shows the
number of graphs to be plotted and the remaining writable icons
allow you to set the required increments for each of the constants.
If any of these icons are left blank those constants will remain the
same throughout the operation.
When everything is set to your satisfaction click on the <OK> button
to accept the values or press <Cancel> to reject them.
When the graphs have been plotted the constants will revert to
their original values.
Constants dialogue box
This lets you preset constants. When you receive Locus you should
find that 'p' is set to the value of pi (3.14......) and 'e' is
set to the value of e (2.718.....). The letters f-o are missing as
these are recognised by Locus as user defined functions. t, x & y
are also missing as these are defined as variables.
You can alter any of the values or add new ones as you wish and then
set them by clicking on the <OK> button or you can save your values as
the default set by clicking on the <Save> button. <Cancel> closes the
window and changes nothing.
Print dialogue box
This displays information about the printer and the various settings
that will enable the user to print the graph at the right point on
the paper and at the correct size.
Printer shows the name of the currently active printer.
Resolution shows the current print resolution of your printer.
Copies sets the number of copies of the graph that will be printed.
Cancel closes the Print window.
Print begins printing.
Pressing ESCAPE at any time during the printing will abort printing
and return control to the desktop.
The Hot Key PRINT will open this dialogue box.
Formulae dialogue box
This lets you alter the formulae which appear when you click on the
formula menu icon on the main window pane. You can have up to 50
preset formulae in these menus although if the menus become too large
it becomes difficult to find the entry required.
There are five files, one for each of the five formula based modes of
operation: cartesian, polar, implicit etc. and the appropriate data is
shown in this window for the mode you are in at the time.
After changing the formulae clicking the <OK> button resaves the formula
file.
If you delete formulae from the menu you need not worry about leaving
empty icons, Locus will deal with these automatically.
The Hot Key ^E will open this dialogue box.
Coordinates Dialogue Box
This allows you to enter small data sets without recourse to CSV, SID
or Text files.
The topmost writable icon takes the titles for the horizontal and vertical
axes. These must be separated by a comma as this window is read by the
same function that deals with other input data sets.
The rest of the writable fields can contain the coordinates of the points
you want to plot. The plotting style of the points is controlled by the
'Effects' dialogue box.
The <Clear> button emptys all fields in the window.
As well as entering data manually can drag small data set files to the
arrow icon in this window to load them.
Internal filer window
This window allows you to save dataset files into a directory inside
Locus and from there they can be deleted, loaded into a text editor
or loaded into Locus. You can also create new data files yourself
from this window. This allows the user to manipulate datafiles within
Locus without having to move the main window aside so that you can drag
a data file onto the application window.
Cancel will close the window without doing anything at all.
Open File will open any file that the user has selected in the pane
window.
Delete File will any delete any file(s) that the user has selected
in the pane window.
Clicking on Delete All will empty Locus of all saved datafiles.
Clicking on Save file will open a save box which the user can use
to drag the selected file to a directory of their choice.
Clicking on Load file will load the selected file(s) into Locus.
To load a set of data files into Locus in this way you drag the files
onto the 'arrow' icon.
Clicking on New file will open a text window in whatever text editor
you have loaded. You can then save the edited file back into Locus.
Clicking on the Reset button will update the pane window directory.
Title Dialogue Box
This lets you write up to 256 characters onto the screen in any font,
fontsize and desktop colour.
Fill in the fields and click on the <OK> button to display the text.
By default the text will be printed at the top left hand corner of
the screen but you can move it by clicking on it to select it and
then dragging it around the screen. Clicking anywhere outside of
the box will deselect it.
The Hot Key ^T will open this dialogue box.
Transformations dialogue box
This enables the user to transform data sets in a variety of different
ways. Once a data set has been loaded by dragging the file icon onto
the Locus window the Transform entry in the main menu becomes selectable
and clicking SELECT on it will open the Transformations window.
There are four main transformations that can be applied to a data set:
Rotation
Enlargement
Reflection
Translation
First click with SELECT on the transformation you require and then fill
in the appropriate fields.
Clicking on the <Apply> button will apply the transformation to the data
set. The transformation will be applied to the last data set loaded so
clicking on <Apply> a second time will transform the previously
transformed set.
The Hot Key F4 will also open the Transform window.
Matrix Dialogue Box
The window performs similar operations to the transform window but the
input can be made as a 2x2 matrix.
You can use trigonometric functions and constants in the matrix fields
but you must put the constant values in brackets. For example, if you
type 'cos(p/2)' in one of the fields, the brackets are essential as
'cos p/2' produces the effect '(cosp)/2' which, if part of a rotation
matrix, would produce a transformation of Rotation of pi radians
followed by an enlargement scale factor 0.5 (all centre (0,0)).
The Hot Key F5 will open this dialogue box.
Statistics Info and Dialogue Box
This main purpose of this window is to display information about your
data set, transformed or otherwise.
It gives all of the information required, and in addition can
calculate the correlation coefficient and the least squares
regression line.
If you want to draw the Least squares regression line onto the data
set graph click on the <Transfer Equation> button to transfer the
formula to the formula input icon on the main window and then click
on the <Plot> button as usual.
The Hot Key F6 will open this dialogue box.
Settings Dialogue Box
This window contains seven option icons which enable you to set up
your graphs according to preference.
1. Show Assymptotes
When set this makes Locus draw asymptotes (a dotted vertical
line) at the borders of any area of the graph where the function
is not defined. For example the graph of y=1/(x+2) will have
an asymptote at x=-2. When it is off Locus will not draw them.
2. Show Plot
Locus plots graphs in a variety of different ways to give the user
the maximum choice. Most graph plotters do not permit the user to
see the graph while it is being plotted but Locus does allow you
to do this if Show Plot is on. Plotting will be slower, but this
feature can be very useful.
3. Show Axes
If Show Axes is off, the axes will disappear. Normally you would
want to see them but it may be useful not to have them at certain
times.
4. Show Grid
If Show Grid is on the graph will be covered with a lattice. This
can be turned on and off at any time, whether graphs have been
drawn or not, although it is best to decide at the start whether
you want this on or off as redrawing can take a while if the plot
is complicated.
5. Show Minor Axis Divisions
If this is set the axes will show small marks between the slightly
larger, labelled, marks. Minor divisions are not labelled. The number
of divisions will alter automatically dependent upon the size of
the range settings.
6. Show Axis Markers
If this is set numbers will be displayed at intervals along the
horizontal and vertical axes to show the scale.
7. Show Axis Labels
If this is set the axis labels will be displayed. By default these
are 'x' and 'y'.
The Hot Key F7 will open this dialogue box.
Effects Dialogue Box
From here you can set the options which control the appearance of the graph
such as fonts, colours and data marks.
Fonts sets the font and font size for the axis markers.
Colours sets the various colours used.
Mark sets the shape used to denote a point in a data set. The choice is -
Dot
Cross (square)
Cross (diagonal)
Square (small, empty)
Square (large, empty)
Diamond (small, empty)
Diamond (large, empty)
Square (small, filled)
Square (large, filled)
Diamond (small, filled)
Diamond (large, filled)
The 'Connect marks' option button sets whether the marks in a data set
will be joined to each other in the order of input.
The Hot Key F2 will open this dialogue box.
Appendix A - Formula Input.
Variables
Formula input is dependant on the plotting mode you are in, but the
preset functions available are the same even when the variables used
differ and are as follows.
Mode Independent variable Dependent variable
Cartesian x y
Cartesian parametric t x,y
Polar t r
Polar parametric t r,Ø
Implicit x,y
For example: In parametric mode the equations -
x=cost
y=sint
would be written as -
cost,sint.
You do not need to type the 'y=' or 'r=' as this is assumed by Locus.
The appropriate dependent variables are automatically placed in the
icon to the immediate left of the formula input icon.
In implicit mode nothing will appear in this icon as it is up to the
user to enter the entire equation.
Available Functions
Locus has a number of preset functions built in including a complete
set of trigonometric functions and hyperbolic trig functions plus some
other useful common functions.
An additional function is 'blanc', which draws the blancmange function.
This is continuous everywhere and differentiable nowhere and is very
useful in teaching calculus as nowhere is it locally straight. If you
are interested you could also try plotting 'r=blanct' in polar mode.
These functions can be entered in standard mathematical notation as
Locus will add any required brackets. For example, typing 'asinx' in
the formula input icon will plot the graph of y=asinx by replacing
'asinx' with the name of the function FN_ARCSIN(X) which will then
be evaluated.
If there is the possibility of ambiguity the user should use
appropriate sets of brackets. For example. if you were writing a
transformation matrix for a data set to perform a rotation of PI/4
radians about the origin then the matrix should include brackets
around the constant value because Locus will interpret 'cosp/4'
as (COS(PI))/4, which will result in a rotation of PI radians and
an enlargement scale factor 0.25.
Please note that the Implicit plotting routines are at an embryonic
stage at the time of writing and while they are capable of dealing
with simple functions like one-to-one mapping (e.g. 4x-3y=-7 or
xy=10) and some two-to-one and one-to-two mappings, Locus will plot
rubbish if asked to deal with most many-to-many mappings and any
trigonometric input. I have included this basic Implicit capacity
because it is very useful for teaching simultaneous linear equations.
Appendix B - Data Set Input
Data sets can be entered in a variety of ways to give maximum
flexibility for the user.
If you are familiar with methods of data transfer between applications
you should have no difficulty producing CSV or SID files to use as
input for Locus. However, if you are unable to do this Locus can also
use a standard textfile. Everyone has a copy of !Edit and so can produce
textfiles. It is, of course. important that the user is aware of the
constraints. If you try to use inappropriate data Locus may attempt to
plot it until it generates an error. Errors of this type should not crash
the application but the possibility does exist.
If you save a bi-variate (two variable) data set from a spreadsheet,
database or Locus itself, then it will be in the correct format for
Locus to load when the file icon is dragged to the main window.
However if you wish to write your own data sets directly in a text
editor, and this can be very useful, then you need to use the following
format.
The first line must contain the Axis label names. If the names are
unimportant then just type 'x,y'.
The following lines should consist of the two items of data. These
must be separated by a comma and line must be concluded by pressing
return.
A small data set in Textfile format might look like this:
x.y
-3,0
-2,-9
-1,-1
0,3
1,-3
2,5
3,13
Note that there must be a line feed (press RETURN) at the end of the
last line.
Appendix C - Credits
The first credit must go to Paul Hobbs with whose astounding !EvntShell
library, this application was written.
Thanks also to Guttorm Vik who wrote !StrongEd which is the editor used
to write Locus.
Other applications and modules used are -
!BasShrink by John Wallace
!BLIB by Ian Palmer
!TemplEd v. 1.31 by Dick Alstein
!Wimpy by Andrew Heckford
!Applise by Armen Software
!GrabMenu by Cy Booker
MenuUtils by Alex Pretrov
My thanks go to all of these authors for their excellent work.
Finally special thanks to David Tall for an old BBC program called
SuperGraph from which I got a great deal of inspiration including
the graph family idea and ideas for how to implement preset functions.
Appendix D
EventShell
This program has been written using the routines supplied with the
EvntShell library which is copyright Paul Hobbs.
EvntShell is a starting point for developing your own applications
that run under the RISC-OS wimp system. The EvntShell library
contains code to handle most of the ‘Events’ (i.e. opening a menu,
closing a window etc) that can occur, and all your application has
to do is inform the library what it should do when certain events
occur. For example a menu can be attached to a window or to an icon
- the library will open the menu for you (in the correct position!)
when the <MENU> button on the mouse is used.
Normally writing a wimp application is a very complex business,
involving much reading of the Programmers Reference Manuals, magazine
articles and examining other applications. The aim of the EvntShell
library is to reduce the need for this and to enable the speedy
creation of easily maintained and robust applications.
Distribution Licence for EvntShell
You have permission to use any part or the whole library in any Public
Domain/ShareWare project ONCE YOUR COPY HAS BEEN REGISTERED, as long
as I am fully credited (via the inclusion of this file in the program
documentation). If you wish to use these routines in a program that is
for sale (for however much and for whatever reasons) or released as
copyright material then my express permission in writing must be obtained.
I maintain copyright on all the material supplied as part of the EvntShell
system (except where noted below) and reserve the right to amend these
conditions in cases where I deem misuse.
The library code is supplied free of charge to everyone ‘as is’. There
is no guarantee that it is free from bugs and no warranty is given about
its suitability for use.
Further details about EvntShell may be obtained from the author:
Paul Hobbs
Rheinpfalzstrasse 2
85049 Ingolstadt
Germany
Email : Paul.Hobbs@t-online.de
Web site: http://ourworld.compuserve.com/homepages/Paul_Hobbs
The heap manager routines used by EvntShell are copyright Risc User and
are used with permission.
Copyright for all of the supplied relocatable modules remains with the