Hello everyone. I am trying to change the reference system to the system that appears in the image:
Any idea?
Thank you.
I am not sure what you mean. I would consider GeometricTransformation for a general linear change, Translate or Rotate for more specific changes.
I’d rather not make assumptions about what you mean by “change the reference system”. Maybe you can provide a before and after comparison so I know what you’re trying to change.
mat = Orthogonalize[RandomReal[{0, 1}, {3, 3}]];
Graphics3D[GeometricTransformation[Cuboid, mat]]
Thank you for your response, Gianluca.
I tried to do what you show me, but I couldn’t get the result I am looking for. I show the code and a picture with my code and the result I obtained…maybe
someone find the mistake.
A = {{1, 1, 1}, {1, 6, 8}, {1, 8, 9}};
c = Orthogonalize[Eigenvectors[A]] // N;
c // MatrixForm
Graphics3D[{GeometricTransformation[Cuboid[], c],
Arrow[{{0, 0, 0}, {0.09489129421592486, 0.636336138762876,
0.7655533689994319}}],
Arrow[{{0, 0, 0}, {-0.9918275784421267, 0.005450756929915728,
0.12746899187848795}}],
Arrow[{{0, 0, 0}, {0.08528597143524745, -0.7713926417546674,
0.6306185022048604}}]}, Axes -> True]
I’d wish the cuboid coincide with the arrows.
Thank you.
You should use the columns of the matrix for the arrows, not the rows:
A = {{1, 1, 1}, {1, 6, 8}, {1, 8, 9}};
c = Orthogonalize[Eigenvectors[A]] // N;
c // MatrixForm
Graphics3D[{GeometricTransformation[Cuboid[], c],
Map[Arrow[{{0, 0, 0}, #}] &, Transpose[1.5 c]]}, Axes -> True]
or else
Graphics3D[{GeometricTransformation[{Cuboid[],
Map[Arrow[{{0, 0, 0}, #}] &, 1.5 IdentityMatrix[3]]}, c]},
Axes -> True]
Thank you very much Gianluca, now the program works like I want!
You helped me a lot, I’m very grateful.
Regards.