# tfg.rendering.utils.transform_homogeneous

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/graphics/blob/master/tensorflow_graphics/rendering/utils.py#L38-L60) |

Applies 4x4 homogenous matrix transformations to xyz vertices.

    tfg.rendering.utils.transform_homogeneous(
        matrices: type_alias.TensorLike, vertices: type_alias.TensorLike
    ) -> tf.Tensor

The vertices are input and output as as row-major, but are interpreted as
column vectors multiplied on the right-hand side of the matrices. More
explicitly, this function computes (MV\^T)\^T where M represents transformation
matrices and V stands for vertices.
Since input vertices are xyz they are extended to xyzw with w=1.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `matrices` | A tensor of shape `[batch, 4, 4]` containing batches of view projection matrices. |
| `vertices` | A tensor of shape `[batch, num_vertices, 3]` containing batches of vertices, each defined by a 3D point. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A \[batch, N, 4\] Tensor of xyzw vertices. ||

<br />