Random Layout

In this section, you will learn about the Random Layout algorithm from the Views Graph Layout package (class IlvRandomLayout from the library ilvrandom).

Sample

Here is a sample drawing produced with the Random Layout:

Graph Drawing Produced with the Random Layout

What Types of Graphs?

Any type of graph:

  • Connected and disconnected

  • Planar and nonplanar graphs

Features

Random placement of the nodes of a grapher inside a given region.

Limitations

  • The algorithm computes random coordinates for the upper-left corner of the graphic objects representing the nodes. In some cases, this may not be appropriate.

  • To ensure that the nodes do not overlap the margins of the Layout Region , the algorithm computes the coordinates randomly inside a region whose width and height are smaller than the width and height of the layout region. The difference is the maximum width and the maximum height of the nodes, respectively. In some cases, this may not be appropriate.