conformal.py
is a plugin-in for The Gimp which allows
visualisation of conformal maps.
You need gimp
and the python scripting extension to Gimp. It is
included in newer versions of Gimp, before it was available in packages
named gimp-python
or similar.
You can install conformal.py
as a local user or system wide:
Copy conformal.py
to the plug-ins
subdirectory of your Gimp
directory, usually $HOME/.gimp-2.*/plug-ins/
on Linux, and make sure
that it is executable (chmod +x conformal.py
).
Copy conformal.py
to the plug-ins
subdirectory of your system Gimp
directory, usually /usr/lib/gimp/2.*/plug-ins/
or (similar) on Linux,
and make sure that it is executable (chmod a+rx conformal.py
).
After starting The Gimp, you find the conformal plug-in in the Create
submenu of the File
menu. From the dialogue, you can adjust these parameters:
width
,height
-
The dimensions of the new image.
code
-
The python code which is executed for every single pixel of the image. The code can use the value of the complex number
z
(which represents the current pixel) and should assign a value tow
which will be considered the (mapping) image ofz
. x left
,x-right
-
The range of x-values (real parts) which is mapped to the horizontal image axis.
y top
,y bottom
-
The range of y-values (imaginary parts) which is mapped to the vertical image axis.
grid spacing
-
The spacing of the generated coordinate grid.
checker board
-
Use a checker board instead of a grid.
gradient
-
The gradient representing the argument of the complex number.
The plugin-in then creates a new image with three layers:
Grid
-
This layer paints the conformally transformed coordinate grid.
Log. modulus
-
This layer adds a shading corresponding to the absolute value on a logarithmic scale, i.e. one cycle (from white to black) of the shading means doubling the modulus: the fractional part of
lb |w|
is used as an index into the default white-black gradient. Argument
-
This layer is coloured using the value of the gradient at an index corresponding to
arg w
.
The two topmost layers have transparency and layer mode set appropriately, but feel free to experiment with these, as well as turning some layers off, depending on your goal: produce instructive illustrations, or simply beautiful pictures!