# Kalamaris

633 downloads

Kalamaris's functionality also provide developers with a powerful library to manage complex mathematical operations.

Kalamaris also has a distributed design, which will allow to separate the KDE graphical interface from the real working code. This will permit to have a Kalamaris server on a big server, while running the clients on your usual computer on your desk.

**Tell me more about Kalamaris**

I've been thinking on developing a Mathematica-like application for years, and when my teacher of Numerical Analysis told us that we had to implement some numerical methods to solve systems of differential equations, I thought that it was time to start such an application and do it "the right way".

I started working on it a few months ago, and version 0.5.6 is the result up to now.

Note that this release is not considered stable yet, and it may crash (in fact, I'm sure it will) quite a lot. For example, there isn't yet any syntax checking code, so when you do something wrong (like having an unmatched number of parenthesis), it crashes.

It may be worth to mention that each time you enter an expression, Kalamaris stores the complete history on the file .#kalamaris.lastcmds, so if it crashes, you just have to copy this file with another name and edit it to use a correct syntax.

Note that syntax checking is one of the highest priority things on my TODO list.

**Here are some key features of "Kalamaris":**

· Kalamaris allows the user to define functions and evaluate them: f(x)=Sin(x)*x^2

· It also work with matrices, and multiple variable functions: f(x,y,z)=[ 1 , 2 , 3x ; 5*Sin(6y) , z+x , 2z ]

· It has symbolic and numeric evaluation: f(2,a,3b)

· Gives: [ 1 , 2 , 6 ; 5*Sin(6a) , 3b+2 , 2*3b ]

· It plots data on a 2D view using qtai and animates the data (using an extension to qtai) in a similar way. So you can enter :

c=EvalFunc(Cos(x),x,0,2PI,80)

s=EvalFunc(Sin(x),x,0,2PI,80)

PlotData(c[1],s[1])

m=EvalFunc(x^3-x,x,-1,1,80)

PlotData(m[0],m[1],0)

setPlotColor(0,1,Color(green))

m=EvalFunc(x^2-0.25,x,-1,1,80)

PlotData(m[0],m[1],0)

setPlotColor(0,2,Color(yellow))

· Solves systems of differential equations using the following methods:

Midpoint

Adams-Bashforth (with two different optional implementations)

Runge-Kutta 3/8

Fehlberg 5/6

Fehlberg 7/8

I'd like to mention that I've had help in implementing all these methods. Thanks go to Benjamín Olea Andrades and María Franco Barrionuevo for their detailed descriptions of the methods and their search of some example models to test the numerical methods. I don't know if they'll continue helping with Kalamaris after it has been finished for the class, but I hope so.

· Kalamaris also does symbolic derivations :

D(Sin(x),x) -> Cos(x)

D(Sin(2x)*Tan(x^3),x) -> Cos(2x)*2*Tan(x^3)+Sin(2x)*1/Cos(x)^2*3x^2

f(x,y)=[2,3x,y^4]

D(f(x,y),x) -> [ 0, 3, 4y^3 ]

D(f(x,y),y) -> [ 0, 0, 4y^3 ]

D(f(2a,b),a) -> [ 0, 6, 24y^3 ]

· Kalamaris also allows to visualize sets of 3D data using a beta version of a new library I'm developing to develop easy to implement 3D OpenGL applications in KDE.

· Kalamaris generates runtime html files with help for each function and variable (even user defined ones !). This allows Kalamaris to have automatically a web-based interface which is quite easy to use.

· You can use python, perl, or any other scripting language (even your shell !) to script your calculations and control Kalamaris using an external application.

· It uses KDoc to document the sources, so it has an html internal documentation.

**Requirements:**

· Mesa

· The OpenGL extension of Qt-2.1.x

· libgmp library for arbitrary precision numbers

Last updated on

**January 8th, 2008**