Convert 2D triangular mesh to 3D prismatic mesh with example file. The following functions are included:
1-function [Nodes3D,Prisms] = Mesh2D_to_Mesh3D(Nodes,Triangles,t,z): Converts 2D triangular mesh to 3D prismatic mesh
2-function Plot_Mesh2D(Nodes,Triangles): Plots 2D triangular mesh
3-function Plot_Mesh3D(Nodes3D,Prisms): Plots 3D prismatic mesh
Nodes: is matrix of size (NNodes,2) containing the xy coordinates of the 2D mesh nodes.
Triangles: is matrix of size (NTriangles,3) containing the connectivity of the 2D mesh triangles
t: spacing of extrusion in z direction.
z: is a vector of size containing minimium and maximium range of extrusion in z direction.
Nodes3D: is matrix of size (NNodes3D,3) containing the xyz coordinates of the 3D mesh nodes.
Prisms: is matrix of size (NPrisms,6) containing the connectivity of the 3D mesh prisms.
Ayad Al-Rumaithi (2022). Convert 2D Triangular Mesh to 3D Prismatic Mesh (https://www.mathworks.com/matlabcentral/fileexchange/70102-convert-2d-triangular-mesh-to-3d-prismatic-mesh), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!