- UID
- 263
- 帖子
- 942
- 精华
- 6
- 积分
- 1117
|
说明:
We have set c = cx + icy, z = x + iy, z' = xd + iyd and x1 + iy1 = (x + iy)2, and we have used that 1/z = z-/|z|2.
The successive calculation of the derivative z' is xd + iyd = (x2 + iy2)*(xd + iyd) + 1, where x2 + iy2 = 2*(x + iy) - p*(x1 - iy1)/(f*f) and f = x2 + y2. The next point in the iteration is x + iy = (x1 + iy1) + p*(x - iy)/f + (cx + icy). The distance function is
log(√f)*√f/√fd (= log(f)*√f/(2*√fd))
for the last z-value, here f = x2 + y2 and fd = xd2 + yd2. The number in the interval [0, 1] to be subtracted from the iteration number (in order to get the real iteration number), is log(log(|z|)/log(r))/log(2) = v*(log(log(f)) - u), for the last z, here v = 1/log(2) and u = log(log(r)).
paletteRGB(r, g, b) is the integer indexing the colour with RGB-values (r, g, b), 0 gives black. col, col2 and col3 are the arrays from 0 to 719 of integers from 0 to 255 constructed in the next section. |
|