# [Bf-committers] Matrix "differencing" procedure

**Martin Poirier
**
bf-committers@blender.org

*Sun, 1 Aug 2004 11:42:10 -0700 (PDT)*

RA = B
You're looking for R.
RiAA = BiA (where iA is inverse of A)
R(iAA) = BiA
R(I) = BiA (where I is the identity matrix)
R = BiA
You'll need Mat4MulMat4 and Mat4Invert from arithb.c
Hope that's useful.
Martin
--- Roland Hess <me@harkyman.com> wrote:
>* Almost have my pinbone feature working, and there's
*>* one more thing I
*>* would like some advice on.
*>*
*>* I have two 4x4 matrices (MatA, and MatB). I want to
*>* find the matrix
*>* (MatR) that will transform MatA into MatB. Right
*>* now, I'm thinking I
*>* need to do this:
*>*
*>* 1. Find inverse matrix of MatA (IMatA)
*>* 2. Multiply MatB by IMatA, giving MatAB
*>* 3. Find inverse of MatAB
*>*
*>* The result of step 3 should be what I'm looking for
*>* (MatR), right? In
*>* other words, multiplying MatB with MatR will
*>* generate MatA.
*>*
*>* Roland Hess - harkyman
*>*
*>* _______________________________________________
*>* Bf-committers mailing list
*>* Bf-committers@blender.org
*>*
*http://www.blender.org/mailman/listinfo/bf-committers
>*
*
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail