3D plotting of a spherical gyroid with thickness
Mostra commenti meno recenti
the equation below is the equation of a spherical gyroid.
sin x * cos y + sin y * cos z + sin z * cos x = 0
i want to write a code and save the file so i can export it and do a 3D printing.to obtain the different surface areas as shown below. i also want to model so i can obtain various specific surface areas as shown below

Risposte (1)
darova
il 12 Mar 2020
Use isosurface
clc,clear
cla
R = 10;
[x,y,z] = meshgrid(-R:0.3:R);
v = sin(x).*cos(y) + sin(y).*cos(z) + sin(z).*cos(x);
ix = x.^2+y.^2+z.^2 > R^2;
v(ix) = nan; % fill nan outside radius
p = isosurface(x,y,z,v,1); % change isovalue
patch(p,'facecolor','y','edgecolor','none')
camlight
material('metal')
axis vis3d
iso=-1 iso=0

4 Commenti
Bruno Luong
il 25 Nov 2020
After
p = isosurface(x,y,z,v,1)
the surface area is
V = p.vertices;
F = p.faces;
X = reshape(V(F,:),[size(F),3]);
C = cross(X(:,2,:)-X(:,1,:),X(:,3,:)-X(:,2,:),3);
Area = sum(sqrt(sum(C.^2,3)),1)/2
Bruno Luong
il 26 Nov 2020
Modificato: Bruno Luong
il 26 Nov 2020
v has value in [-3/2,3/2]. So is the isovalue.
If you select larger absolute value of isovalue, you'll get thinner gyroid, and vice versa.
Arthur Leonard
il 19 Apr 2021
Hello sir, how could I make the gyroid thick as it is on the pictures in the question?
Thanks for your help
darova
il 22 Mag 2021
What about simply use isosurface twice?
p = isosurface(x,y,z,v,1); % change isovalue
p = isosurface(x,y,z,v,0.98); % change isovalue
Categorie
Scopri di più su Surface and Mesh Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!