Spring layout in mondrian

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Spring layout in mondrian

Alexandre Bergel
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
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev