This project has moved and is read-only. For the latest updates, please go here.

Matrix Cross Product

Oct 11, 2010 at 12:07 PM


i m trying to use Math.NET Numerics in the case of a 4x4 matrix for representing a homog. transformation. I am missing the cross product ( i use densematrix) and i am confused because there also exists Math.Net Irridium.

Which library do I need when thinking of a 4x4 transformation matrix with the typical operations like cross product, vector product and so on. Are there any plans to support quaternions?

Best regards, apo.

Oct 11, 2010 at 11:45 PM

Hi Apo,

That's all possible using Math.NET Numerics at the moment. Here is a little snippet that should help you

#r @"MathNet.Numerics.dll"
#r @"MathNet.Numerics.FSharp.dll"

open MathNet.Numerics.FSharp
open MathNet.Numerics.LinearAlgebra.Double

let a = vector [4.0; 3.0; 2.0; 1.0]
let b = vector [2.0; 2.0; 2.0; 1.0]

let X = a.TensorMultiply(b)

Oct 25, 2010 at 9:36 PM

FYI: We've recently renamed these functions from TensorMultiply/Product to OuterProduct, as they seem to be better known by that name.

Note that the term "cross product" usually refers to another special operation on two vectors in 3D space, also known as (Gibbs) vector product.

Yes, there are plans for supporting Quaternions (as Math.NET Iridium already came with basic support that we can port over to Math.NET Numerics).