Could someone explain what an attractor is? I looked it up on Wikipedia, but I don't understand how these shapes benefit from the definition given there.
The Wikipedia explanation is a fine one. To simplify -- it's when you observe a variable moving through through a space. In programming this means taking a coordinate or set of coordinates, and repeatedly feeding it into a function that will move the coordinates to a new location.
This equation is an "attractor" because the coordinates remain close to particular points (in this case, the origin).
Not all iterated functions behave this way -- sometimes the coordinates will wander off, and that would be called a "repellor" (http://en.wikipedia.org/wiki/Repellor).
"sin" and "cos" are good primitives for building attractor functions, because they naturally stay bounded close to the origin -- "x²" for example, wouldn't work nearly as well.
As to why the deJong attractor draws particular trajectories ... that's the beauty and mystery of the thing. It's also interesting how it tends to draw particular types of shapes when seeded from different areas -- dusty spheres when seeded close to the origin, skinny loops in the 4th quadrant, folded sheets of cloth in the 1st and 3rd, and stacked diamond circles when seeded in the 2nd.
The attractor is technically the set of points that the iterated value traces.
In this case, the image is produced by iterating the "x" and "y" values, and slightly exposing with a white light every "(x,y)" position they stop at. The more they stop at a particular pixel, the brighter that pixel becomes.
This is a repost (the Retina bit is new), but for those who haven't seen it before, you can share particular initial seeds by clicking on the "Permalink" button.
I noticed that dragging around causes the graph to change. I know I should just look at the source, but can someone tell me what inputs the dragging changes for the computation? Also, bonus points for some cool drags I can do that you notice.
The best thing about this toy is that, no matter where you click, you get a beautiful result.
The only thing missing is arrowkey controls to bump around a pixel at a time, so you can better explore an interesting region of the space you've found.