The below code written in the MATLAB®
can be used for generating the Gyroid structure.
clc; clear all;
n1 = 2; % Number of
cells in x Direction
n2 = 2; % Number of
cells in y Direction
n3 = 2; % Number of cells in z Direction
a=2*n1*pi; % x direction parameters
b=2*n2*pi; % y direction parameters
g=2*n3*pi; % z
direction parameters
s=0.01;
[x,y,z]=meshgrid(-0.5:s:0.5,-0.5:s:0.5,-0.5:s:0.5);
% Gyroid Formula
u = (sin(a.*x).* cos(b.*y) + sin(b.*y).* cos(g.*z) +
sin(g.*z).* cos(a.*x));
% Level Set equation
c =0.7;
Ts= -(u+c).*(u-c);
% Sheet based Gyroid
Tsk= u + c; %
Skeletal based Gyroid
Isosurface(x,y,z,Ts,0);
Isocaps(x,y,z,Ts,0);
%% Program Ends
If very less knowledge about coding, then the below software can be used for generating Gyroid and other lattice structures.
Using Lattice_Karak helps in designing
various TPMS structures, export them into stl file for further processing like
3D printing and Finite Element analysis.
Lattice_Karak can be downloaded using the below
links.
https://drive.google.com/file/d/1WWL-UbPzErFCFVFJqw1as9w0M61aMxB4/view?usp=sharing
https://www.mathworks.com/matlabcentral/fileexchange/119883-lattice-structures
Videos on how to further use lattice_karak.
https://sites.google.com/iith.ac.in/lattice-karak/home
Comments
Post a Comment