![example picture for apply_matrix()](/images/reference/Sketch_apply_matrix_0.png)

```python
def setup():
py5.size(100, 100, py5.P3D)
py5.no_fill()
py5.translate(50, 50, 0)
py5.rotate_y(py5.PI/6)
py5.stroke(153)
py5.box(35)
# set rotation angles
ct = py5.cos(py5.PI/9.0)
st = py5.sin(py5.PI/9.0)
# matrix for rotation around the Y axis
py5.apply_matrix(ct, 0.0, st, 0.0,
0.0, 1.0, 0.0, 0.0,
-st, 0.0, ct, 0.0,
0.0, 0.0, 0.0, 1.0)
py5.stroke(255)
py5.box(50)
```