Transition Macros
As part of my animation work I have a set of macros which simplify moving objects from one location to another, or in some other way allow me to transition an object from one state to another. Linear Changes There are going to be times when you want to fade a scene to black or from black, or fade between two scenes. You will want things to be at a starting state up until the motion or change begins, and for it to be at a certain place when the motion ends, and for it to stay there, and for the movement in between those times to occur at a steady rate. When that is the case, a macro like the following will come in handy: #macro Transition(tNow, tStart, pStart, tEnd, pEnd) #if (tNow <= tStart) (pStart) #elseif(tNow >= tEnd) (pEnd) #else (pStart + (pEnd - pStart) * (tNow - tStart) / (tEnd - tStart)) #end #end Call this macro with the parameters set to the following values: tNow : Set this to the current time of the animation (or the time for which you