How can I obtain the Reference System of the following 3d model?
1 view (last 30 days)
Show older comments
In the following code, I create a 3D rectangle like this:
Dim_X = 4;
Dim_Y = 3;
Dim_Z = 1;
vertex_matrix = [0 0 0;
1 0 0;
1 1 0;
0 1 0;
0 0 1;
1 0 1;
1 1 1;
0 1 1];
faces_matrix = [1 2 6 5
2 3 7 6
3 4 8 7
4 1 5 8
1 2 3 4
5 6 7 8];
CubeCenter_Coord = [Dim_X/2 Dim_Y/2 Dim_Z/2];
origin = [0 0 0];
CubeParameters = [vertex_matrix(:,1)*Dim_X+origin(1),vertex_matrix(:,2)*Dim_Y+origin(2),vertex_matrix(:,3)*Dim_Z+origin(3)];
axis equal;
cube = patch('Vertices',CubeParameters,'Faces',faces_matrix,'FaceColor', 'blue')
view(3)
And the question is:
-Is it any way to create a 3D model like that and to obtain the reference system (in cartesian coordenates) of the 3D body? I would like to obtain the reference system because then, I will try to rotate the 3D model with some quaternions with "rotateframe" function.
Thanks in advance :)
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!