![example picture for begin_contour()](/images/reference/Py5Graphics_begin_contour_0.png)
```python
def setup():
py5.size(100, 100, py5.P2D)
g = py5.create_graphics(60, 60, py5.P2D)
with g.begin_draw():
with g.begin_closed_shape():
g.vertex(10, 10)
g.vertex(50, 10)
g.vertex(50, 50)
g.vertex(10, 50)
with g.begin_contour():
g.vertex(20, 20)
g.vertex(20, 40)
g.vertex(40, 40)
g.vertex(40, 20)
py5.image(g, 0, 0)
py5.image(g, 25, 25)
```