sphere_to_normals#

hypercoil.functional.sphere.sphere_to_normals(coor: Tensor, r: float = 1) Tensor[source]#

Convert spherical coordinates from latitude/longitude format to normal vector format. Note this only works for 2-spheres as of now.

Dimension:

Input : \((*, 2)\) Output : \((*, 3)\)

Parameters:
coorTensor

Tensor containing 2-tuple coordinates indicating the latitude and longitude of each point.

rfloat (default 1)

Radius of the sphere.

Returns:
coorTensor

Tensor containing 3-tuple coordinates indicating zero-centred x, y, and z values of each point at radius r.