Layout with bounds

Algorithms and parameters to put data in space
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
User avatar
martin.pernollet
Posts:18
Joined:05 Oct 2010 12:42
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Layout with bounds

Post by martin.pernollet » 17 Feb 2011 01:20

Hi again!
I have the need to set bounds for a layout, and started with a square contour. On a basic home made force layout, I applied a brutal force that forbids node to go out of the desired bounds by just sticking them on the border.
The problem with this approch is that strongly connected components approching a corner get sticked in: most of the node repel each other toward exterior which maintain some of the nodes in the corner. The nodes that do not stick to the corner get so much repulsion that they got rejected in the diagonal corner, and layout blinks this way.

I could try to tune the force parameters more smartly, but I think bounds with progressive force would avoid such schemas. Are there any other methods to cleanly bound layouts?

Regards,
Martin

User avatar
martin.pernollet
Posts:18
Joined:05 Oct 2010 12:42
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Layout with bounds

Post by martin.pernollet » 17 Feb 2011 12:06

Applying a strict border force on ForceAtlas works really perfectly: nodes will stick and smoothly slide along the border if there is too much repulsion coming from interior of the bounds.
The work is trivial to do, so I only send a picture, but ask me if you want a sample code.
Martin
Attachments
border.png

User avatar
rotten
Posts:34
Joined:27 Aug 2010 14:42
Location:Columbus, Ohio
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Layout with bounds

Post by rotten » 17 Feb 2011 15:46

You could use "Gravity" to represent an attraction force to the graph origin. You could try defining your Gravity so that it gets stronger the further away you get.

Depending on the shape of your gravity curve you would be able to define a "soft border", where tiny increments in distance from the origin would require significantly increasing forces to achieve.

You could also probably get fancy and have a multi-axis Gravity function so that you approximate a rectangle instead of a circle.

User avatar
rotten
Posts:34
Joined:27 Aug 2010 14:42
Location:Columbus, Ohio
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Layout with bounds

Post by rotten » 17 Feb 2011 17:13

Now you have me thinking about using overloaded gravity functions to maybe do other things with force-layout (which don't necessarily make any sense, but could be fun exercises) such as:
  • Concentrate nodes in radial or concentric "bands".

    Represent some sort of surface topology so that nodes tend to slide into "valleys" or "holes".

    Simulate non-euclidean geometric surfaces.

    'Taxicab' path visualizations by pushing nodes land on a grid.

elijah
Gephi Community Support
Posts:169
Joined:11 Sep 2010 18:09
Location:Stanford, CA
Contact:

Re: Layout with bounds

Post by elijah » 17 Feb 2011 17:15

rotten wrote:Now you have me thinking about using overloaded gravity functions to maybe do other things with force-layout (which don't necessarily make any sense, but could be fun exercises) such as:
  • Concentrate nodes in radial or concentric "bands".

    Represent some sort of surface topology so that nodes tend to slide into "valleys" or "holes".

    Simulate non-euclidean geometric surfaces.

    'Taxicab' path visualizations by pushing nodes land on a grid.
These could make a lot of sense in certain use cases.

User avatar
martin.pernollet
Posts:18
Joined:05 Oct 2010 12:42
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Layout with bounds

Post by martin.pernollet » 18 Feb 2011 10:42

rotten wrote: Concentrate nodes in radial or concentric "bands".
Right! I will most probably try to have nodes with a common "look" (e.g. degree and common neighbour) gathered so that they always appear closed in a region, and no other "kind of node" in the region. I'll tell you if I go further on this attempt.
rotten wrote: Represent some sort of surface topology so that nodes tend to slide into "valleys" or "holes".
Simulate non-euclidean geometric surfaces.
That sound interesting!
rotten wrote: 'Taxicab' path visualizations by pushing nodes land on a grid.
Sorry, I don't understand what you mean :roll:

Martin

User avatar
rotten
Posts:34
Joined:27 Aug 2010 14:42
Location:Columbus, Ohio
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Layout with bounds

Post by rotten » 18 Feb 2011 15:09


Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable