4 ms·
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.
by stianan 14y ago
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.
- jashkenas 14y agoThe 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. In this case, the heart of the function is: x = ((sin(xSeed * y) - cos(ySeed * x)) * width * 0.2) + width / 2 ... and the same for "y". (http://jashkenas.s3.amazonaws.com/misc/deJong/docs/deJong.html#section-23 http://jashkenas.s3.amazonaws.com/misc/deJong/docs/deJong.ht...) In our attractor, every time the coordinate pair lands on a new spot, that spot is exposed to a little bit of light. What you can do for "x" and "y", you can also do for "z". If you generalize the deJong attractor into 3 dimensions, it looks like this: https://www.youtube.com/watch?v=PrXe4RwtZpQ https://www.youtube.com/watch?v=PrXe4RwtZpQ
- elteto 14y agoCould you explain why is it significant that points seem to cluster around some specific trajectories / coordinates?
- jashkenas 14y agoThis 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 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.
- pygy_ 14y agoActually, the attractor in a dynamic system is the equivalent of an asymptote in a standard function. Since the points cluster around it, it is revealed by plotting the values of the system.
- stianan 14y agoIt would be interesting to read the proof that de Jong's function has an attractor. Do you know where I could find it?
- stianan 14y agoSo an attractor is the image of a recursively defined function?
- jashkenas 14y agoThe 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.