next up previous contents index
Next: Tutte's Algorithm ( TutteLayout Up: Force-Directed Layout Methods Previous: Force-Directed Layout Methods   Contents   Index


Spring Embedder ( SpringLayout )

Baseclasses


\begin{picture}(8,4)
\thicklines
\put(0,3){\framebox (5,1){\bf AGDModule}}\...
...){\vector(0,-1){1}}\put(3,0){\framebox (5,1){\bf SpringLayout}}
\end{picture}

Definition

The class SpringLayout represents the spring embedder layout algorithm by Fruchterman and Reingold [FR91].

This algorithm draws a general graph G straight-line. The drawing of a planar graph must contain crossings.

The idea of the algorithm is the one of simulating a system of mass particles. The vertices simulate mass points repelling each other and the edges simulate springs with attracting forces. The algorithm tries to minimize the energy of this physical system.

General Information

Algorithm
name Spring Embedder
long name Spring Embedder (Fruchterman/Reingold)
author T. Fruchterman, E. Reingold
Implementation
author S. Näher, D. Alberts
date April 1997
version

Pre- and Postcondition

precondition = $ \emptyset$
postcondition(PRE) = straight - line }

Optional Parameters Instances of SpringLayout provide the following optional parameters:

$ \bullet$
int iterations = 400
the number of main steps that the algorithm performs.
$ \bullet$
bool noise = true
determines if the algorithm performs random perturbations.

#include < AGD/SpringLayout.h >

Creation

SpringLayout L creates an instance L of type SpringLayout.

Operations

Standard Interface (Inherited Methods) The detailed description of these methods can be found in the manual entries of the base class (LayoutModule).

bool L.check(const graph& G, AgdKey& p)

void L.call(const graph& G, LayoutInterface& A)

Access to Options

int L.iterations()

void L.iterations(int i)

bool L.noise()

void L.noise(bool on)


next up previous contents index
Next: Tutte's Algorithm ( TutteLayout Up: Force-Directed Layout Methods Previous: Force-Directed Layout Methods   Contents   Index

© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13