![example picture for contains()](/images/reference/Py5Shape_contains_0.png)

```python
def setup():
chr_p = py5.create_font('DejaVu Sans', 32).get_shape('p')
x_vertex_values = [chr_p.get_vertex_x(i) for i in range(chr_p.get_vertex_code_count())]
y_vertex_values = [chr_p.get_vertex_y(i) for i in range(chr_p.get_vertex_code_count())]
min_x, max_x = min(x_vertex_values), max(x_vertex_values)
min_y, max_y = min(y_vertex_values), max(y_vertex_values)
for _ in range(1000):
x, y = py5.random(min_x, max_x), py5.random(min_y, max_y)
if chr_p.contains(x, y):
py5.point(2 * x, 2 * y + py5.height / 2)
```