Peter de Jong attractor redux

I’ve been spending a little time on my attractor applet to improve it (and improvement was indeed direly needed). Now it’s possible to reparameterize by holding left mouse button and moving the mouse. That will produce a live preview. Releasing the mouse once a desired shape is arrived at will render said shape using a large number of iterations.

Antialiasing is done using a logarithmic density map to control brightness and by fuzzing coordinates a bit using random(). I’ve still to implement blending of single pixels hit by more than one color to reduce the current flipping during rendering.

Click image for the updated attractor applet

Click image for the updated attractor applet

Tags: , , ,

3 Responses to “Peter de Jong attractor redux”

  1. cj says:

    cool effect, i played with it for sometime, just curious to know how you are generating the curves

  2. Thor Frølich says:

    Thanks. I’m iterating this function (attributed to Peter de Jong) a number of times:

    xn+1 = sin(a * yn) – cos(b * xn)
    yn+1 = sin(c * xn) – cos(d * yn)

    whilst logging the frequency of hits in a given coordinate. When I’m satisfied I plot the pixels using a logarithmic weighting to control the brightness of each position.

    The source code can be found underneath the applet.

  3. cj says:

    thats informative :)

Leave a Reply