![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/779043/image.jpeg)
How to represent second rank tensor as ellipsoid in 3D plot?
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello all,
this might seem a trivial task to many of you but I can't figure out how to make it work.
Background: I would like to visualize the second rank fabric tensor describing the microstructural anisotropy of specific material. (as done here: https://forum.image.sc/t/anisotropy-eigenvectors-and-eigenvalues/517/3 )
The fabric tensor would have the form as follows:
F = [7.36e-05 2.99e-06 2.03e-06;...
2,99e-06 9.76e-05 -2.91e-07;...
2.03e-06 -2.91e-07 9.79e-05];
Any help would be highly appreciated!
Best regards,
Sig
0 comentarios
Respuestas (1)
raymeout
el 26 de Oct. de 2021
Despite the fact, that this question might not be of interest anymore...
To plot a tensor, you first have to rotate it to its eigenvectors.
For this, you can solve the eigenvalue problem and get as results the eigenvalues (gives information for the radius of the ellipsoid in the main spatial directions (x, y & z)) and the eigenvectors (gives information on how you need to rotate the ellipsoid).
[Vec, Val] = eig(F);
So to generate the plot, you first calculate the ellipsiods surface when centered and not rotated. xc, yc and zc set to zero (center of ellipsoid) and xr, yr and zr set to the values from the eigenvalue problem.
[X,Y,Z] = ellipsoid(xc,yc,zc,xr,yr,zr);
You then can use the eigenvectors of the eigenvalue problem as rotation matrix to rotate the coordinates in the variables X, Y & Z (concatenate & reshape the matrices).
After that, you simply plot the ellipsoid:
surf(Xrot,Yrot,Zrot);
axis equal
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/779043/image.jpeg)
0 comentarios
Ver también
Categorías
Más información sobre Coordinate Systems en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!