## Iteration – Tinkerbell Map help

Apr 28, 2012 at 1:36am

# Iteration – Tinkerbell Map help

Fairly simple question, but I’m new to gen~ and fairly new to trying to do logic in Max. I’m trying to implement the Tinkerbell map in Max/Gen (http://en.wikipedia.org/wiki/Tinkerbell_map), but I seem to be having trouble actually moving the equation along an iteration as the parameters all stay the same, but the equation repeats itself. Here is what I have so far (the math might not be correct, I’m pretty bad). I was thinking I might need a sig~ to somehow move the gen~ along?

This is the code for the equation in java

int time = 0, iterations = 50000;
double x = -0.72, y = -0.64;
double a = 0.9, b = -0.6013, c = 2.0, d = 0.5;
while (time < iterations) {
double oldX = x;
x = Math.pow(x,2)-Math.pow(y,2)+a*x+b*y;
y = 2*oldX*y+c*oldX+d*y;
out.write(x+” “+y+”n”); //writing data to a txt file to be read by Mathematica
time++;
}

– Pasted Max Patch, click to expand. –
#63272

You must be logged in to reply to this topic.