|
Chapter 3. On the builtin graph layout algorithmsAs already said in Chapter 2 there are currently three layout algorithms available in Glay: Gem, J and JX. Gem was developed by Ingo Bruß and Ame Frick at the University of Karlsruhe. Their webpage is "http://www.info.uni-karlsruhe.de/~frick/gd/". The J algorithm was developed by us. Algorithm JX is a simple extension of J. In this chapter you find the theoretical description of these three (basically two) different layout algorithms. 3.1. The GEM algorithmThe Gem algorithm was developed by Ingo Bruss and Arne Frick, (Fakultät für Informatik, Universität Karlsruhe). The homepage of Gem is http://www.info.uni-karlsruhe.de/~frick/gd/gem3Ddraw/ The original paper on Gem: ftp://i44ftp.info.uni-karlsruhe.de/pub/papers/frick/gd95p.ps.gz We changed the input part and the visualization part of the gem3d program, but the algorithm is the original. You can still use the original gem input format, but now the input/output is separated, and we refer only to the algorithm when we talk about gem. 3.1.1. The gem input formatThe gem input file format is the following:
3.1.2. The algorithmThe gem layout algorithm is a force-directed simluated annealing algorithm. Each vertex is affected by four forces: gravity, vertex repulsion, edge attraction, and a random force. A very important and interesting aspect of the algorithm is how it cools the system. It defines a "local temperature" of each vertex, and modifies those independently. The "global temperature" is defined as the sum of the locals, but its only role is to stop the algorithm if it gets too low. We talk about these later, now let's iterate the forces that act in the algorithm:
3.1.2.1. A step of the algoritmIn each step the algorithm moves all the vertices one by one, in an order randomized at the beginning of the step. The move of a vertex depends only on the direction of the resultant force, not on the magnitude of it. The length of the move is "equal" to the temperature of the vertex. 3.1.3. SpecialitiesThe gem algorithm has protection against oscillation and rotation of vertices. These operate by heating and cooling the points depending on the directions of the sequential steps. In this algoritm this is the only source of the temperature-change: no global cooling at all! However, the vertices do not have impulse, they just step from a standing position each time, so this "oscillation protection" and "rotation protection" has a great deal of randomness in it: they realize roughly the global cooling, and a little "plus". And this little "plus" is what we think its power is...
3.1.4. Our experiences and opinions* The algorithm works very fast. * It is very strong in the case of some symmetric, sphere like graphs. * We feel that it lacks a little bit in the clarity of using notations of physics like temperature and heat, impulse, length, weight, degree, or force. * When we experimented with it and we needed to produce a layout of some real life biological network we needed some extra parameters, like for adjusting the strength of the attractive or the repulsive forces. The algorithm actually proved to be very sensitive to a lot of constants. * In some cases adding some global cooling (as present in traditional simulated annealing algorithms) made the results better. Finding the ideas in gem very interesting but the original source having these issues made us decide to write our own algorithm. We tried to incorporate all the best ideas, and make it even better. What we got is certainly different. It is slower, but for some cases we had nicer results. However, for some cases -- like for the buckey-ball -- Gem seems to be unbeatable and we think the original Gem very well deserves to be kept as one of the choices among the layout algorithms we have in Glay. |