Rotating 3D points on same plane to x-y axis
Show older comments
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.
Answers (1)
Matt J
on 22 Apr 2014
0 votes
I simply require a method of calculating the transformation matrix required for this rotation
See, for example,
3 Comments
Note also, that the transformation, as you've articulated it, is not unique. If you rotate the points to be parallel to the xy plane, any further combination of 3D translations or rotations about the z-axis will still result in points with the property "parallel to the xy plane".
You'll have to decide how you want to resolve the ambiguity.
Jay
on 23 Apr 2014
Jay
on 23 Apr 2014
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!