surface mandelbrot(float maxIter=64) { varying float zs = 0, zt = 0, ss = 0, tt = 0; varying float iter; for(iter = 0; iter < maxIter && ss + tt < 4); iter += 1) { ss = zs*zs; tt = zt*zt; zt = 2.0*zs*zt + t; zs = ss - tt + s; } Ci = color spline(iter/maxIter, /*...*/); }