Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pl_stroke_arrows, a GIMP 3.0 python plugin to draw simple arrows
#8
(08-13-2025, 11:33 AM)denzjos Wrote: I tested the plugin on different paths with different parameters and I found no errors. Thanks

Thanks a lot for your feedback ! This is the first user feedback since I posted it yesterday on different channel, and is really appreciated!

If you have any ideas for features you'd like added, please ask. I can't work on the plugin at the moment, but I'll consider it later on.

Also, I struggled to find a good name for the "anchor offset" parameter, which determines the shape of the back of the arrowhead. I went from "harpoon factor" to "anchor position", and finally "anchor offset", but I'm still not fully convinced. Any ideas?

Ofnuts
(08-13-2025, 09:20 AM)Scallact Wrote: Do you suggest that we can find the exact t parameter of a specific point on the curve by solving a third degree equation? I found a paper about this, but it's unreadable to me given my level of math notation understanding.


Quote:Yes, this is what I did for ofn-path-bend (in fact this is why ofn-path-bend is so fast). Your problem of course is that you have one equation per  Bézier segment, so you are not looking just for t but for t in the adequate segment. However, 1) you can often guess which segment, and 2) in most case for the other segments you won't get a solution for t in [0,1] and when you have one you can check that the solution for ŧ works for bother x and y (and unless you path does a loop there will be only one such pair in it).


OK, I'll look at your code to see how you solved this.

For the segment, I only test the last and second to last segments for the anchor point. If the end of the curve has many packed points, the plugin fails. It's such an edge case that I didn't feel the need to generalize.
Reply


Messages In This Thread
RE: pl_stroke_arrows, a GIMP 3.0 python plugin to draw simple arrows - by Scallact - 08-13-2025, 12:30 PM

Forum Jump: