How do I add isocaps to the other voids/around a gyroid?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
clc
clear
close all
Nx = 10;
Ny = 10;
Nz = 10;
% Generate meshgrid for the entire structure
x = linspace(0, 2, Nx*10);
y = linspace(0, 2, Ny*10);
z = linspace(0, 2, Nz*10);
[X, Y, Z] = meshgrid(x, y, z);
ri=-0.35;
ra=-ri;
F=cos(2.*pi.*X).*sin(2.*pi.*Y)+cos(2.*pi.*Y).*sin(2.*pi.*Z)+cos(2.*pi.*Z).*sin(2.*pi.*X);
F=-(F+ri).*(F+ra);
[fs,v]=isosurface(x,y,z,F,0);
[fc,v2,c] = isocaps(x,y,z,F,0);
fn = [fs ; fc+length(v(:,1))];
vn = [v ; v2];
TO = triangulation(fn,vn(:,1),vn(:,2),vn(:,3));
trisurf(TO,'FaceColor','g','FaceAlpha',1,'EdgeAlpha',1,'EdgeColor','none')
view(3)
light;
lighting gouraud
camlight
title('Gyroid');
stlwrite(TO,'Gyroid.stl');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1509239/image.bmp)
I have added isocaps as above to close the wall between the 2 distinct volumes. I now want to add another isocap to the 4 sides of the gyroid so that it can be mesh'able for further pde numeric analysis. Please guide me.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Volume Visualization dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!