Replicating a path - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +--- Thread: Replicating a path (/Thread-Replicating-a-path) |
RE: Replicating a path - Ottia Tuota - 01-30-2022 (01-30-2022, 03:18 AM)teapot Wrote: ... Thanks for reporting. The same happens for me now but at some earlier version it worked all right. I shall investigate this. And thanks for your nice words. RE: Replicating a path - Ottia Tuota - 01-30-2022 (01-30-2022, 07:02 AM)Ottia Tuota Wrote:(01-30-2022, 03:18 AM)teapot Wrote: ... Should be fixed now. The new version 0.6 is in the same place: http://kmarkku.arkku.net/Path_replicate_files/Gimp_master.html RE: Replicating a path - denzjos - 01-30-2022 Ottia Tuota, nice job. I had the same problem setting the number of copies to zero, but I see that the plugin is updated. I tried the new version and now it is working ok. My example (set the length of the copies 30 for good result) [attachment=7422] RE: Replicating a path - Ottia Tuota - 01-30-2022 (01-30-2022, 04:27 PM)denzjos Wrote: Ottia Tuota, nice job. I had the same problem setting the number of copies to zero, but I see that the plugin is updated. I tried the new version and now it is working ok. My example (set the length of the copies 30 for good result) Nice picture. When I tried it I had to set 'no distortion' to get it to work. If I used distortion the plugin fell silent and my patience ran out before the plugin finished. Could be that it would finally have finished but the result would probably have been no good, the paths being so complicated. The plugin uses my own approximation algorithm to make Bezier curves and I don't quite trust it. Better think this plugin as experimental. I wish I could draw like that! RE: Replicating a path - denzjos - 01-30-2022 (01-30-2022, 04:43 PM)Ottia Tuota Wrote:(01-30-2022, 04:27 PM)denzjos Wrote: Ottia Tuota, nice job. I had the same problem setting the number of copies to zero, but I see that the plugin is updated. I tried the new version and now it is working ok. My example (set the length of the copies 30 for good result) Well, I think the result is more than acceptable : [attachment=7423] RE: Replicating a path - Ottia Tuota - 01-30-2022 (01-30-2022, 05:34 PM)denzjos Wrote:(01-30-2022, 04:43 PM)Ottia Tuota Wrote:(01-30-2022, 04:27 PM)denzjos Wrote: Ottia Tuota, nice job. I had the same problem setting the number of copies to zero, but I see that the plugin is updated. I tried the new version and now it is working ok. My example (set the length of the copies 30 for good result) I see, one has just to wait long enough. This shows that the plugin could be faster, and perhaps I should trust it more. But there is one problem case: On the cat's head one disfigured mouse could be deleted. Perhaps that is a case of a too tight bend. RE: Replicating a path - teapot - 02-01-2022 Ottia Tuota, Thank you for the update, number of copies set to 0 is working here too. The distort takes a long time but is well worth it, I like it's results. [attachment=7425] RE: Replicating a path - Ottia Tuota - 02-01-2022 (02-01-2022, 03:45 AM)teapot Wrote: Ottia Tuota, Thanks. I have an idea how I could make it faster. We shall see if anything comes of it. RE: Replicating a path - Ottia Tuota - 02-02-2022 The plugin "Replicate path along another path" is now faster. New version 0.7 is in http://kmarkku.arkku.net/Path_replicate_files/Gimp_master.html That mouse-and-cat example of denzjos came from 167.688 seconds down to 16.635 seconds. Not bad. (The times were taken on my old and slow machine.) For anybody interested: The main culprit was the procedure pdb.gimp_vectors_stroke_point_at_dist(). The plugin uses it to find on the Target path points at some given distance x from the start. And it is called veeery many times. Experimenting now a little I noticed that its running time depends on the number of anchors. I did like this: I started with a 2-anchor path. Then I clicked to the path more and more anchors, thus subdividing the path to more and more segments. And I saw that doubling the number of segments almost doubles the running time! That happens even if the curve remains the same, only the number of anchors on it grows. So I believe that the procedure works segment by segment, and not with the curve as a whole. So, when my plugin got as input a Target path with a large number of anchors, like denzjos' cat, it took a long time to run. What I did was that now the plugin first chops the Target path at its anchors to shorter paths, each with only 2 anchors. And I arranged things so that it suffices to call that pdb procedure only for one such small piece at a time. And at the same time some other time-consuming routines became by-passed. That's that. But complicated paths may still mean long running times. I hope I didn't mess anything up. Please report if the plugin does something odd. I put here a little playing. The Base is the little red line, precisely one sixth of the width of the Source. Though I have said that the Base should be long enough, it seems that it is not always so very necessary. Then I ran the plugin with suitable parameters, joined the strokes of the resulting path, and deleted some anchors at both ends. Finally path to selection and bucket fill. [attachment=7427] RE: Replicating a path - teapot - 02-03-2022 Hi Ottia Tuota, Thank you for the update. The distort is certainly much faster. For my first flowers image in post #30, the old timing was approx. 327 seconds, and it's now approx. 19 seconds. |