Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your fixed nodes and so on.
I still have a bug with padding, and resizeStrategy, for example when you click on Example in the view.
Gofer it
smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm';
package: 'RoassalForceBaseLayout'; load.
Try this :
---------------------------
"Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes |
nodes := view raw elementsFromModels: n element model allSubclasses.
ROUnhighlightElements on: nodes ].
view shape rectangle size: 10.
view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 .
view layout: layout.
view applyLayout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open
---------------------------------------
Mathieu
This is more and more exciting :)
Doru
On Tue, Apr 30, 2013 at 1:28 PM, mathieubmddehouck@mailoo.org wrote:
**
Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your fixed nodes and so on.
I still have a bug with padding, and resizeStrategy, for example when you click on Example in the view.
Gofer it smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'RoassalForceBaseLayout'; load.
Try this :
"Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model
allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model
allSubclasses. ROUnhighlightElements on: nodes ].
view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass. layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 . view layout: layout. view applyLayout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open
Mathieu
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
excellent! I want to see that.
Stef
On Apr 30, 2013, at 1:28 PM, mathieubmddehouck@mailoo.org wrote:
Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your fixed nodes and so on.
I still have a bug with padding, and resizeStrategy, for example when you click on Example in the view.
Gofer it smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'RoassalForceBaseLayout'; load.
Try this :
"Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ]. view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ]. view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass. layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 . view layout: layout. view applyLayout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open
Mathieu
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Matthieu, you have done an impressive piece of work. I played a bit with it. Check out this cool video (athens based :-) https://dl.dropboxusercontent.com/u/31543901/online/ForceBasedLayout.mov
I slightly modified the following method, by adding a "super step" : -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ROForceBasedLayout_N>>step "run a step of the force layout algorithm"
| from to fp tp x y len k quad old | super step. "<<<<<<< line to add" edges do: [ :e | from := e from. fp := from position. to := e to. tp := to position. ... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Execute the following script, drag element and click on it:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ].
view interaction on: ROMouseClick do: [ :event | layout := ROForceBasedLayout_N new. layout fix: event element at: event element position. layout iterationsToSendEvent: 10. layout on: ROLayoutStep do: [ :ev | view raw signalUpdate. World doOneCycle ]. view layout: layout. view applyLayout ].
view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 .
view layout: layout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Good job Mathieu! Continue!
Cheers, Alexandre
On Apr 30, 2013, at 11:07 AM, stephane ducasse stephane.ducasse@free.fr wrote:
excellent! I want to see that.
Stef
On Apr 30, 2013, at 1:28 PM, mathieubmddehouck@mailoo.org wrote:
Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your fixed nodes and so on.
I still have a bug with padding, and resizeStrategy, for example when you click on Example in the view.
Gofer it smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'RoassalForceBaseLayout'; load.
Try this :
"Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ]. view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ]. view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass. layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 . view layout: layout. view applyLayout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open
Mathieu
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Excellent!
Could you publish the video somewhere so that we can advertise it?
Cheers, Doru
On May 1, 2013, at 12:54 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
Matthieu, you have done an impressive piece of work. I played a bit with it. Check out this cool video (athens based :-) https://dl.dropboxusercontent.com/u/31543901/online/ForceBasedLayout.mov
I slightly modified the following method, by adding a "super step" :
ROForceBasedLayout_N>>step "run a step of the force layout algorithm"
| from to fp tp x y len k quad old | super step. "<<<<<<< line to add" edges do: [ :e | from := e from. fp := from position. to := e to. tp := to position. ... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Execute the following script, drag element and click on it:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ].
view interaction on: ROMouseClick do: [ :event | layout := ROForceBasedLayout_N new. layout fix: event element at: event element position. layout iterationsToSendEvent: 10. layout on: ROLayoutStep do: [ :ev | view raw signalUpdate. World doOneCycle ]. view layout: layout. view applyLayout ].
view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 .
view layout: layout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Good job Mathieu! Continue!
Cheers, Alexandre
On Apr 30, 2013, at 11:07 AM, stephane ducasse stephane.ducasse@free.fr wrote:
excellent! I want to see that.
Stef
On Apr 30, 2013, at 1:28 PM, mathieubmddehouck@mailoo.org wrote:
Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your fixed nodes and so on.
I still have a bug with padding, and resizeStrategy, for example when you click on Example in the view.
Gofer it smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'RoassalForceBaseLayout'; load.
Try this :
"Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ].
view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 .
view layout: layout. view applyLayout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open
Mathieu
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Problem solving should be focused on describing the problem in a way that makes the solution obvious."
Good idea. First we need to make sure people can reproduce the example. Mathieu, I have seen some transcript show remaining in your code. Can you clean it a but and add the super call to step?
Once done, then I will make up additional examples. We should now be able to reproduce the D3 examples on spring layout hopefully.
Alexandre
Le 1 mai 2013 à 00:36, Tudor Girba tudor@tudorgirba.com a écrit :
Excellent!
Could you publish the video somewhere so that we can advertise it?
Cheers, Doru
On May 1, 2013, at 12:54 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
Matthieu, you have done an impressive piece of work. I played a bit with it. Check out this cool video (athens based :-) https://dl.dropboxusercontent.com/u/31543901/online/ForceBasedLayout.mov
I slightly modified the following method, by adding a "super step" :
ROForceBasedLayout_N>>step "run a step of the force layout algorithm"
| from to fp tp x y len k quad old | super step. "<<<<<<< line to add" edges do: [ :e | from := e from. fp := from position. to := e to. tp := to position. ... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Execute the following script, drag element and click on it:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ].
view interaction on: ROMouseClick do: [ :event | layout := ROForceBasedLayout_N new. layout fix: event element at: event element position. layout iterationsToSendEvent: 10. layout on: ROLayoutStep do: [ :ev | view raw signalUpdate. World doOneCycle ]. view layout: layout. view applyLayout ].
view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 .
view layout: layout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Good job Mathieu! Continue!
Cheers, Alexandre
On Apr 30, 2013, at 11:07 AM, stephane ducasse stephane.ducasse@free.fr wrote:
excellent! I want to see that.
Stef
On Apr 30, 2013, at 1:28 PM, mathieubmddehouck@mailoo.org wrote:
Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your fixed nodes and so on.
I still have a bug with padding, and resizeStrategy, for example when you click on Example in the view.
Gofer it smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'RoassalForceBaseLayout'; load.
Try this :
"Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ].
view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 .
view layout: layout. view applyLayout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open
Mathieu
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Problem solving should be focused on describing the problem in a way that makes the solution obvious."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
On May 1, 2013, at 2:44 PM, Alexandre Bergel alexandre.bergel@me.com wrote:
Good idea. First we need to make sure people can reproduce the example. Mathieu, I have seen some transcript show remaining in your code. Can you clean it a but and add the super call to step?
Once done, then I will make up additional examples. We should now be able to reproduce the D3 examples on spring layout hopefully.
Yes :)
I'm happy because it proves that this was not a problem of the language or the vm. Just the algorithm :)
Stef
Excellent!
Could you publish the video somewhere so that we can advertise it?
Cheers, Doru
On May 1, 2013, at 12:54 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
Matthieu, you have done an impressive piece of work. I played a bit with it. Check out this cool video (athens based :-) https://dl.dropboxusercontent.com/u/31543901/online/ForceBasedLayout.mov
I slightly modified the following method, by adding a "super step" :
ROForceBasedLayout_N>>step "run a step of the force layout algorithm"
| from to fp tp x y len k quad old | super step. "<<<<<<< line to add" edges do: [ :e | from := e from. fp := from position. to := e to. tp := to position. ... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Execute the following script, drag element and click on it:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ].
view interaction on: ROMouseClick do: [ :event | layout := ROForceBasedLayout_N new. layout fix: event element at: event element position. layout iterationsToSendEvent: 10. layout on: ROLayoutStep do: [ :ev | view raw signalUpdate. World doOneCycle ]. view layout: layout. view applyLayout ].
view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 .
view layout: layout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Good job Mathieu! Continue!
Cheers, Alexandre
On Apr 30, 2013, at 11:07 AM, stephane ducasse stephane.ducasse@free.fr wrote:
excellent! I want to see that.
Stef
On Apr 30, 2013, at 1:28 PM, mathieubmddehouck@mailoo.org wrote:
Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your fixed nodes and so on.
I still have a bug with padding, and resizeStrategy, for example when you click on Example in the view.
Gofer it smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'RoassalForceBaseLayout'; load.
Try this :
"Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ].
view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 .
view layout: layout. view applyLayout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open
Mathieu
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Problem solving should be focused on describing the problem in a way that makes the solution obvious."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi Mathieu,
Your force based layout is now in Roassal. In your test ROQuadTreeTest, there is a method #wellCreated: What is it for? Do we need it?
I have moved the old ROForceBasedLayout in a dedicated package, called with the sweet name RoassalOLDForceBasedLayout.
I have also removed your ROElement>>position: . An element should be moved around using translateTo:
Cheers, Alexandre
On May 1, 2013, at 12:36 AM, Tudor Girba tudor@tudorgirba.com wrote:
Excellent!
Could you publish the video somewhere so that we can advertise it?
Cheers, Doru
On May 1, 2013, at 12:54 AM, Alexandre Bergel alexandre.bergel@me.com wrote:
Matthieu, you have done an impressive piece of work. I played a bit with it. Check out this cool video (athens based :-) https://dl.dropboxusercontent.com/u/31543901/online/ForceBasedLayout.mov
I slightly modified the following method, by adding a "super step" :
ROForceBasedLayout_N>>step "run a step of the force layout algorithm"
| from to fp tp x y len k quad old | super step. "<<<<<<< line to add" edges do: [ :e | from := e from. fp := from position. to := e to. tp := to position. ... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Execute the following script, drag element and click on it:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ].
view interaction on: ROMouseClick do: [ :event | layout := ROForceBasedLayout_N new. layout fix: event element at: event element position. layout iterationsToSendEvent: 10. layout on: ROLayoutStep do: [ :ev | view raw signalUpdate. World doOneCycle ]. view layout: layout. view applyLayout ].
view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 .
view layout: layout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Good job Mathieu! Continue!
Cheers, Alexandre
On Apr 30, 2013, at 11:07 AM, stephane ducasse stephane.ducasse@free.fr wrote:
excellent! I want to see that.
Stef
On Apr 30, 2013, at 1:28 PM, mathieubmddehouck@mailoo.org wrote:
Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your fixed nodes and so on.
I still have a bug with padding, and resizeStrategy, for example when you click on Example in the view.
Gofer it smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'RoassalForceBaseLayout'; load.
Try this :
"Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ].
view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 .
view layout: layout. view applyLayout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open
Mathieu
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Problem solving should be focused on describing the problem in a way that makes the solution obvious."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Alex,
Really cool example. I ask Mathieu to update the code to include all the necessary code so now it should work without adding method by hand.
I know it might not be directly related to your example but I would like to run the example with Athens (the one in the video) so if the instructions are not lengthy, can you list them here? That would be beneficial for some of us who want to try Roassal with Athens.
tx, Usman
On Wed, May 1, 2013 at 12:54 AM, Alexandre Bergel alexandre.bergel@me.comwrote:
Matthieu, you have done an impressive piece of work. I played a bit with it. Check out this cool video (athens based :-) https://dl.dropboxusercontent.com/u/31543901/online/ForceBasedLayout.mov
I slightly modified the following method, by adding a "super step" :
ROForceBasedLayout_N>>step "run a step of the force layout algorithm"
| from to fp tp x y len k quad old | super step. "<<<<<<< line to add" edges do: [ :e | from := e from. fp := from
position. to := e to. tp := to position. ... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Execute the following script, drag element and click on it:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model
allSubclasses. ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model
allSubclasses. ROUnhighlightElements on: nodes ].
view interaction on: ROMouseClick do: [ :event | layout := ROForceBasedLayout_N new. layout fix: event element at: event element position. layout iterationsToSendEvent: 10. layout on: ROLayoutStep do: [ :ev | view raw signalUpdate.
World doOneCycle ]. view layout: layout. view applyLayout ].
view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass. layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 . view layout: layout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Good job Mathieu! Continue!
Cheers, Alexandre
On Apr 30, 2013, at 11:07 AM, stephane ducasse stephane.ducasse@free.fr wrote:
excellent! I want to see that.
Stef
On Apr 30, 2013, at 1:28 PM, mathieubmddehouck@mailoo.org wrote:
Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your
fixed nodes and so on.
I still have a bug with padding, and resizeStrategy, for example when
you click on Example in the view.
Gofer it smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'RoassalForceBaseLayout'; load.
Try this :
"Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model
allSubclasses.
ROHighlightElements on: nodes ]. view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model
allSubclasses.
ROUnhighlightElements on: nodes ]. view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass. layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 . view layout: layout. view applyLayout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open
Mathieu
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
With athens we should get nice looking graphs :) I'm eager to see that.
Stef On May 2, 2013, at 2:06 PM, Usman Bhatti usman.bhatti@gmail.com wrote:
Alex,
Really cool example. I ask Mathieu to update the code to include all the necessary code so now it should work without adding method by hand.
I know it might not be directly related to your example but I would like to run the example with Athens (the one in the video) so if the instructions are not lengthy, can you list them here? That would be beneficial for some of us who want to try Roassal with Athens.
tx, Usman
On Wed, May 1, 2013 at 12:54 AM, Alexandre Bergel alexandre.bergel@me.com wrote: Matthieu, you have done an impressive piece of work. I played a bit with it. Check out this cool video (athens based :-) https://dl.dropboxusercontent.com/u/31543901/online/ForceBasedLayout.mov
I slightly modified the following method, by adding a "super step" :
ROForceBasedLayout_N>>step "run a step of the force layout algorithm"
| from to fp tp x y len k quad old | super step. "<<<<<<< line to add" edges do: [ :e | from := e from. fp := from position. to := e to. tp := to position.
...
Execute the following script, drag element and click on it:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ]. view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ]. view interaction on: ROMouseClick do: [ :event | layout := ROForceBasedLayout_N new. layout fix: event element at: event element position. layout iterationsToSendEvent: 10. layout on: ROLayoutStep do: [ :ev | view raw signalUpdate. World doOneCycle ]. view layout: layout. view applyLayout ]. view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass. layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 . view layout: layout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Good job Mathieu! Continue!
Cheers, Alexandre
On Apr 30, 2013, at 11:07 AM, stephane ducasse stephane.ducasse@free.fr wrote:
excellent! I want to see that.
Stef
On Apr 30, 2013, at 1:28 PM, mathieubmddehouck@mailoo.org wrote:
Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your fixed nodes and so on.
I still have a bug with padding, and resizeStrategy, for example when you click on Example in the view.
Gofer it smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'RoassalForceBaseLayout'; load.
Try this :
"Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ]. view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ]. view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass. layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 . view layout: layout. view applyLayout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open
Mathieu
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
This is rather easy.
In a 2.0 image, load Athens, and Roassal.
Change the font to support FreeType fonts. This is necessarily else nothing can be done otherwise.
Then, you need to load the RoassalAthens package from the Roassal SmalltalkHub repository.
Open en easel, and select the athens Canvas. And voila
Alexandre
On May 2, 2013, at 8:06 AM, Usman Bhatti usman.bhatti@gmail.com wrote:
Alex,
Really cool example. I ask Mathieu to update the code to include all the necessary code so now it should work without adding method by hand.
I know it might not be directly related to your example but I would like to run the example with Athens (the one in the video) so if the instructions are not lengthy, can you list them here? That would be beneficial for some of us who want to try Roassal with Athens.
tx, Usman
On Wed, May 1, 2013 at 12:54 AM, Alexandre Bergel alexandre.bergel@me.com wrote: Matthieu, you have done an impressive piece of work. I played a bit with it. Check out this cool video (athens based :-) https://dl.dropboxusercontent.com/u/31543901/online/ForceBasedLayout.mov
I slightly modified the following method, by adding a "super step" :
ROForceBasedLayout_N>>step "run a step of the force layout algorithm"
| from to fp tp x y len k quad old | super step. "<<<<<<< line to add" edges do: [ :e | from := e from. fp := from position. to := e to. tp := to position.
...
Execute the following script, drag element and click on it:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ]. view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ]. view interaction on: ROMouseClick do: [ :event | layout := ROForceBasedLayout_N new. layout fix: event element at: event element position. layout iterationsToSendEvent: 10. layout on: ROLayoutStep do: [ :ev | view raw signalUpdate. World doOneCycle ]. view layout: layout. view applyLayout ]. view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass. layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 . view layout: layout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Good job Mathieu! Continue!
Cheers, Alexandre
On Apr 30, 2013, at 11:07 AM, stephane ducasse stephane.ducasse@free.fr wrote:
excellent! I want to see that.
Stef
On Apr 30, 2013, at 1:28 PM, mathieubmddehouck@mailoo.org wrote:
Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your fixed nodes and so on.
I still have a bug with padding, and resizeStrategy, for example when you click on Example in the view.
Gofer it smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm'; package: 'RoassalForceBaseLayout'; load.
Try this :
"Preambule. It includes the initialization. " | rawView view layout | rawView := ROView new. view := ROMondrianViewBuilder view: rawView. "enter your script below" "-------------" "-------------"
view interaction on: ROMouseEnter do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROHighlightElements on: nodes ]. view interaction on: ROMouseLeave do: [ :n | | nodes | nodes := view raw elementsFromModels: n element model allSubclasses. ROUnhighlightElements on: nodes ]. view shape rectangle size: 10. view nodes: (Collection withAllSubclasses). view edgesFrom: #superclass. layout := ROForceBasedLayout_N new. layout fix: (view nodes last) at: 450@450; gravityAt: 437@38 . view layout: layout. view applyLayout.
"-------------" "-------------" "Below is the initiation of the menu and opening the visualization" ROEaselMorphic new populateMenuOn: view. view open
Mathieu
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev