Fractals/Computer graphic techniques/2D/exp

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Disambiguation[edit | edit source]

Exponential mapping of the plane is:

Exponential mapping of the plane is not

  • the Julia set or Mandelbrot set of the exponential function ( exponentia map)
  • Logarithmic scale on one axis[1]
  • Logarithmic scale on both axes: Log-log scale plot[2]
  • polar azimuthal equidistant projection ( Exponential map in Riemannian geometry)[3]
  • The exponential operator, anamorphosis operator which can be applied to grayscale images.[4]

Compare exponential function by different input

  • single number ( 0D space) gives natural exponent of the number
  • number line ( 1D space). Exponential scale is not used. Logarithmic scale is used for exponential data. It gives a linear function.[5]
  • plane ( 2D space) gives exponential mapping

number[edit | edit source]

In mathematics, the logarithm is the inverse function to exponentiation. That means the logarithm of a number x to the base b is the exponent to which b must be raised, to produce x

is equivalent to

if b is a positive real number. (If b is not a positive real number, both exponentiation and logarithm can be defined but may take several values, which makes definitions much more complicated.)[6]

scale[edit | edit source]

A logarithmic scale (or log scale) is a way of displaying numerical data over a very wide range of values in a compact way—typically the largest numbers in the data are hundreds or even thousands of times larger than the smallest numbers. Such a scale is nonlinear: the numbers 10 and 20, and 60 and 70, are not the same distance apart on a log scale. Rather, the numbers 10 and 100, and 60 and 600 are equally spaced. Thus moving a unit of distance along the scale means the number has been multiplied by 10 (or some other fixed factor). Often exponential growth curves are displayed on a log scale, otherwise they would increase too quickly to fit within a small graph. Another way to think about it is that the number of digits of the data grows at a constant rate. For example, the numbers 10, 100, 1000, and 10000 are equally spaced on a log scale, because their numbers of digits is going up by 1 each time: 2, 3, 4, and 5 digits. In this way, adding two digits multiplies the quantity measured on the log scale by a factor of 100.

Logarithmic scale

  • on 1 axis = semi-log plot[7]
    • linear-log plot
    • log-linear plot
  • on both axes = log-log plot[8]

Logarithmic scale is used for exponential data. It gives a linear function.[9][10]

The function of f(x) = 2^x plotted on the logarithmic scale looks like linear function

mapping[edit | edit source]

    • "the complex exponential maps the infinite open strip bounded by the horizontal lines through +/- pi i one-to-one onto the plane minus the negative real axis.
    • The lines of constant real part are mapped to circles, and lines of constant imaginary part to rays from the origin.
    • In the animation we view a rectangle in the strip rather than the entire strip, so the region covered is an annulus minus the negative real axis.
    • The inner boundary of the annulus is so close to the origin as to be barely visible.
    • We also make the strip a bit thinner than 2 pi, so that the annulus does not quite close up."
    • the complex exponential map takes the rectangle |Re(z)| ≤ a, |Im(z)| ≤ π onto the annulus
  • Composition of complex Mappings Viewer by Paul Falstad - the composition of selected mapping functions: g(f(z)). One have to increase grid size to have tha same effect ( rectangle to annulus mapping)
  • Complex exponential map by Siamak on geogebra:
    • vertical axis is transformed to the circle on the w-plane
    • horizontal axis is is transformed to the radii on the w-plane
  • Images of a square grid of size [-3,3]x[-3,3] under the (conformal) exponential map givers almost full annulus[11]
  • The complex exponential function mapping biholomorphically a rectangle [-1,1]x[0 ,pi/2] to a quarter-annulus [12]
  • virtual math museum: ConformalMaps, complex exponential function:"a Cartesian Grid is mapped “conformally” (i.e., preserving angles) to a Polar Grid: the parallels to the real axis are mapped to radial lines, and segments of length 2π that are parallel to the imaginary axis are mapped to circles around 0."
exp(x + i · y) = exp(x) · exp(i · y) = exp(x) · cos(y) + i · exp(x) · sin(y)

Name[edit | edit source]

General names:

  • graphical projection
  • geometric transformation

Description[edit | edit source]

Informal description[edit | edit source]

  • The exponential mapping transforms the entire complex plane into a strip that has unlimited length along the real axis, and a width of 2π along the imaginary axis. Exponential Map from the Mandelbrot Set Glossary and Encyclopedia, by Robert Munafo, (c) 1987-2022
  • " The idea is to focus on a point in or near the Mandelbrot set, and create an image where one direction is the logarithm of the distance and the other one the angle. The result is very much like the astro-ph/031571 map[24] and theXKCD cartoon versions.[25] This map projection is conformal, so it does not distort local angles, and objects are usually recognizable on all scales." Anders Sandberg[26]
  • Images of the Mandelbrot set with a logarithmic projection around a point c0: z-> (log(|z-c0|), arg(z-c0)). Anders Sandberg [27]
  • "it is a log map toward the target point (or, as some might say, a Mercator projection with the target point as South pole and complex ∞ as North pole); horizontally it is periodic and I have placed two periods side to side, whereas vertically it extends to infinity at the top and at the bottom, which corresponds to zooming infinitely far out or in, at a factor of exp(2π)≈535.5 for every size of a horizontal period. Horizontal lines (“parallels”) on the log map correspond to concentric circles around the target point, and vertical lines to radii emanating from it; and the anamorphosis preserves angles." David Madore [28]
  • "The coordinate system is such that the angular component goes to the y-axis, and the radius goes to the x-axis of the resulting image. In addition, the x-axis (radius) is normalized with exp-function so that angles are preserved in this mapping. " Mika Seppä[29]
  • log : "To illustrate the complexity of the boundary of the Mandelbrot set, Figure 8 renders the image of dM under the transformation log(z - c) for a certain c in the boudary of Mandelbrot set. Note the cusp on the main cardioid in the upper right; looking to the left in the figure corresponds to zooming in towards the point c. (Namely, c = -0.39054087... - 0.58678790i... the point on the boundary of the main cardioid corresponding to the golden mean Siegel disk.). Note the cusp on the main cardioid in the upper right; looking to the left in the figure corresponds to zooming in towards the point c. "[30]
  • "Legendary side scrolling fractal zoom. 1 Month + (Interpolator+Video Editor) = Log(z). This means logarithmic projection for this location, that gives this interesting side-scrolling plane ^^)"[31]
  • " There are no program that can render this fractal on log(Z) plane. But you can make it in Ultra Fractal or in similar software with programmable distributive. Formula is:C = exp(D), for D - is your zoomable coordinates" SeryZone X

Formal mathematical description[edit | edit source]

Transformation is usually denoted as

Here transformation is complex: exponential function and translation


  • c is a parameter point from c plane ( flat image in Cartesian coordinate). It is a a parameter of quadratic map
  • is a parameter in a new transformed plane ( log-polar image )
  • is a constant parameter ( translation)
  • e is Euler's number, is a mathematical constant approximately equal to 2.71828,


  • is natural logarithm

description for programmers[edit | edit source]

Filter Mercator from MathMap

filter mercator (image in)

Maxima CAS src code:

(%i1) kill(all);
(%i2) display2d:false;
(%i3) ratprint : false; /* remove "rat :replaced " */
(%i4) c:cx +cy*%i$
(%i5) c0:c0x+c0y*%i$
(%i6) realpart(c0 + exp(c));
(%o6) %e^cx*cos(cy)+c0x
(%i7) imagpart(c0 + exp(c));
(%o7) %e^cx*sin(cy)+c0y
(%i8) cabs(c0 + exp(c));
(%o8) sqrt((%e^cx*sin(cy)+c0y)^2+(%e^cx*cos(cy)+c0x)^2)
(%i9) carg(c0 + exp(c));
(%o9) atan2(%e^cx*sin(cy)+c0y,%e^cx*cos(cy)+c0x)


  • the mapping is periodic because there are trigonometric functions inside

(%i1) kill(all);
(%i2) display2d:false;
(%i3) ratprint : false; /* remove "rat :replaced " */
(%i4) ce:ceex+cey*%i;
(%i5) c0:c0x+c0y*%i;
(%i6) realpart(log(ce - c0));
(%o6) log((cey-c0y)^2+(ceex-c0x)^2)/2
(%i7) imagpart(log(ce - c0));
(%o7) atan2(cey-c0y,ceex-c0x)

exponential grid scan[edit | edit source]

The grid scan with exponential coordiante mapping is different then the standard scan for flat images. Here is example by by Robert Munafo[32]

     Plot a single pixel, row i and column j. Use as many rows as you need for the image to show the whole Mandelbrot set. 
     ctr_r and ctr_i are the real and imaginary coordinates of the center of the view we want to plot
     px_radius is half the width of the image (in real coordinates)
     px_spacing is the width of the image (in real coordinates) divided by the number of pixels in a row
  void pixel_53(int i, int j, int itmax)
    double cr, ci, o_r, o_i, angle, radius;

    /* compute angle and radius */
    angle = ((double) j) * px_spacing / px_radius * 3.14159265359;
    radius = ((double) i) * px_spacing / px_radius * 3.14159265359;

    /* compute offsets */
    o_r = cos(angle) * px_radius * exp(radius);
    o_i = sin(angle) * px_radius * exp(radius);

    ci = ctr_i + o_i;
    cr = ctr_r + o_r;
    evaluate_and_plot(cr, ci, itmax, i, j);

Videos[edit | edit source]

Images[edit | edit source]

2 images with the same parmeter. In the upper image main antenna is in the center, in the lower one the Mandelbrot

How to read location from exponential image ?[edit | edit source]


  • the image is not symmetric ( up and down) so imaginary part of c0 is not zero

Implementations[edit | edit source]

Fractal programs

kf and zoomasm[edit | edit source]

  • The rendering of the final video can be accelerated by computing exponentially spaced rings around the zoom center, before reprojecting to a sequence of flat images.
  • kf-2.15 supports rendering EXR keyframes in exponential map form
  • zoomasm can assemble above keyframes into a zoom video. zoomasm works from EXR, including raw iteration data, and colouring algorithms can be written in OpenGL shader source code fragments
  • kf-extras by Claude Heiland-Allen - has the exponential map (aka log polar or mercator projection) convertor

OpenCV[edit | edit source]

numpy[edit | edit source]

ImageMagic[edit | edit source]

processing[edit | edit source]

sci-kit[edit | edit source]

Mathworks[edit | edit source]

References[edit | edit source]

  1. Logarithmic_scale in wikipedia
  2. matlab ref: loglog plot
  3. Exponential_map_(Riemannian_geometry)
  4. Exponential/`Raise to Power' Operator by R. Fisher, S. Perkins, A. Walker and E. Wolfart ( 2003)
  5. exponential-data-and-logarithmic-scales by Stephen Redmond
  6. 24 Views of the Complex Exponential Function by Pacific Tech
  7. semi-log plot in wikipedia
  8. Log–log plot in wikipedia
  9. exponential-data-and-logarithmic-scales by Stephen Redmond
  10. Log-Scale Reading Posted July 17, 2015 by Scott
  11. wolfram Exp visualizations
  12. scientificlib : Biholomorphism
  13. Exponential mapping with Kalles Fraktaler by Claude Heiland-Allen
  14. exponential map Robert P. Munafo, 2010 Dec 5. From the Mandelbrot Set Glossary and Encyclopedia, by Robert Munafo, (c) 1987-2022.
  15. Transverse_Mercator_projection in wikipedia
  16. kf-extras for manipulating output from Kalles Fraktaler 2
  17. Mercator: Extreme An interactive visualization of the extreme distortions of the Mercator projection by Drew Griscom Roos
  18. The Mercator Projection by John J. G. Savard
  19. flickr : Mercator Mandelbrot Maps by Anders Sandberg
  20. log(z)-Mandelbrot-Zooms by Thorsten Forstemann
  21. youtube video : Mandelbrot deep zoom to 2^142 or 5.5*10^42. Log(z) by SeryZone X
  22. Mandelbrot Zoom 333 - log(z)(Sery's Edition) by SeryZone Arts
  23. Mandelbrot Mercator Testing by Fractal MathPro
  24. A Map of the Universe by J. Richard Gott III, Mario Jurić, David Schlegel, Fiona Hoyle, Michael Vogeley, Max Tegmark, Neta Bahcall, Jon Brinkmann
  25. xkcd : Depth
  26. Mercator Mandelbrot by Anders Sandberg
  27. flickr album : Mercator Mandelbrot Maps by Anders Sandberg
  28. Mandelbrot set images and videos by David Madore
  31. youtube video : Mandelbrot deep zoom to 2^142 or 5.5*10^42. Log(z) by SeryZone X
  32. Exponential Map from the Mandelbrot Set Glossary and Encyclopedia, by Robert Munafo, (c) 2010 Dec 5.
  33. exponential map From the Mandelbrot Set Glossary and Encyclopedia, by Robert Munafo, (c) 1987-2022.