Xavier Glattard wrote: > <leeg <at> thaesofereode.info> writes: > >>> 2) I dont understand the 3 NSAnimationCurve... >>> - Are they linear or polynomic functions ? >>> - what do 'slowly speeds up' and 'slows down' really mean ? >>> >> They're certainly polynomial, but in fact they may not fit any >> finite-order polynomial function (may be sinusoidal for instance). I >> agree with the suggestion by Nicolas that approximating a Bezier curve is >> a good approach. > > I agree :-) > > I had a quick look in gnustep code but i can't find any Bezier curve > implementation : all the math is hidden in the low level display > server/library. > > Any suggestion ? A well-known library that could help me ? >
Not sure, if this Bezier curve isn't a bit over the top. What we need is just the ability to map from currentProgress to currentValue both between 0.0 and 1.0 (no matter what the documentation says about 0.1). So why not just do what Alexander Malmberg did in blit-main.m and pre-compute the four mappings for 256 values and map onto them? Or perhaps even that is not worthwhile, even when we use pow() this wont be to expensive. _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnustep-dev