surface anaPlastic(float Ka = 1, /* ambient brightness */ Kd = 0.5, /* basic brightness */ Ks = 0.7, /* hilite brightness */ roughness = 0.1;/* hilite spread */ vector hilitecolor = 1 /* hilite color */ ) { vector i; vector ambientcolor, diffusecolor, speccolor, surfcolor = 1, surfopac = Of; /* STEP 1 - make a copy of the surface normal one unit in length */ vector n = normalize(N); vector nf = frontface(n, I); /* STEP 2 - set the apparent surface opacity */ Of = surfopac; /* STEP 3 - calculate the lighting components */ ambientcolor = Ka * ambient(); diffusecolor = Kd * diffuse(nf); i = normalize(-I); speccolor = Ks * specular(nf, i, roughness) * hilitecolor; vector c1= set (1, 0, 0); vector c2=set (0, 1, 0.2); float ds; vector result; float side=1, freq=50, amplitude=2 ; float d=(1-side)*3*s+side*3*t; // ds=amplitude/5*(sq*(step(0,sin(d*freq))-0.5)+(1-sq)*(sin(d*freq)))+0.5; ds=amplitude/5*sin(d*freq); if (((1-side)*t+side*s)