Jump to my Home Page Send me a message Check out stuff on GitHub Check out my photography on Instagram Check out my profile on LinkedIn Check me out on Facebook

Peter de Jong Map

Peter de Jong 1c

Table Of Contents

Peter de Jong Map

The Peter de Jong map is an iterative system in two dimensions with four parameters (a, b, c, and d). Each choice of parameter values will generate a different attractor. In addition to the four parameters, a set of initial conditions must also be specified. The defining equations are as follows:

Peter de Jong Map Equations

Various choices may be made for the initial conditions for the map. In the examples that follow, I have selected the following:

Peter de Jong Map Initial Conditions

The global dynamics of a 2D iterative map can be partly illuminated by the probably density function, P(x,y), defined by the probably that some (x_n, y_n) from the map will be in a neighborhood of (x,y). While that sounds complicated, producing a visualization of this PDF is quite simple in practice -- we simply visualize a histogram based on computed values of the map. The first step is to define a rectangular region of the plane over which we wish to visualize the PDF, and then define a set of discrete pixels over that region. Then we compute a few million, or billion, iterations of the map, and count the number of times we hit each pixel. That amounts to just a few lines of code in a sufficiently friendly language like Processing!


Here are a few examples. Most of these were discovered via an automated search program using the technique briefly outlined in the next section. When you draw one of these images with a random set of parameters, the odds are that you are the first human being ever to see that precise image -- with four, 32-bit parameters the odds of someone else picking the same parameters is 1 in 2^128.

Peter de Jong 0 Peter de Jong 1 Peter de Jong 2 Peter de Jong 3 Peter de Jong 4 Peter de Jong 5 Peter de Jong 6 Peter de Jong 7 Peter de Jong 8 Peter de Jong 9 Peter de Jong 10 Peter de Jong 11 Peter de Jong 12 Peter de Jong 13 Peter de Jong 14 Peter de Jong 15 Peter de Jong 16 Peter de Jong 17

Image Generation: Practical Matters

The first practical matter we must work out is the rectangular region over which we wish to visualize our PDF. We can begin by noticing that the Peter de Jong map is bounded by a circle of radius 2 centered at the origin. Therefore we may always start with the rectangular region [-2, 2]x[-2, 2].

The next practical consideration is how to color each point in the image. The traditional approach for visualizing a 2D histogram is to allow the probably at each point to be represented by color selected from one of the many color scales used for scientific visualization. The color scale I have used for the images here is a simple color gradient with 6 control points: black, red, yellow, blue, cyan, and white.

Representing the probably with color is a fine choice, but the PDF of the Peter de Jong map presents us with a difficulty. The range of values is quite skewed toward the 0 end of the probably range with very few pixels near the 1 end of the range. The standard answer for this problem is to use a logarithmic scale, but I have elected to preform a root transformation on the base results before applying the color scale.

The same color schemes and power transforms may not work for all of the histograms we wish to visualize, and sometimes it is useful to interactively experiment with various choices -- without recomputing all the map values. To this end, I also dump out a grayscale image with actual counts for each pixel so we can load the image up in a tool like imagej.

Related to the color scheme are two new questions: 1) How many points do we compute, and 2) How large should the image be (how many pixels). At first, these two questions may not seem to relate to the color scheme; however, they are both critical for a good color image. The answer I have been using for the first question is to stop when the intensity (hit count) of any pixel in the image reaches a cut-toff value. I have had good luck with the value 16383. The intensity, or pixel hit count, is very much influenced by the area (in terms of real coordinates) of each pixel. Fewer pixels, mean we compute many fewer iterates. Smaller pixels, mean computing many more iterations and generating an image with a more complex, rich structure. I have been using an image size of 7680x7680 -- 7680 is the horizontal resolution of 8K UHD displays.

Lastly, we must find parameters (a, b, c, and d) which generate interesting images. The approach I have taken is to search for parameters by selecting random values for the parameters, plotting 10,000 points, and printing out the parameter sets which seem to hit the highest number of unique points.

Source Code

The source code used to generate the images on this page is distributed with the mraster library as one of the examples. You can find that example source code file on github: peterdejong.cpp.


For a very interesting introduction to the history of Chaos I would suggest James Glick's book: "CHAOS: Making a New Science" (ISBN: 0-14-009250-1). This book has almost no mathematics or formal material regarding Fractals or dynamical systems, but is well worth the read for the historical perspective.

If you are looking for a good introduction to dynamical systems, I would suggest Steven Storgatz's book: "Nonlinear Dynamics and Chaos" ISBN 0-7382-0453-6).

For a good, encyclopedic, introduction to the field in general, I strongly suggest "Chaos and Fractals: New Frontiers of Science" by Peitgen, Jurgens, and Saupe. This book is notable because of it's clear presentation and breadth of coverage. It's a great book to have around for the casual reader because it is broken up into semi self-contained sections that one can just pick up and read.

Paul Bourke has a few nice examples on his web page.

David Trowbridge and Micah Elizabeth Scott have a fantastic application called Fyre that can generate beautiful images based on the Peter de Jong map. This software has a nice GUI and is far more sophisticated than anything on this page. Give it a try.

© 2009 Mitch Richling