home *** CD-ROM | disk | FTP | other *** search
- /*
- * A wave distortion anim using Trends for setting up.
- *
- * The name of this script should be put in as the pre-render script.
- *
- * This example takes special actions at the first frame and the
- * last frame; however, these actions could alternatively be done in
- * the beginning and ending script.
- */
-
-
- /*call open('STDERR', "CON:40/40/500/200/NewWindow") */
-
- address('IM_Port');
-
- parse arg iframe nframe '"' renderfile '"'
-
- if iframe~=1 then call open('STDERR', "ram:wavetrace", "A")
-
- trace r
- options results;
-
-
-
- if iframe = 1 then do
- call open('STDERR', "ram:wavetrace", "W")
- 'autoredraw 0'
-
- 'actpri'
- prime = result
- 'buffer 'prime
- info = result
- parse var info bname ',' bnumber ',' xdim ',' ydim ',' otherinfo
- xdim2 = xdim/2
- ydim2 = ydim/2
- xdim10 = xdim/10
- ydim10 = ydim/10
-
- 'trenddraw "HorizPer" 1 '||nframe||' 0 'xdim' 'xdim2' "Horizontal Period"';
- 'trenddraw "HorizAmp" 1 '||nframe||' 0 'xdim10' 10 "Horizontal Amplitude"';
- 'trenddraw "VertPer" 1 '||nframe||' 0 'ydim' 'ydim2' "Vertical Period"';
- 'trenddraw "VertAmp" 1 '||nframe||' 0 'ydim10' 10 "Vertical Amplitude"';
-
- end;
-
- 'trendget "HorizPer" ' iframe;
- HorizPer = result
- 'trendget "HorizAmp" ' iframe;
- HorizAmp = result;
- 'trendget "VertPer" ' iframe;
- VertPer = result
- 'trendget "VertAmp" ' iframe;
- VertAmp = result
-
- 'entire'
- 'sine' HorizPer HorizAmp VertPer VertAmp
-
- if iframe = 1 then 'amigarender USEPALETTE:NO' /* calculate for first frame */
- if iframe = 2 then 'amigarender USEPALETTE:YES' /* don't recalculate after first frame */
-
- if iframe = nframe then do
- 'autoredraw 1'
- call close('STDERR')
- end
-
- options;
- 'finish';
- exit 0;
-
-