2.3. igraph_layout_fruchterman_reingold_3d — 3D Fruchterman-Reingold algorithm.

int igraph_layout_fruchterman_reingold_3d(const igraph_t *graph, 
					  igraph_matrix_t *res,
					  igraph_integer_t niter, igraph_real_t maxdelta,
					  igraph_real_t volume, igraph_real_t coolexp,
					  igraph_real_t repulserad,
					  igraph_bool_t use_seed,
					  const igraph_vector_t *weight);

This is the 3D version of the force based Fruchterman-Reingold layout (see igraph_layout_fruchterman_reingold for the 2D version

This function was ported from the SNA R package.

Arguments: 

graph:

Pointer to an initialized graph object.

res:

Pointer to an initialized matrix object. This will contain the result and will be resized in needed.

niter:

The number of iterations to do.

maxdelta:

The maximum distance to move a vertex in an iteration.

volume:

The volume parameter of the algorithm.

coolexp:

The cooling exponent of the simulated annealing.

repulserad:

Determines the radius at which vertex-vertex repulsion cancels out attraction of adjacent vertices.

use_seed:

Logical, if true the supplied values in the res argument are used as an initial layout, if false a random initial layout is used.

weight:

Pointer to a vector containing edge weights, the attraction along the edges will be multiplied by these. It will be ignored if it is a null-pointer.

Returns: 

Error code.

Added in version 0.2.

Time complexity: O(|V|^2) in each iteration, |V| is the number of vertices in the graph.