Creating hollow sphere mesh with tetrahedral elements
1 次查看(过去 30 天)
显示 更早的评论
With the help of this file in file exchange I am creating points on the inner and outer surface of a hollow sphere.
clear; clc; close all;
% Description: Attempt at generating a meshed spherical shell with
% tetrahedral elements
scale = 1.2;
generation = 3;
[P1,~] = generateSphereMesh(generation,'tet');
P2 = P1*scale;
X1 = P1(1,:); Y1 = P1(2,:); Z1 = P1(3,:);
X2 = P2(1,:); Y2 = P2(2,:); Z2 = P2(3,:);
X = [X1(:);X2(:)];
Y = [Y1(:);Y2(:)];
Z = [Z1(:);Z2(:)];
DT = delaunay(X,Y,Z);
figure;
XX = [X(:) Y(:) Z(:)];
tetramesh(DT,XX,'FaceAlpha',0.1)
Currently I get tetrahedrals in the entire sphere.
I need only the shell to be filled with tetrahedrals when I use delaunay Triangulation. Is it possible?
0 个评论
回答(1 个)
SOUMNATH PAUL
2024-4-8
Hi,
It looks like you trying to generate a mesh that only fills the shell of a hollow sphere rather than the entire volume. The current method used is generating points on the inner and outer surfaces but then uses “Delaunay triangulation” on all these points which fills the entire volume between these surfaces with tetrahedral.
Kindly use “Constrained Delaunay triangulation” which will allow you to define the outer and inner surfaces as constraints ensuring the tetrahedra's are only generated between these boundaries.
Here is how you can do that, refer to the following link: https://in.mathworks.com/help/matlab/math/delaunay-triangulation.html#bspqi8a-12%22 (check the section "constrained delaunay triangulation")
Hope it helps!
Regards,
Soumnath
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!