2

I want to create and display a 3D shell in matlab, (for example a barrel with 100 elements) and I have a thickness vector(100*1) that contains the thicknesses of 100 shell elements. So I have an array that contains coordinates of shell nodes and elements and a vector that contains the thickness of shell elements.

Now how can I display this 3D shell that each element , depend on value of its thickness was different in colour (gray)?

Or how can I joint coordinates array and thickness vector or map the thickness vector on the shape of 3D shell and display a gray 3D shell?

EDIT: This question is about topology optimization. In final I must be have a figure like in attachment.

I have a vector with size 100*1 for example [1 0 0 1 0 ...]. The name of this vector is thickness vector. ‘1’ means solid and ‘0’ means void in thickness vector.

And I have an array (XYZ) for ploting 3D shell shape. I meshed this 3D shell to 100 rectangle elements. So corresponding each element in 3D shell I have one number (0 or 1) in thickness vector.

Now how can I display thickness of each element on output 3D shell plot with colour (e.g in final plot we can see each element that is solid be black and each element that is void be white). Or how can I link or map thickness vector on the shell plot?

Link to the picture: http://s9.picofile.com/file/8310446684/Capture.JPG

1
  • Can you be more specific about what you're trying to do (e.g. including pictures), and also include any code that you've written so others can reproduce it? Commented Oct 29, 2017 at 23:13

1 Answer 1

1

First, you can convert yout thickness vector thickness_V into a 10*10 matrix.

thickness_M = [];
for i = 1:10
    thickness_M = [thickness_M thickness_V(1+10*(i-1):10+10*(i-1))];
end

Then you can use surf combined with the option colormap gray, since you only have two possible values, the gray shades will only be white, or black.

Here is an example I just did:

[X,Y] = meshgrid(1:10);
Z = -(X-5).^2 - (Y-5).^2;
thickness_M = eye(10,10);
s = surf(X, Y, Z, -thickness_M);
colormap gray;

enter image description here

Sign up to request clarification or add additional context in comments.

3 Comments

i dont khnow how i can thank you my freind. your answer was very good for me.thank you very much
hello my freind .thank you again for your helping.i write a matlab code about shell finite element analysis with Mindlin–Reissner element but the code isnot work correctly.do you have any matlab code about finite element shell analysis with Mindlin–Reissner element?
Hi @sam1361, unfortunately I don't have this code... sorry. Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.