Understanding 2D Shapes and Patterns