필터 지우기
필터 지우기

How do I add isocaps to the other voids/around a gyroid?

조회 수: 2 (최근 30일)
Kabo
Kabo 2023년 10월 12일
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');
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개)

카테고리

Help CenterFile Exchange에서 Volume Visualization에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by