
How to represent second rank tensor as ellipsoid in 3D plot?
7 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
raymeout
2021-10-26
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

0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Coordinate Systems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!