Generate finite element mesh based on 2D or 3D multi-phase image. For image-based finite element analysis.
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
- Version 2.60 can generate tetrahedral mesh based on 3D voxel image! See demo20 and Gallery.
- Version 2.45 can export image boundaries as dxf file (CAD).
- Version 2.2.0 can use Gmsh as mesh generator (unstructured quadrilateral mesh).
- Version 2.1.6 updates the DOI. Im2mesh is now citable.
- Accurately preserve the contact details between different phases.
- Incorporates polyline smoothing and simplification
- Able to edit polygonal boundary before mesh generation.
- Support phase selection and local mesh refinement.
- 4 mesh generators are available for selection: MESH2D, generateMesh, Gmsh, and pixelMesh.
- Graphical user interface (GUI) version is available as a MATLAB app and as a standalone desktop application.
- inp file with boundary node set (Abaqus)
- bdf file (Nastran bulk data, compatible with COMSOL),
- msh file (Gmsh mesh format)
- stl file
- MATLAB PDE model object
- For other formats (such as vtk), you can import the generated msh file into software Gmsh and then export.
- If you're using MATLAB, examples are live script mlx files (demo01.mlx ~ demo20.mlx). If you find some text in the mlx file is missing, please read the html file instead.
- If you're using Octave, examples are m files (demo1.m ~ demo10.m).
- Examples are also available as html files in the folder "demo_html".
- demo01 - Demonstrate function im2mesh, which use MESH2D as mesh generator.
- demo02 - Demonstrate function im2meshBuiltIn, which use MATLAB built-in function generateMesh as mesh generator.
- demo03 - Export: save mesh as inp, bdf, msh, and stl file; save image boundary as dxf file, geo file, or PSLG data.
- demo04 - What is inside im2mesh.
- demo05 - Avoid sharp corner
- demo06 - Thresholds in polyline smoothing
- demo07 - Parameter hmax and grad_limit in mesh generation
- demo08 - Function plotMeshes
- demo09 - How to select phases for meshing
- demo10 - Different polyline smoothing techniques
- demo11 - Find node sets at the interface and boundary
- demo12 - Function pixelMesh (pixel-based quadrilateral mesh)
- demo13 - Use Gmsh as mesh generator
- demo14 - Use polyshape to define geometry for mesh generation
- demo15 - Edit polygonal boundaries before meshing
- demo16 - Add mesh seeds/nodes
- demo17 - Refine mesh
- demo18 - 2D image to tetrahedral mesh
- demo19 - Function voxelMesh (voxel-based hexahedral mesh)
- demo20 - 3D voxel image to tetrahedral mesh
- MESH2D by Darren Engwirda
- dpsimplify by Wolfgang Schwanghart
- p_poly_dist by Michael Yoshpe
- MeshQualityQuads by Allan Peter Engsig-Karup
- ccma by UniBwTAS
- XtalMesh by Jonathan Hestroffer
Cite As
Ma, Jiexian, and Yuanyuan Li. Im2mesh: A MATLAB/Octave Package for Generating Finite Element Mesh Based on 2D Multi-Phase Image. Zenodo, 2025, https://doi.org/10.5281/ZENODO.14847059.
Once my paper is published, I will update a new DOI here.
Acknowledgements
General Information
- Version 2.62 (21.1 MB)
-
View License on GitHub
MATLAB Release Compatibility
- Compatible with R2017b and later releases
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 2.62 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.62 |
||
| 2.61 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.61 |
||
| 2.60 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.60 |
||
| 2.51 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.51 |
||
| 2.49 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.49 |
||
| 2.47 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.47 |
||
| 2.45 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.45 |
||
| 2.42 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.42 |
||
| 2.40 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.40 |
||
| 2.36 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.36 |
||
| 2.35 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.35 |
||
| 2.33 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.33 |
||
| 2.30 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.30 |
||
| 2.26 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.26 |
||
| 2.2.3 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/v2.2.3 |
||
| 2.2.1 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/2.2.1 |
||
| 2.2.0 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/2.2.0 |
||
| 2.1.9 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/2.1.9 |
||
| 2.1.8 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/2.1.8 |
||
| 2.1.6 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/2.1.6 |
||
| 2.1.5 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/2.1.5 |
||
| 2.1.1 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/2.1.1 |
||
| 2.1.0 | See release notes for this release on GitHub: https://github.com/mjx888/im2mesh/releases/tag/2.1.0 |
||
| 1.88 | Update Description |
||
| 1.87 | Update Description |
||
| 1.86 | add note |
||
| 1.85 | Add comments & description |
||
| 1.84 | Revise Description |
||
| 1.83 | Revise summary |
||
| 1.82 | Update description |
||
| 1.81 | Update description |
||
| 1.80 | Add im2meshBuiltIn.m, poly2meshBuiltIn.m
|
||
| 1.76 | improve getCtrlPnts
|
||
| 1.75 | Add new parameter 'select_phase' |
||
| 1.71 | Revise description |
||
| 1.7 | Add two new parameters for mesh generation |
||
| 1.6 | make im2Bounds() more readable using getExactBounds() |
||
| 1.5 | improve im2Bounds.m and getCtrlPnts.m
|
||
| 1.1.1 | update description |
||
| 1.1 | revise demo(), add examples
|
||
| 0.9 | Improve time efficiency of getCtrlPnts(). Faster. Add new parameter - tf_avoid_sharp_corner. Able to avoid non-convergence when meshing.
|
||
| 0.8.2 | new image for cover |
||
| 0.8.1 | revise getCtrlPnts() for time efficiency |
||
| 0.8.0 | debug
|
||
| 0.7.0 | debug
|
||
| 0.6.2 | update description |
||
| 0.6.1 | update description |
||
| 0.6.0 |
