I have a square of points {<0, 0, 0>, <6, 0, 0>, <6,0, 6>, <0,0,6>} (The square is placed at the origin in the xz plane in opengl).

Want to apply a transformation/s on the square and make a quad whose points are {<-0.156712, -0.010205, 1.392891>, <-0.025491, -0.054014, 1.602598>,<0.097527, -0.026609, 1.470910>, <-0.033522, 0.014052, 1.301813>}

How would the transformation matrix be derived?

  • \$\begingroup\$ I'm pretty sure you'll have to solve an equation system with 5-9 variables. Also, I haven't checked but if those vertices are just random points, there might be a possibility, that the original vertices can't be transformed into them with a simple matrix. \$\endgroup\$ – Bálint Mar 20 at 7:01
  • \$\begingroup\$ They are not random points \$\endgroup\$ – Argha Chakraborty Mar 20 at 7:05
  • \$\begingroup\$ Basically, read this: matesfacil.com/english/high/… I'll try to write an answer later today \$\endgroup\$ – Bálint Mar 20 at 7:08
  • \$\begingroup\$ Nevermind, just do this: math.stackexchange.com/questions/557507/… the second answer is better in this case \$\endgroup\$ – Bálint Mar 20 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.