z=0,vector(h,s,v)=vector(x^2+y^2+sin(n*x)+sin(n*y),1,1)


Graph of the formula

The following fragment program computes the hue at each point on the plane to create the animation.

!!ARBfp1.0

TEMP R0;
TEMP R1;

PARAM U0 = program.local[0];

PARAM C0 = {
2.000000000000000000000000000000,
1.000000000000000000000000000000,
0.000000000000000000000000000000,
0.000000000000000000000000000000
};

MUL R0.x, fragment.texcoord[0].x, fragment.texcoord[0].x;
MUL R0.y, fragment.texcoord[0].y, fragment.texcoord[0].y;
MUL R0.z, U0.x, fragment.texcoord[0].x;
SIN R0.w, R0.z;
MUL R0.z, U0.x, fragment.texcoord[0].y;
SIN R1.x, R0.z;
ADD R0.z, R0.x, R0.y;
ADD R0.x, R0.w, R1.x;
ADD R0.y, R0.z, R0.x;
MOV_SAT R0.x, C0.y;
FRC result.color.x, R0.y;
MOV result.color.y, C0.y;
MUL result.color.z, C0.y, fragment.color.primary.z;
MOV result.color.w, C0.y;

END