(x,y,t,&r,&g,&b) { // Offset (x,y). x += sin(t * 0.5); y += cos(t * 0.7); // Grab the picture dimensions. pic_w = 0; pic_h = 0; getpicsiz(pic_w, pic_h); // Calculate the angle: angle = atan2(x, y) * (pic_w / pi) * 3; // Calculate the depth: depth = 80 / (x * x + y * y); // Look up pixel from tunnel wall: pic(angle + t * 5, depth + t * 10, r, g, b); // Darkness from depth: depth = 10 * sqrt(depth) - 10; r -= depth; g -= depth; b -= depth; }