Hi!
I had fun implementing a spring layout in mondrian. Try:
-=-=-=--=-=-=-=--=-=-=-=--=
| view |
view := MOViewRenderer title: 'Spring layout example'.
view interaction refreshLayoutEvery: 30.
view shape rectangle size: 15.
view nodes: (1 to: 30).
view edges: (1 to: 30) from: #yourself to: [:v | v \\ 5].
view springLayout.
view open
-=-=-=--=-=-=-=--=-=-=-=--=
A spring layout was my very first program in Smalltalk, about 10 years
ago. It was fun to show it to Michele. Fortunately for me, he spoke
French :-)
In its actual state, the layout does not scale. If you have more than
100 nodes, it will become very slow. The algorithm complexity is quite
bad. I had some ideas on making it a bit more scalable.
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.