Pattern function

Create a pattern.