# Module: tfg.rendering.barycentrics

<br />

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

Set of functions to compute differentiable barycentric coordinates.

## Functions

[`compute_barycentric_coordinates(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/rendering/barycentrics/compute_barycentric_coordinates): Computes per-pixel barycentric coordinates.

[`compute_triangle_matrices(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/rendering/barycentrics/compute_triangle_matrices): Computes per-triangle matrices used in barycentric coordinate calculation.

[`differentiable_barycentrics(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/rendering/barycentrics/differentiable_barycentrics): Computes differentiable barycentric coordinates from a Framebuffer.

[`normalized_pixel_coordinates(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/rendering/barycentrics/normalized_pixel_coordinates): Computes the normalized pixel coordinates for the specified image size.