I want to mesh a figure which contains three different materials (components) using Mathematica. Namely: **Black color: material A** **White color: material B** **Grey color: material C** in the attachment you will see this figure [![enter image description here][1]][1] I have used `ImageMesh[]` command in Mathematica, and it does not work. After the ImageMesh operation we can see such mesh type: [![enter image description here][2]][2] [1]: https://i.sstatic.net/zD7Ar.jpg [2]: https://i.sstatic.net/zUKGE.png