Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
305 views
in Technique[技术] by (71.8m points)

math - How to calculate the conversion matrix of two meshes

I have two identical mesh objects, but their positions and rotation directions are different; I know the position information of the two mesh vertices, how can I get the relative transformation matrix between them

question from:https://stackoverflow.com/questions/66060613/how-to-calculate-the-conversion-matrix-of-two-meshes

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  1. obtain or construct homogenuous transform matrix for each object

    lets call them a,b corresponding to meshes A,B

  2. compute the difference matrix d

    for example you want to go from A to B then its just matter of solving:

               a*d = b
    Inverse(a)*a*d = Inverse(a)*b
                 d = Inverse(a)*b
    

    Beware in case you use different notations (like reverse order of multiplication and or inverse matrices instead of direct ones the equation might get inverted and or transposed)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...