This is the follow-up question from here: https://computergraphics.stackexchange.com/questions/5222/ Assume I have 3 original points in a 3D object (in 3D space) as `A1=<xa,ya,za>`, `A2=<xa,ya,za>`, and `A3=<xa,ya,za>` (assume we have all the requirements mentioned in our previous question). The 3D object is moved and rotated in the 3D space, and the new destination points become `B1=<xb,yb,zb>`, `B2=<xb,yb,zb>`, and `B3=<xb,yb,zb>`. What is the formula for the transformation matrix? Basically, I need a matrix that if applied to all points of the origin object, I get the displaced object.