generate 3d periodic geometry matlab

조회 수: 3 (최근 30일)
A Poyser
A Poyser 2022년 11월 17일
댓글: A Poyser 2022년 12월 8일
I would like to generate three dimensional periodoc images for academic pappers. One such image would be randomoly placed elipses inside a cube to represent the propogation of flat cracks inside a matrix. Sililarly randomly placed oblate spheroidsinside a cube to reperesent diffuse porosity in a highly porous medium. I would like to generate an image that resembles the image shown below.
I have a piece of code that does increment this the value ϵ giving the desired loss of stiffness within the matrix material
Thanks in advance

채택된 답변

Matt J
Matt J 2022년 12월 8일
P=scale(nsidedpoly(1000),[1,2]*0.1);
X=P.Vertices(:,1); Y=P.Vertices(:,2); Z=0*X;
for i=1:30
patch(X+rand,Y+rand,Z+rand,'b','FaceAlpha',0.2);
end
view(3); shg; axis equal
  댓글 수: 1
A Poyser
A Poyser 2022년 12월 8일
Wow awesome, thank you so much. I guess an obvious follow-up question (or three) would be, is it possible to maintain an axis of 0 - 1 on all three axes no-matter what value n is in the expression i = 1:n? Could I also hide the values on the axis while enclosing the area in a cube (as seen in the examples)? Also could I make a nested loop so I can run for i=1:n for several values [5, 10, 50 100] for example?
Thanks again
Alex

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by