Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Path transformations
#5
Really nice to hear that somebody got interested.

I continue talking of the plugins (see posts #1 and #2). Now the third plugin,

Curl a polyline by a Bezier arc

This plugin is just an afterthought to the previous plugin, but it may be to some use. How to get it, see post #1.

This plugin is meant to be applied to paths consisting of straight line segments. I call such paths now "polylines" (rather than "line figures") because of how they are treated now. The plugin "curls" the line segments one by one. (That term "curling" is another difficult choice but I didn't find any better. Suggestions are welcome.)

The crucial aspect where this plugin differs from the previous one (post #3) is that instead of  transforming a line figure by one global transformation, this plugin transforms each line segment separately and keeps the nodes fixed. So, instead of one global transformation there is a series of local transformations.

To use the plugin you have to input two paths:

1. The Polyline: the path to be transformed (by right-clicking in Gimp's Paths tab).
2. The Shaper: a path with two anchors.

Of the polyline only the anchors are taken into account.

   

On the left you see the original Polyline and Shaper. On the right (red curve) is what the plugin does with default settings. It produces a copy of the Polyline where the line segments are replaced by copies of the Shaper.

The plugin allows setting "strength of curling". Default is 1; the effect you see above. If the strength is 0, there will be no curling and the line segments remain visually untouched (though the handles are changed).

But the plugin allows also a list as the input for the strength. Inputting list  .25, .5, .75, 1  you get what is on the left below:

   

There are several ways to input the list: either .25, .5, .75, 1 (numbers separated by commas), or (.25, .5, .75, 1) or [.25, .5, .75, 1] (Python tuple or list), or even [(k+1)*.25 for k in range(4)] (Python list).

The plugin allows to use the Shaper as reversed version. On the right is shown together in the same picture (1) the above result; (2) the same made with the Shaper reversed; and (3) the original Polyline.

Finally, there is some kind of a smoothing option. With it one can change the corners to smooth nodes. Since I don't know any good way to characterize the shape of a smooth corner (for example, one way would be to give handle directions and lengths, but that is hardly practical in the GUI), I didn't equip the plugin with any method to control the shape of the smoothing. Only one possible choice is implemented. I suggest you just experiment to see what smoothing does. And note that setting strength of curling to 0 and strength of smoothing to 1, you get smoothing of the original polyline without the Shaper being involved in any way.
Reply


Messages In This Thread
Path transformations - by Ottia Tuota - 04-22-2020, 10:34 AM
RE: Path transformations - by Ottia Tuota - 04-22-2020, 12:27 PM
RE: Path transformations - by Ottia Tuota - 04-24-2020, 10:28 AM
RE: Path transformations - by Zero01 - 04-24-2020, 09:25 PM
RE: Path transformations - by Ottia Tuota - 04-26-2020, 06:36 AM
RE: Path transformations - by Ottia Tuota - 05-04-2020, 10:01 AM
RE: Path transformations - by Ottia Tuota - 06-08-2020, 11:08 AM
RE: Path transformations - by Ottia Tuota - 06-09-2020, 05:08 PM
RE: Path transformations - by Ottia Tuota - 07-12-2020, 12:50 PM
RE: Path transformations - by Ofnuts - 07-12-2020, 11:33 PM
RE: Path transformations - by Ottia Tuota - 07-13-2020, 06:15 AM
RE: Path transformations - by Ottia Tuota - 07-13-2020, 05:15 PM
RE: Path transformations - by Ottia Tuota - 07-14-2020, 02:23 PM
RE: Path transformations - by Ofnuts - 07-14-2020, 04:02 PM
RE: Path transformations - by rich2005 - 07-15-2020, 09:20 AM
RE: Path transformations - by Ottia Tuota - 07-15-2020, 11:38 AM
RE: Path transformations - by Ottia Tuota - 07-16-2020, 11:42 AM
RE: Path transformations - by Ottia Tuota - 07-26-2020, 07:26 AM
RE: Path transformations - by Ottia Tuota - 08-05-2020, 06:13 PM
RE: Path transformations - by Ottia Tuota - 08-07-2020, 07:25 AM
RE: Path transformations - by Ottia Tuota - 08-11-2020, 08:39 AM
RE: Path transformations - by Ofnuts - 08-07-2020, 08:23 AM
RE: Path transformations - by Ottia Tuota - 08-07-2020, 12:06 PM
RE: Path transformations - by Ofnuts - 08-08-2020, 12:58 PM
RE: Path transformations - by Ottia Tuota - 08-08-2020, 01:33 PM
RE: Path transformations - by mahvin - 08-07-2020, 01:55 PM
RE: Path transformations - by Ottia Tuota - 08-07-2020, 07:26 PM
RE: Path transformations - by mahvin - 08-07-2020, 07:56 PM
RE: Path transformations - by Ottia Tuota - 08-07-2020, 08:15 PM
RE: Path transformations - by Ottia Tuota - 09-03-2020, 11:43 AM
RE: Path transformations - by Ottia Tuota - 09-04-2020, 11:29 AM
RE: Path transformations - by Ottia Tuota - 09-19-2020, 01:00 PM

Forum Jump: