Fenics documentation example. Use the mshr component of fenics - see mshr documentation.