Simple Parametric Curves

Of the two simple plugins, the first takes as input a parametric curve and draws an approximate B├ęzier curve. (Mathematically, a parametric curve is of the form f(t)=(x(t),y(t)) in Cartesian coordinates, where t is the parameter.) The second plugin does the same for a curve given in the polar form.

The central aim of the plugins is to achieve a reasonably good approximation by resorting to only a small number of control points. This is contrary to the naive idea of just inserting control points more densely on the curve in order to reach the desired accuracy.

How to apply the plugins

The general view

To install the simple plugins, start by downloading the zip file. Unzip it. It contains three items, two files and one folder:

The file is the most important. It creates the two simple plugins when you insert it in your user folder for Gimp plugins, called <something>/plug-ins, and restart Gimp. The second file, doc.pdf, is the documentation (instructions), and you had better first at least have a look at it and when you have time to read it more closely. The folder example_files contains some example files. Namely, there are two ways to feed inputs to the plugins: from the GUI, or from a user-written file, and the example files are examples of the latter method.

When you have put the file in your plug-ins folder and restarted Gimp, the two plugins should appear in Gimp's menu as

    Image > Filters > Render > Parametric Curves > Simple parametric curve


    Image > Filters > Render > Parametric Curves > Simple polar curve

In the file doc.pdf  you will find detailed instructions about the usage of the plugins, but a brief overview is given here to make the start easier.

We talk first of the plugin Simple parametric curve. There are two ways to apply it:

All this holds true also for the other simple plugin, Simple polar curve, except that instead of two functions x(t)and y(t), you need to input one function r(t).

How to apply the plugins from the GUI

Never mind at start about the example files. You can get acquainted with the plugins by trying what you can do with the GUI. At the location at Gimp's menu mentioned above you find the two simple plugins. Choose the first one, Simple parametric curve: Clicking its name you open its GUI. If you then click the OK button at the lower edge, the plugin should draw a half circle. (Not very remarkable: that's just what the built-in default inputs do.) Then go ahead and try to run the plugin again, changing some of the settings to see what they do. Note that some of the inputs, such as the starting value and ending value for the parameter t, should be in Python syntax: For example, the default value for the ending values is "pi" (that is 180 degrees in radians), but if you wish to try 360 degrees, instead, you should enter "2*pi" (without the apostrophes!).

One entry asks to input a list of values of t, but you had better ignore this until you have read from doc.pdf what it means (but if you want to try, go ahead!). The same advice goes for reading inputs from a file.

You will soon be wishing to draw some other curve. To this end you have to input your curve as a parametric curve by typing a pair of functions x(t)and y(t) in Python syntax into the corresponding slots in the GUI. The standard mathematical functions of Python are available.

For example, to draw the exponential function y = e x, you would write "t" in the slot for the function x(t), and "exp(t)" in the slot for the function y(t) (omitting the apostrophes!). Then hit OK. If you are not satisfied with the result, you can try setting the starting  and ending values for t to "-2" and "2", respectively, or whatever values you like. Make sure that closed is set to "No".

Another example could be the astroid: The functions x(t)and y(t) are "cos(t)**3" and "sin(t)**3", respectively, and  the starting and ending values are "0" and "2*pi", respectively. Click also the button for closed to set it to "Yes"; the purpose is to instruct Gimp to make the path closed.

More examples you can find in the file doc.pdf and in the folder example_files/param.

Everything said above is true, with obvious modifications, for the other plugin Simple polar curve. Open its GUI and try the default curve there: just click OK. A logarithmic spiral arc will appear on the screen. Experimenting further should now be easy if you just know what a curve in a polar form means.

At this point it is probably advisable to have a closer glance at the file doc.pdf, and then you are ready to really try what the plugins can and what they cannot do.


Click to download the two plugins as a .ZIP file