[Haskell-cafe] matrix computations based on the GSL

Henning Thielemann lemming at henning-thielemann.de
Fri Jul 8 10:03:17 EDT 2005

On Fri, 8 Jul 2005, Keean Schupke wrote:

> Okay, this approach is starting to make sense to me... I can see now
> that Vectors are a different type of object to Matrices. Vectors
> represent points in N-Space and matrices represent operations on those
> points

That's what I wanted to express.

> (say rotations or translations)... But it seems we can represent
> translations as adding vectors or matrix operations (although we need to
> introduce the 'extra' dimension W... and have an extra field in vectors
> that contains the value '1').
> (3D translation)
> [x,y,z,1] * [[0,0,0,0],[0,0,0,0],[0,0,0,0],[dx,dy,dz,dw]] =
> [x+dx,y+dy,z+dz,1+dw]

Do you mean
 [x,y,z,1] * [[1,0,0,0],[0,1,0,0],[0,0,1,0],[dx,dy,dz,dw+1]]

> but how is this different from adding vectors? If we allow vector
> addition then we no longer have the nice separation between values and
> linear operators, as a value can also be a linear operator (a
> translation)?


More information about the Haskell-Cafe mailing list