As far as I see, there are many repositories for 3D shapes. But in FEM and many other applications, a planar mesh domain is also very common. However, I did not find a mesh repository specially designed for 2D shapes. Since 2D meshes can be generated efficiently by some techniques like 2D alpha shape, Delaunay triangulation.

It is because in my research, I need a 2D dataset(including ~200 or more shapes) to test the performance.

  • $\begingroup$ I have no clue about the problem you are talking about, could you be a bit more specific? $\endgroup$ – Open the way Feb 17 '12 at 14:26
  • $\begingroup$ Are you looking for software to produce planar tesselations or examples of tesselations of different geometries? $\endgroup$ – Paul Feb 17 '12 at 18:52

There isn't any repository in which a comprehensive collection of 2D shapes are contained that I know of, most of the time, you need to generate the mesh by yourself for your research. While for some applied problems in mechanical engineering, you may need some commercial CAD software.

However, there are some free mesh generating packages which could handle arbitrary piecewise defined geometries in 2D. I'll name two here:

  • DistMesh, a very compact package written in C++ and MATLAB/Octave by P.-O. Persson, you could generate arbitrary 2D triangulations based on a distance function that describes what the boundary of the domain of your interest is like. In Persson's short introductory note, he showed the MATLAB implementation, also gave many examples of how to cook out a distance function for a certain shape, also a mesh size function that makes your mesh "better", ie finer in the corners, edges.

  • NETGEN is a cross-platform mesh generator as a C++ library, it has a UI, lets you import your own geometry/data, here is the user's manual.

Last, here is a link of a quite huge list of mesh generators compiled by Dr. Robert Schneider. Hope my answer would help.


Adding to the previous answer. There is also Gmsh and Octave package geometry has a simple interface function data2geo.m that allows to create meshes from polygons you have in your Octave workspace (creation of polygons is quite simple with the package itself). Additionally, the package geometry also has a SVG class that allows you to read shapes from SVG files created with Inkscape or similar software.

I know this sounds like propaganda, please forgive me, it is not. Your question seemed simple and this package is simple.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.