home *** CD-ROM | disk | FTP | other *** search
/ DTP Toolbox / DTPToolbox.iso / utilities / propage_pdraw / donsgenies / scriptsforimagemaster / wavedistort.rexx < prev   
Encoding:
OS/2 REXX Batch file  |  1994-04-25  |  1.6 KB  |  70 lines

  1. /*
  2.  * A wave distortion anim using Trends for setting up.
  3.  *
  4.  * The name of this script should be put in as the pre-render script.
  5.  *
  6.  * This example takes special actions at the first frame and the
  7.  * last frame; however, these actions could alternatively be done in
  8.  * the beginning and ending script.
  9.  */
  10.  
  11.  
  12. /*call open('STDERR', "CON:40/40/500/200/NewWindow") */
  13.  
  14. address('IM_Port');
  15.  
  16.  parse arg iframe nframe '"' renderfile '"'
  17.  
  18. if iframe~=1 then call open('STDERR', "ram:wavetrace", "A")
  19.  
  20. trace r
  21. options results;
  22.  
  23.  
  24.  
  25. if iframe = 1 then do
  26.     call open('STDERR', "ram:wavetrace", "W")
  27.     'autoredraw 0'
  28.  
  29.     'actpri'
  30.     prime = result
  31.     'buffer 'prime
  32.     info = result
  33.     parse var info bname ',' bnumber ',' xdim ',' ydim ',' otherinfo
  34.     xdim2 = xdim/2
  35.     ydim2 = ydim/2
  36.     xdim10 = xdim/10
  37.     ydim10 = ydim/10
  38.  
  39.     'trenddraw "HorizPer" 1 '||nframe||' 0 'xdim' 'xdim2' "Horizontal Period"';
  40.     'trenddraw "HorizAmp" 1 '||nframe||' 0 'xdim10' 10 "Horizontal Amplitude"';
  41.     'trenddraw "VertPer" 1 '||nframe||' 0 'ydim' 'ydim2' "Vertical Period"';
  42.     'trenddraw "VertAmp" 1 '||nframe||' 0 'ydim10' 10 "Vertical Amplitude"';
  43.  
  44.     end;
  45.  
  46. 'trendget "HorizPer" ' iframe;
  47. HorizPer = result
  48. 'trendget "HorizAmp" ' iframe;
  49. HorizAmp = result;
  50. 'trendget "VertPer" ' iframe;
  51. VertPer = result
  52. 'trendget "VertAmp" ' iframe;
  53. VertAmp = result
  54.  
  55. 'entire'
  56. 'sine' HorizPer HorizAmp VertPer VertAmp
  57.  
  58. if iframe = 1 then 'amigarender USEPALETTE:NO' /* calculate for first frame */
  59. if iframe = 2 then 'amigarender USEPALETTE:YES' /* don't recalculate after first frame */
  60.  
  61. if iframe = nframe then do
  62.     'autoredraw 1'
  63.     call close('STDERR')
  64.     end
  65.  
  66. options;
  67. 'finish';
  68. exit 0;
  69.  
  70.