On Sun, May 3, 2009 at 12:56 AM, Tillmann Vogt <Tillmann.Vogt@rwth-aachen.de> wrote:
Now that you mention it. I just looked through haskell hierachical libraries and there seems to be no standard data types for vector math. Am I getting something wrong or is every library that is using linear algebra stuff using its own data types? So if I use a numeric library for matrices inside HOpenGL I have to convert around?

I think it would be nice to have data types and functions for dot produkt, scalar product, norms, ...
together with HOpenGL types.

Currently I am trying to embed a triangulation library from a ten year old diploma thesis (http://www.dinkla.net/fp/cglib.html) in my libary (I know that glu has tesselation). The author has developed a quite big and abstract type structure for all sorts of computer graphics algorithms and I didn't wanted to copy this into my library just for triangulation. But it is reasonable. It could be combined with HOpenGL types to maybe
Data.VectorMath or Data.LinearAlgebra . I would favour the second.

The problem is, in my opinion, that the design space of linear algebra libraries is big and complex;
thus I don't think a "canonical" linear algebra library is a good idea.

There are at least 4 linear algebra libraries on Hackage already:

http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hmatrix
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/vector-space
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Vec
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/vect

and they are all very different, and I can easily imagine the usefulness of some more.

Self-advertisement: The last of the above four is designed especially for graphics use,
in particular with OpenGL; but I'm not really satisfied with its current state, so feedback
is very welcome!

Balazs