# tfg.geometry.representation.point.project_to_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/point.py#L77-L117) |

Computes the projection of a M-d point on a M-d ray.

    tfg.geometry.representation.point.project_to_ray(
        point: type_alias.TensorLike,
        origin: type_alias.TensorLike,
        direction: type_alias.TensorLike,
        name: str = 'point_project_to_ray'
    ) -> tf.Tensor

<br />

<br />

<br />

| ## Note ||
|---|---|
| In the following, A1 to An are optional batch dimensions, which must be broadcast compatible. ||

<br />

<br />

<br />

<br />

| ## Args ||
|---|---|
| `point` | A tensor of shape `[A1, ..., An, M]`. |
| `origin` | A tensor of shape `[A1, ..., An, M]`. |
| `direction` | A tensor of shape `[A1, ..., An, M]`. The last dimension must be normalized. |
| `name` | A name for this op. Defaults to "point_project_to_ray". |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor of shape `[A1, ..., An, M]` containing the projected point. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If the shape of `point`, `origin`, or 'direction' is not supported. |

<br />