Thursday, 4 March 2010

Live Maths Feb 2008

-->

Live Maths Feb 2008

/ LiveMaths / LiveMathsTwo / LiveMathsJan2008

Matrix Arithmetic, Double Subscripts, Visualization

So far the parser understands and creates code for:

  • the usual four arithmetic operations,
  • sum and product expressions,
  • matrices,
  • subscripted variables.

However, the supporting library only implements arithmetic operations on real numbers not matrices and arrays.

One thing that MathCad has that is extremely useful is the ability to show various kinds of visualizations. As OpenOffice includes a chart component it should be relatively easy to add some similar abilities to LiveMaths.

Matrix Arithmetic

This is easily done by checking the datatype on entry to the library routines and calling the appropriate routine. All we have to do is define the meaning of the various operators with respect to the combinations of operands.

This works in the latest version except for division because I have not yet implemented matrix inversion.

Double Subscripts

It should be simple to define the syntax for double subscripts. In fact we should define a subscript as a comma separated list of single subscripts.

Visualization

The chart component in OpenOffice includes a simple table to hold the data to be displayed. If we can find a simple way for LiveMaths to fill in this table we can leave it to the user to use the existing OpenOffice facilities to do the rest of the work of formatting the data and deciding which chart type to use etc.

For this to work we need the following:

  • a way for LiveMaths to identify charts that are to be updated from LiveMaths variables.
  • a way for LiveMaths to identify the data that is to be used.

One way to achive both of these ends is to use the name property of the chart to indicate not only that this chart is to be updated by LiveMaths but also to say which variables are to be used for the series.

It seems that object names in OpenOffice can contain any characters so we have total freedom to define a syntax that specifies what is to be included.

Once that is specified the user would simply insert and chart and set the name to a statement that specified the data to be charted. For instance simply referring to a matrix could be enough.

The most difficult problem will be discovering the code needed to manipulate the charts.

No comments:

Post a Comment

Blog Archive

Followers