This a page to explore the visual landscape of De Jong attractors. See the "About" tab for more information. Have fun exploring!
New! More multiple colors
NOTE: these may take a few seconds to draw.
WARNING 1: Safari does not always show the result when using more than 1 million iterations.
However, when it says it is finished, you can click "Draw it" again (or press Option-D),
and the result might appear quickly.
WARNING 2: Firefox does not necessarily draw "light" and "lighter" correctly.
I cannot really recommend Firefox at this point (July 2022).
Speed: See the "About" tab for more details, and the "Tips" tab for suggestions. Short story: Safari is the fastest on the Mac, Edge/Chrome are the fastest on Windows .
Use a sample: OR | OR | Use settings from a file:
Or drop a settings file here. |
Parameters: a: b: c: d: (Enter any numbers.)
Size: Downsize to 1000 x 1000 Shape for points: Iterations:
Drawing color(s):
Transparency:
Sample Colors: |
Background color:
Sample Colors: |
The URL contains the information about a, b, c and d parameters, but NOT the settings for color, iterations, and size (they are saved only in the settings files). You can bookmark the URL, make a link to it, or send it to someone to share the "location".
This is my new take on exploring De Jong attractors. The one first one is here.
De Jong attractors result from iterative calculations of successive points according to the equations:
nextX = sin(a * previousY) - cos(b * previousX)
nextY = sin(c * previousX) - cos(d * previousY)
The a, b, c and d are the parameters in the settings
The De Jong attractors are named after Peter de Jong, of Leiden, Holland. In the "Computer Recreations" column in the July 1987 issue of Scientific American (v. 257:1, 108-111), A.K.Dewdney gives the equations, attributing them to de Jong. Attractors had been written about the previous December in both Scientific American and in Byte magazine. Dewdney also gives 3 sets of parameters suggested by de Jong, which you can try out (the names are de Jong's).
Even though there is no standard for coloring De Jong attractors, most examples that I've come across seem to follow the lead of Paul Bourke. His idea is to count the number of times the attractor passes through each point, and then color the points by mapping their counts to a palette of colors. That's a good way to visualize the attractor, though I haven't had much success with that technique here. Something to work on ... However, I've chosen a few other ways to visualize the attractor:
As of July 2022, on a Mac Safari is the fastest browser, Firefox is intermediate, and Chrome is the slowest. On Windows, Edge/Chrome is faster than Firefox by 15-20%. (I didn't test Chrome on Windows, since Edge uses the same engine.) Here are some comparisons using the "Standard" example at 1M and 10M iterations.
Times in seconds
Mac and Windows times are not comparable, since the processors are different.
PC: Intel core i5-1035G4 @1.10 Ghz 1.50 Gh Mac: 1.4 GHz Quad-Core Intel Core i5
Mac times in seconds | Windows times in seconds | ||||
---|---|---|---|---|---|
1M | 10M | 1M | 10M | ||
Safari | 0.33 | 3.53 | NA | NA | |
Firefox | 2.42 | 23.33 | 6.54 | 64.99 | |
Chrome (Brave) | 8.12 | 74.19 | NA | NA | |
Edge (Chrome) | NA | NA | 5.7 | 54.45 |
In working on this page, I have been inspired by the examples on Paul Bourke's fantastic website.
L. Lee Mcintyre has made this page much more usable thanks to her numerous suggestions. Thank you! Remaining issues are mine alone.
Finally, I have used 2 javascript libraries: chroma.js to deal with color names, including the Color Brewer palettes, and FileSave.js for downloads. In addition, the special downsizing code is adapted from here.