Below is the MATLAB program for the generation of TPMS lattices.
clc;
clear all;
a=pi; %d No of unit cells
s=pi/10;
[x,y,z]=meshgrid(-a:s:a,-a:s:a,-a:s:a);
u = (cos(x).*cos(y).*cos(z))- (sin(x).*sin(y).*sin(z)); ; % d TPMS formula
isosurface (x, y, z, u,0);
Comments
Post a Comment