PathVisio / pathvisio

PathVisio - pathway editor, visualization and analysis software
http://www.pathvisio.org
Apache License 2.0
22 stars 21 forks source link

Algorithm for Curved Lines #37

Open ariutta opened 7 years ago

ariutta commented 7 years ago

Some of our Interactions and GraphicalLines use the line type Curved, and these generally look good, but occasionally they're a bit awkward.

For one example, this curve extracted from WP2447 overlaps the corner of the NO DataNode: wp2447a The movable midpoint only allows movement in the y direction, and moving it down also doesn't look quite right: wp2447b

For another example, you can see the curve at the bottom, which I've extracted one from WP3676. You'll notice several points where the sharpness of the curve abruptly changes. There are multiple algorithms for this use case, with different trade-offs for factors like aesthetics and difficulty to compute.

A commonly-used algorithm that could address both of these issues is the centripetal Catmull–Rom spline. Like our current implementation, it allows for curved lines through specified points, but it would allow for moving the curve off the DataNode in WP2447 and also might look nicer. It is already implemented in Java.

Is there interest in using a new algorithm, possibly the centripetal Catmull–Rom spline, for our curved Interactions and GraphicalLines? lumpy-curve

DeniseSl22 commented 5 years ago

I think this would be a great addition to the visual aspect. I'll add it to the PV4 list.