.. raw:: html
.. raw:: html

Description
-----------
Multiplies the current matrix by the one specified through the parameters. This is very slow because it will try to calculate the inverse of the transform, so avoid it whenever possible. The equivalent function in OpenGL is ``gl_mult_matrix()``.
Underlying Processing method: `applyMatrix
.. image:: /images/reference/Sketch_apply_matrix_0.png
:alt: example picture for apply_matrix()
.. raw:: html

.. code:: 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)
.. raw:: html