Filter löschen
Filter löschen

How can I obtain the Reference System of the following 3d model?

2 Ansichten (letzte 30 Tage)
Aitor Burdaspar
Aitor Burdaspar am 7 Apr. 2019
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 :)

Antworten (0)

Kategorien

Mehr zu Coordinate Transformations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by