How to create a 3D-strain map?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi everybody!
I have the following question:
I have four column vectors which are: coordinate x, coordinate y, coordinate z and the equivalent strain at each point. The sizes of the vectors are 20500x1. What I need is a plot of the volume with the coordinates like a mesh coloured based on the equivalent strain values. I have used the following lines:
figure
[xi,yi]= meshgrid(linspace(min(eqstrainx),max(eqstrainx),150), ...
linspace(min(eqstrainy),max(eqstrainy),150));
% [xi,yi] = meshgrid(min(t_nodex):0.1:max(t_nodex), min(t_nodey):0.1:max(t_nodey));
zi = griddata(eqstrainx,eqstrainy,eqstrainz,xi,yi);
surf(xi,yi,zi);
Tin=scatteredInterpolant(eqstrainx,eqstrainy,eqstrainz,eqstrain,'linear');
[xq,yq,zq] = meshgrid(linspace(min(eqstrainx),max(eqstrainx),150), ...
linspace(min(eqstrainy),max(eqstrainy),150), ...
linspace(min(eqstrainz),max(eqstrainz),150));
t=Tin(xi,yi,zi);
s=contour3(xi,yi,zi)
colormap('jet')
s.CData=t;
colorbar
The problem with scatteredInterpolant is that the elements of the grid are distorted. What do you think? Have you got some ideas? Thank you very much.
3 Commenti
darova
il 29 Apr 2020
I plotted the data you attached
Can you show the result you want/expect to see?
Risposte (1)
Sara
il 21 Giu 2021
Hi,
If I understand your question that you need to group the data based on its relevant strain.
I have done a similar thing but group the data based on its kind. So I had element1 and element2, and I wanted to color them based on their positions. Here is the MATLAB function that you may need to solve your problem
[Atoms, symboleS] = findgroups(symbole);
element1 = Atoms ==1;
element2 = Atoms ==2;
best of luck
0 Commenti
Vedere anche
Categorie
Scopri di più su Triangulation Representation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!