geometry - Computing a non-affine transformation matrix from 3D data -


i have array of 3d paired points in 2 different coordinate spaces (a , b).

given points not coplanar, how compute non-affine transformation matrix able transform point b?

i have managed in 2d (using homography), can't work out how make work in 3d. quick code example appreciated if possible. :)

the approach described in this post generalize 3 dimensions: if know coordinates of 5 points in both coordinate systems, can use them compute 4×4 projective transformation matrix this, unique except scale factor without geometric relevance.

i've included variations of required code 2d in various posts, written sage, , there javascript example mentioned along the description. of these adapted 3d case, if want change programming language, might better off implementing formula directly, keeping in mind adjoint may serve alternative inverse of matrix in several locations.

here details on generalization 3d:

  1. use 4×4 system of linear equations, homogenous coordinates of 4 points on left , fifth point on right hand side.
  2. use 4 solution variables scale these 4 columns in order obtain transformation matrix.
  3. (as before)
  4. (as before)
  5. (as before)
  6. (as before)
  7. divide first 3 coordinates of homogenous coordinate vector fourth coordinate obtain dehomogenized coordinates.

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -