2.2. igraph_layout_sphere — Places vertices (more or less) uniformly on a sphere.

int igraph_layout_sphere(const igraph_t *graph, igraph_matrix_t *res);

The algorithm was described in the following paper: Distributing many points on a sphere by E.B. Saff and A.B.J. Kuijlaars, Mathematical Intelligencer 19.1 (1997) 5--11.

Arguments: 

graph:

Pointer to an initialized graph object.

res:

Pointer to an initialized matrix object, the will be stored here. It will be resized.

Returns: 

Error code. The current implementation always returns with success.

Added in version 0.2.

Time complexity: O(|V|), the number of vertices in the graph.