Spring Graph Layout Method
If the constantonly=true option is given then a pure constant repulsive force for the vertices. This layout style is equivalent to spring for Maple 15 and earlier versions.
initial=Array, Matrix, list, name, or string
The initial option is used to specify the initial vertex location before solving the spring system. By default it is random and uses randomly chosen points. The name structured will start the vertex in a structured grid. The names of other layout methods can be used to use their previously computed output stored in the Graph data structure. Finally, a list, Array, or Matrix of point locations may be given.
The maximum number of iterations that will be used to solve the ODE system. Default is 20000. The actual number of iterations used will be displayed if infolevel[GraphTheory] is set to 2 or higher.
If set to true, an older version of the spring code will be called rather than the compiled C code used by default. This code just supports the constant force only model and doesn't support the iterations option.
The number of frames of animation returned from the layout. The default is 50. If the option animate was not provided to DrawGraph this option will be ignored.
The spring layout method is so named because it simulates a physical model where the vertices are modeled as protons repelling each other and the edges are modeled as springs attracting adjacent vertices. This leads to a dense system of nonlinear ODEs to be solved and so this option becomes quite expensive beyond 100 vertices. At present the spring option requires that the graph be connected.
This layout method works in two and three dimensions and for animations.
G≔Graph 1: an undirected unweighted graph with 4 vertices and 4 edge(s)
The following use animations to illustrate using different initial points
P≔Graph 2: an undirected unweighted graph with 10 vertices and 15 edge(s)
H≔Graph 3: an undirected unweighted graph with 8 vertices and 12 edge(s)
Download Help Document
What kind of issue would you like to report? (Optional)