[SOLVED] How the curved edges are drawn in the preview mode?

Screenshots, Vectorial Preview and printable exports
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
kaigephi
Posts:11
Joined:18 Mar 2011 12:28
[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
[SOLVED] How the curved edges are drawn in the preview mode?

Post by kaigephi » 06 Apr 2011 00:08

I am very interested in knowing how the curved edges are drawn in the "preview" mode.

First, what type of curve is it? A Bezier curve? And how is it computed?

Second, how to decide which side a edge bends to? There are always two options and how to choose between them? Is there any heuristics such as reducing the edge crossings or keeping all the edge bending to the same side?

I tried to look into the source code, but can't find where the code is (probably because I am very new to gephi :-)

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[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: How the curved edges are drawn in the "preview" mode?

Post by eduramiba » 06 Apr 2011 15:11

Hi kaigephi,

Yes the curves are bezier curves and the direction of the edge is clockwise (see http://forum.gephi.org/viewtopic.php?t=973)
And as far as I know there is no heuristic, just curved edges.

The class that calculates it is org.gephi.preview.EdgeImpl of PreviewImpl module.

Eduardo

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