the-graph icon indicating copy to clipboard operation
the-graph copied to clipboard

Consider straight edges

Open bergie opened this issue 11 years ago • 9 comments

Currently the-graph draws "organic" curved edges:

screenshot 2014-02-25 at 16 07 00

In meemoo/dataflow we used edges with 45 degree angles:

This gave it a more "machine-like", and often cleaner look.

We could consider something like a hybrid of these, for example with edges that can only go at 45deg angles, but have rounded corners. That could fit well with the Tron-esque aesthetics.

This could be especially useful if autolayout noflo/noflo-ui#53 can give us edge bend coordinates

bergie avatar Feb 25 '14 15:02 bergie

I like the idea, but (when autolayout is off) we'll need smarter edge routing to prevent overlaps: https://github.com/the-grid/the-graph/issues/1#issuecomment-25921215

forresto avatar Feb 25 '14 17:02 forresto

I'd like to make some game-like UX tests.

We could empirically test whether curved or orthogonal edges are easier to trace.

forresto avatar Feb 25 '14 17:02 forresto

Asking if klay's 90° edge routing could be applied with manual node layout.

forresto avatar Mar 09 '14 14:03 forresto

http://rtsys.informatik.uni-kiel.de/jira/browse/KIPRA-1403

automata avatar Mar 09 '14 17:03 automata

Interesting tool for trying shortest-path algos: http://qiao.github.io/PathFinding.js/visual/ screen shot 2014-03-19 at 4 19 17 pm

forresto avatar Mar 19 '14 14:03 forresto

Interesting paper with nice results, http://www1.pub.informatik.uni-wuerzburg.de/pub/wolff/pub/nw-dlhqm-10.pdf

In this paper we present a new integral approach that solves the combined layout and labeling problem (each of which, independently, is known to be NP-hard) using mixed-integer programming (MIP). We identify seven design rules used in most real-world metro maps. We split these rules into hard and soft constraints and translate them into a MIP model. Our MIP formulation finds a metro map that satisfies all hard constraints (if such a drawing exists) and minimizes a weighted sum of costs that correspond to the soft constraints. We have implemented the MIP model and present a case study and the results of an expert assessment to evaluate the performance of our approach in comparison to both manually designed official maps and results of previous layout methods.

screen shot 2014-03-19 at 5 55 27 pm

forresto avatar Mar 19 '14 15:03 forresto

Would be good to find a method that can run separately from node autolayout, so edges can always be routed in a smart way.

Orthogonal Connector Routing from Monash looks good. This became libavoid. There is an emscripten port, but it is 2MB.

screen shot 2014-03-30 at 3 52 34 pm

One of most common earliest approaches was so-called maze running in which objects are assumed to be laid out on a uniform grid and a shortest path algorithm was employed to find the shortest path in the grid. The complexity is proportional to the size of the grid. In our context, the grid needs to be very fine because the user is free to place elements where they like and so the time complexity is prohibitively high. Our approach can be considered a modication to maze running in which we use a non-uniform grid whose mesh size is tailored to the geometry of the diagram.

Sounds like this step might be easier for us since we snap-to-grid. But it would also be nice to avoid node and group labels.


I started playing with the first step: http://jsbin.com/fofun/9/edit?js,output (fofun!)

forresto avatar Mar 30 '14 12:03 forresto

Check out the video called "Routing Highlights": http://www.altium.com/altium-designer/features?field_ad_version_tid=All&tid=stress-free

Might be able to pick some ideas from there.

xtrasmal avatar May 10 '15 14:05 xtrasmal

@forresto @bergie @automata Chamfered Routing: http://techdocs.altium.com/display/ADOH/Chamfered+Routing video http://www.altium.com/video-chamfered-routing

xtrasmal avatar May 10 '15 14:05 xtrasmal