Creating hollow sphere mesh with tetrahedral elements

조회 수: 3 (최근 30일)
Divyaprakash
Divyaprakash 2024년 3월 20일
답변: SOUMNATH PAUL 2024년 4월 8일
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?

답변 (1개)

SOUMNATH PAUL
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

카테고리

Help CenterFile Exchange에서 Delaunay Triangulation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by