Rotating 3D points on same plane to x-y axis

조회 수: 10 (최근 30일)
Jay
Jay 2014년 4월 22일
댓글: Jay 2014년 4월 23일
I have a 3D mesh object which contains many faces, each made up of 3 vertices. I am currently able to select a face with a click. Upon selection I would like the whole mesh object to rotate such that the selected face is parallel to the x-y axis.
i.e. I have 3 known xyz coordinates that sit on a 2D plane. I want to rotate these points so that this plane is now parallel to the x-y axis. I simply require a method of calculating the transformation matrix required for this rotation to input into the 'Matrix' property of the hgtransform object.
Thanks in advance.

답변 (1개)

Matt J
Matt J 2014년 4월 22일
I simply require a method of calculating the transformation matrix required for this rotation
See, for example,
  댓글 수: 3
Jay
Jay 2014년 4월 23일
The aim is to perform the smallest rotation possible then set the z-axis to zero for that face so that the face sits on the x-y plane itself. Orientation of the face on the x-y plane is unimportant.
Jay
Jay 2014년 4월 23일
Also the example you sent is fine.. but only once I already know the axis about which I must rotate and by what angle.
How can I find these arguments?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Object Containers에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by