Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
I have no clue about the problem you are talking about, could you be a bit more specific? – flow Feb 17 '12 at 14:26
Are you looking for software to produce planar tesselations or examples of tesselations of different geometries? – Paul Feb 17 '12 at 18:52
up vote 3 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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