[ODE] An embarassingly basic geometry question

amundbørsand amund at c2i.net
Thu Jun 12 02:47:33 2003


It can also be done with matrices. A standard, "default", so-called
"identity" matrix (3x3) looks like this:

[ 1  0  0 }
[ 0  1  0 }
[ 0  0  1 }

For a rotation matrix, this is actually just the three vectors pointing
in your x, y and z directions, something like this:

[ x1 x2 x3 ]
[ y1 y2 y3 ]
[ z1 z2 z3 ]

where x1, x2 and x3 are the three coordinates of the x vector, and so on.

So if you have a point a and A point B, which are the location of your
ball joints at the ends of the cylinder, you could just insert the
vector B - A into the matrix. And you'll need to do a cross product with
a vector pointing up or something... eh, it seems I didn't know this as
well as I though, but I'm sure you all understood what I meant, maybe
somebody else can complete it? Also, I'm not sure how to feed this to
ODE.


-- 
amundbørsand <amund@c2i.net>