A dirty implementation of paudelbrot's proposed algorithm below (checks one random set of parameters after another):

`float a, b, c, d, x, y, xp, yp, xs, ys, temp;`

PFont f;

int t = 0, temp2;

void setup() {

size(500, 500);

f = createFont("Arial", 16, true);

colorMode(HSB, 100);

}

void draw() {

background(0);

a = random(-4, 4); b = random(-4, 4); c = random(-4, 4); d = random(-4, 4);

temp = interest();

t = 0;

for (int px = 0; px < width; px++) {

for (int py = 0; py < height; py++) {

xs = map(px, 0, width, -5, 5);

ys = map(py, 0, height, -5, 5);

xp = xs;

yp = ys;

for (int i = 0; i < 50; i++) {

x = sin(yp * b) + c * sin(xp * b);

y = sin(xp * a) + d * sin(yp * a);

xp = x;

yp = y;

}

set(px, py, getit(x, y, 10, 10));

}

}

println("a = " + str(a) + "; b = " + str(b) + "; c = " + str(c) + "; d = " + str(d) + "; // P = " + str(temp));

}

float interest() {

float p[][][] = new float[10][10][2];

float p2[][] = new float[8][8];

for (int i = 0; i < 10; i++) {

for (int j = 0; j < 10; j++) {

xp = map(i, 0, 9, -0.5, 0.5);

yp = map(j, 0, 9, -0.5, 0.5);

for (int k = 0; k < 500; k++) {

x = sin(yp * b) + c * sin(xp * b);

y = sin(xp * a) + d * sin(yp * a);

xp = x;

yp = y;

}

p[i][j][0] = x;

p[i][j][1] = y;

}

}

float sumx;

float sumy;

for (int i = 1; i < 9; i++) {

for (int j = 1; j < 9; j++) {

sumx = 0;

sumy = 0;

for (int i2 = -1; i2 <= 1; i2++) {

for (int j2 = -1; j2 <= 1; j2++) {

if (i2 != 0 && j2 != 0) {sumx += p[i+i2][j+j2][0]; sumy += p[i+i2][j+j2][1];}

}

}

p2[i - 1][j - 1] = sqrt(sq(p[i][j][0] - sumx) + sq(p[i][j][1] - sumy));

}

}

float av = 0;

for (int i = 0; i < 8; i++) {

for (int j = 0; j < 8; j++) {

av += p2[i][j];

}

}

//println(av/64);

return av/64;

}

color getit(float x_, float y_, float w, float h) {

return color((atan(-(y_ - h/2)/(x_ - w/2)) * 31.415 + 50) * 10 % 100, 400 * sqrt(sq(y_ - h/2) + sq(x_ - w/2)) / sqrt(w*h), 100);

}

Instead of dividing by the average of the neighbouring points I simply took a distance function (mostly because I wasn't sure how to correctly divide points). A 10x10 grid is sampled in the x-y-space of -0.5 to 0.5.

Then I just made a huge list of maps of attraction; but I was lazy and wrote an unconstrained version which doesn't care about cycles at all, but instead the position of the point after the iteration.

Here is the code for that (although it is part of the code above):

`float a, b, c, d, x, y, xp, yp, xs, ys, temp;`

PFont f;

int t = 0, temp2;

void setup() {

size(500, 500);

f = createFont("Arial", 16, true);

//a = 0.860415; b = -2.337327; c = -0.016195297; d = 1.3201079; // P = 2.3640182 //krass

colorMode(HSB, 100);

background(0);

for (int px = 0; px < width; px++) {

for (int py = 0; py < height; py++) {

xs = map(px, 0, width, -5, 5);

ys = map(py, 0, height, -5, 5);

xp = xs;

yp = ys;

for (int i = 0; i < 50; i++) {

x = sin(yp * b) + c * sin(xp * b);

y = sin(xp * a) + d * sin(yp * a);

xp = x;

yp = y;

}

set(px, py, getit(x, y, 10, 10));

}

}

println("a = " + str(a) + "; b = " + str(b) + "; c = " + str(c) + "; d = " + str(d));

}

void draw() {

}

color getit(float x_, float y_, float w, float h) {

return color((atan(-(y_ - h/2)/(x_ - w/2)) * 31.415 + 50) * 10 % 100, 400 * sqrt(sq(y_ - h/2) + sq(x_ - w/2)) / sqrt(w*h), 100);

}

The list I made showed that low values had either blank maps of attraction or interesting ones, but sometimes with noise in between (0.0 - 2.0 circa) and higher values (about 2.0 - 7.0, but mostly 4.0 - 6.0) were mostly noise. But sometimes there were some interesting ones even in this high range! This shows to me that the funtion for the values still needs to be optimised.

I figured that noise is not that interesting to look at, so here are some cherry-picked ones with a range of interestingness values (I call it P for now).

a = 0.45221663; b = -2.7604642; c = -0.710444; d = -1.3897924; // P = 0.43269658

a = -2.244555; b = 1.5072684; c = 1.2576766; d = 1.0405989; // P = 0.5516912

a = -2.7047129; b = 0.6918626; c = 1.7450433; d = 0.23407888; // P = 1.4036119

a = 1.1713247; b = -0.7425852; c = 1.1708984; d = -1.3589964; // P = 3.4723818

a = 0.8547025; b = 0.7852287; c = -1.5982718; d = -2.5269532; // P = 7.172738