I used a simple distance formula: D=SQR(M*M*3) G=255/D*SQR(X*X+Y*Y+Z*Z) GPSET DX,DY,RGB(G,G,G) 'When (0,0,0) is the back corner of the fractal and M is equal to the length, width, and height of the fractal.