fit frame range
eharetea

Fit a frame range with a custom expression function.

Scale a frame range dynamically.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Wednesday July 30th, 2008 03:40 PM

FIT 0-1 over the frame range with:
fit($FEND - $F, $FSTART, $FEND, 0, 1)


create your own fit:

fit(float valuefloat oldminfloat oldmaxfloat newminfloat newmax)

{
    if (value <= oldmin) return newmin;
    if (value >= oldmax) return newmax;
    value = (value-oldmin) / (oldmax oldmin);
    value value * (newmax-newmin) + newmin;   

}











Downloads:
Download: fit.sh 279 B

Please login or Click Here to register for downloads
Creative Commons License
fit frame range by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com