# Module: tfg.geometry.representation.ray

<br />

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

Tensorflow ray utility functions.

## Functions

[`intersection_ray_sphere(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/geometry/representation/ray/intersection_ray_sphere): Finds positions and surface normals where the sphere and the ray intersect.

[`sample_1d(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/geometry/representation/ray/sample_1d): Sample points on a ray using a sampling strategy (ray wrapper for sampling functions).

[`sample_inverse_transform_stratified_1d(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/geometry/representation/ray/sample_inverse_transform_stratified_1d): Sample points on a ray using inverse transform stratified sampling.

[`sample_stratified_1d(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/geometry/representation/ray/sample_stratified_1d): Sample points on a ray using stratified sampling.

[`triangulate(...)`](https://www.tensorflow.org/graphics/api_docs/python/tfg/geometry/representation/ray/triangulate): Triangulates 3d points by miminizing the sum of squared distances to rays.