Hello,
Here's an example code using RTForceBasedLayout (from an example on this list a while back):
------------
view := RTView new. objects := RTObject withAllSubclasses. elements := (RTBox new size: #numberOfMethods; color: (Color blue alpha: 0.5)) elementsOn: objects. elements @ RTPopup new. view addAll: elements.
RTForceBasedLayout on: elements. view @ RTDraggableView . view open
------------
It produces:
[image: Inline image 1]
Is it possible to have the RTForceBasedLayout such that the result has no overlapping boxes (or rectangles)? I realize setting force: to some large negative number will help, but it's not ideal because it creates a lot of empty space.
In d3 (with SVG) there are a couple of examples of what I'd like to achieve (although they don't show edges):
https://bl.ocks.org/mbostock/1062383 (arbitrary shapes) https://bl.ocks.org/mbostock/3231298 (arbitrary circles that stick to each other)
The animation isn't important in my case. I wasn't sure where/how to apply the transform operation after a layout has been done in RTForceBasedLayout. Any hints?
Here's what my graph looks like: [image: Inline image 2] The code I have to produce this is too much to post, so I used the example at the top. My code also uses
RTForceBasedLayout new charge: -1000; on: b elements.
Cheers!