How to plot contour in an arbitrary shape of area?

Linking also this post.