03-12-2020, 01:21 PM
Hello!
Here are my first two plugins. With them you can draw parametric curves (or polar curves) in Gimp, approximately as Bézier curves. If you go to
http://kmarkku.arkku.net/
and click the link Simple Parametric Curves, and scroll down to the bottom, you find a button to download a .zip file. The items in the .zip file are:
- simple_parametric_curve.py (this is the plugins)
- doc.pdf (the documentation)
- example_files (this is a folder; see the site for explanation).
To install do:
1. Download the .zip file.
2. Unzip it.
3. Put the file simple_parametric_curve.py in your Gimp's plug-ins folder.
4. Restart Gimp.
5. Then the two plugins should appear in Gimp's menu at
Filters / Render / Parametric curves.
Their names are 'Simple parametric curve' and 'Simple polar curve'.
You had better then start by glancing through what the site tells. Then glance at the file doc.pdf. If the plugins interest you, you had better read doc.pdf more thoroughly at some point.
The task is to draw a parametric curve. That is what the first plugin, Simple parametric curve, does. The second, Simple polar curve, draws a curve given in polar form. (I assume here that you have some idea what those mean, so I don't explain). By "drawing" I mean that the plugin constructs the curve as a Bézier curve. In Gimp that means a path or a vectors object. So, if you want to stroke the curve, you have to do it yourself.
Since only very few curves can be faithfully represented as a Bézier curve, the produced path is just an approximation of the requested parametric curve.
Inkscape has a tool for such job. But it is even more simple than my plugins. To get an accurate result with it, one often has to make it to put control points densely on the curve. My plugin works in the opposite way: It tries to use only a sparse set of control points. That makes the problem of approximation quite non-trivial. The algorithms are my own.
You may wonder why I call my plugins simple. The reason is that I shall soon be sharing with you a third plugin which is developed much further, works much better, but is more difficult to use. (Though, if you feed the inputs in the GUI and not in an input file, there is not much difference. What these words mean, please see the explanations on the site or in doc.pdf.) I believe that in practice the simple plugins will be the ones most used.
I was hoping to include a picture but it seems that it cannot be uploaded here, only a link to somewhere else. So, please download the .zip file and look at the file doc.pdf there. It has some pictures.
Now I'd like to say a little of my background. I am a mathematician, already retired, who knows very little about computers or coding. Making such plugins came to me as a hobby some years ago. I was hooked and still am. I have been learning Python along the way. I used a much older version of my plugin when I wrote some lecture notes in mathematics as my last task before retirement in 2016. All curves I draw using my own plugin. So the plugin has been applied in a useful job even before publication.
If you have questions or problems with the plugins, please just ask.
Here are my first two plugins. With them you can draw parametric curves (or polar curves) in Gimp, approximately as Bézier curves. If you go to
http://kmarkku.arkku.net/
and click the link Simple Parametric Curves, and scroll down to the bottom, you find a button to download a .zip file. The items in the .zip file are:
- simple_parametric_curve.py (this is the plugins)
- doc.pdf (the documentation)
- example_files (this is a folder; see the site for explanation).
To install do:
1. Download the .zip file.
2. Unzip it.
3. Put the file simple_parametric_curve.py in your Gimp's plug-ins folder.
4. Restart Gimp.
5. Then the two plugins should appear in Gimp's menu at
Filters / Render / Parametric curves.
Their names are 'Simple parametric curve' and 'Simple polar curve'.
You had better then start by glancing through what the site tells. Then glance at the file doc.pdf. If the plugins interest you, you had better read doc.pdf more thoroughly at some point.
The task is to draw a parametric curve. That is what the first plugin, Simple parametric curve, does. The second, Simple polar curve, draws a curve given in polar form. (I assume here that you have some idea what those mean, so I don't explain). By "drawing" I mean that the plugin constructs the curve as a Bézier curve. In Gimp that means a path or a vectors object. So, if you want to stroke the curve, you have to do it yourself.
Since only very few curves can be faithfully represented as a Bézier curve, the produced path is just an approximation of the requested parametric curve.
Inkscape has a tool for such job. But it is even more simple than my plugins. To get an accurate result with it, one often has to make it to put control points densely on the curve. My plugin works in the opposite way: It tries to use only a sparse set of control points. That makes the problem of approximation quite non-trivial. The algorithms are my own.
You may wonder why I call my plugins simple. The reason is that I shall soon be sharing with you a third plugin which is developed much further, works much better, but is more difficult to use. (Though, if you feed the inputs in the GUI and not in an input file, there is not much difference. What these words mean, please see the explanations on the site or in doc.pdf.) I believe that in practice the simple plugins will be the ones most used.
I was hoping to include a picture but it seems that it cannot be uploaded here, only a link to somewhere else. So, please download the .zip file and look at the file doc.pdf there. It has some pictures.
Now I'd like to say a little of my background. I am a mathematician, already retired, who knows very little about computers or coding. Making such plugins came to me as a hobby some years ago. I was hooked and still am. I have been learning Python along the way. I used a much older version of my plugin when I wrote some lecture notes in mathematics as my last task before retirement in 2016. All curves I draw using my own plugin. So the plugin has been applied in a useful job even before publication.
If you have questions or problems with the plugins, please just ask.