%FFP Category :"PIF Patterns" Title :"Patches Factory (animated)" Copyright :"1998 Pawel Gluszynski" Author :"Pawel Gluszynski" Filename :"PIFPF.8b-" Description:"Code converted by FilterMeister from Filter Factory Plug-in " "file C:\Adobe\Photoshop\Plugins\Pawel\PIFPF.8b- " "on Fri Jan 22 01:41:09 1999." Version :"1.0" // Control definitions: ctl(0):"Red Mix",val=77 ctl(1):"Green Mix",val=38 ctl(2):"Blue Mix",val=244 ctl(4):"Production Size",val=3 ctl(5):"Production Line",val=255 R:cos(tan((x^y)*val(4,1,255)&ctl(0))/2^ctl(5))/2 G:cos(tan((x^y)*val(4,1,255)&ctl(1))/2^ctl(5))/2 B:cos(tan((x^y)*val(4,1,255)&ctl(2))/2^ctl(5))/2 A:a /////////////////////////////////////////////////////////// //// Following code added to animate the filter above. //// /////////////////////////////////////////////////////////// ctl(9):"Animate speed",range=(0,100),val=0 ForEveryTile:{ int i; const int animate = ctl(9); if (doingProxy && animate > 0) { // Display brief instructions. Info("Welcome to the Patches Factory demo.\n\n" "Press ESC to abort, or PAUSE to pause the demo.\n\n" "The demo will automatically terminate after 256\n" "iterations."); for (i = 0; i < 256; i++) { // Assign random values to controls, // and save previous settings in k0..k5. k0 = setCtlVal(0, rnd(0,255)); k1 = setCtlVal(1, rnd(0,255)); k2 = setCtlVal(2, rnd(0,255)); k3 = setCtlVal(3, rnd(0,255)); k4 = setCtlVal(4, rnd(0,255)); k5 = setCtlVal(5, rnd(0,255)); k6 = setCtlVal(6, rnd(0,255)); k7 = setCtlVal(7, rnd(0,255)); if (doForEveryRow()) { // User aborted the filter. // Set controls back to previous values, // run filter one last time, // and reset the progress indicator. setCtlVal(0, k0); setCtlVal(1, k1); setCtlVal(2, k2); setCtlVal(3, k3); setCtlVal(4, k4); setCtlVal(5, k5); setCtlVal(6, k6); setCtlVal(7, k7); doForEveryRow(); updateProgress(0, 1); abort(); } // Display results in preview window, // then pause before next iteration. updatePreview(-99); sleep((100-animate)*50); // 0 - 5 second pause } //for i true; //done! } else { // Processing main image, or not animating -- // just run the filter once. false; //doForEveryRow() } } //ForEveryTile