Cylindrical ring of implicit surfaces
조회 수: 3 (최근 30일)
이전 댓글 표시
Dear community,
currently I try to model a cylindrical ring of implicit surfaces. Basically I found a solution for this, but unfortunately there appears a problem at the transition areas: First, these are not completely smooth and second, there are surplus surfaces there because of the isocaps.
Up to now I have proceeded in such a way that I first create a unit cell and then multiply and transform it until the ring is closed.
Below is a picture of a stl-file of my previous result and the corresponding code.
Does anyone have an idea to solve my problems (especially when combining the individual surfaces, or a possibility for preparation) or an alternative suggestion for creating such a structure where the problem does not occur?
Thanks a lot already and best regards
clc
clear
close all
n=80;
t=pi/n;
x_max=1;
y_max=1;
z_max=1;
r_max=4;
num=12;
factor=6.4/num;
xi = -x_max/2:t:x_max/2;
yi = -y_max/2:t:y_max/2;
zi = -z_max/2:t:z_max/2;
[x,y,z] = meshgrid(xi,yi,zi);
F=cos(2.*pi.*x)+cos(2.*pi.*y)+cos(2.*pi.*z);
% First body
[fs,v]=isosurface(x,y,z,F,0);
v(:,2)=v(:,2)+r_max;
[~,rho] = cart2pol(v(:,1),v(:,2));
theta=v(:,1).*factor;
[v(:,1),v(:,2)] = pol2cart(theta,rho);
[fc,v2,c] = isocaps(x,y,z,F,0);
v2(:,2)=v2(:,2)+r_max;
[~,rho] = cart2pol(v2(:,1),v2(:,2));
theta=v2(:,1).*factor;
[v2(:,1),v2(:,2)] = pol2cart(theta,rho);
fn = [fs ; fc+length(v(:,1))];
vn = [v ; v2];
fges=fn;
vges=vn;
% Further bodies
for i=1:Zellanzahl-1
phi=(i*2*pi)/(num);
R=[cos(phi) -sin(phi) 0;sin(phi) cos(phi) 0;0 0 1];
for j=1:length(vn(:,1))
viteration(j,:)=R*vn(j,:)';
end
fiteration = fn+i*max(max(fn));
fges = [fges ; fiteration];
vges = [vges ; viteration];
end
stlwrite('geometry.stl',fges,vges);
댓글 수: 0
답변 (1개)
Kamal Uddin Mohammad Miah
2021년 9월 1일
Hallo Fabian, this pictuer might help you to write the code, i am new in programming as well as working in the same direction.
Ref: Numerical and experimental studies on compressive behavior of Gyroid
lattice cylindrical shells
Yongzhen Wang a,d, Xianben Ren a, Zihao Chen b, Yongbo Jiang b, Xiaofei Cao a, Shizheng Fang c, Tian Zhaoa,b,⁎,
Ying Li a,b,⁎, Daining Fanga,b
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!