Create tetrahedral mesh out of figure

2 views (last 30 days)
Hi, have a cylinder plot as a surface in a figure. I'd like to create a tetrahedral mesh for the cylinder. I used the cylinder function
if true
[X,Y,Z]=cylinder(R,N)
surf(X,Y,Z)
end
Thanks a lot!

Accepted Answer

Ravi Kumar
Ravi Kumar on 11 Jul 2018
Assuming you are trying to use PDE Toolbox, you can use the multicylinder function to create cylinder geometry and mesh as shown below.
R = 0.1;
H = 0.5;
gm = multicylinder(R,H);
% Assign it to a generic PDE model and plot the geometry.
model = createpde;
model.Geometry = gm;
figure
pdegplot(model,'FaceLabels','on')
%Generate mesh and plot the mesh.
generateMesh(model)
figure
pdemesh(model);

More Answers (0)

Community Treasure Hunt

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

Start Hunting!