[PD] acceleration - deceleration between coordinates - how to do this?

cyrille henry ch at chnry.net
Tue Mar 16 21:51:20 CET 2010


hello,

i prefer using the line3 object for this.

cyrille


Martin Schied a écrit :
> hi,
> 
> a very common approach to this is using a function like cosine or an 
> other function which fits your needs. u can still use the vline but 
> instead of directly using it use its output to control the "fade function":
> 
> [line]
> |
> [* 3.14159]
> |
> [cos]
> 
> here's a page with a few useful examples of other functions:
> 
> http://codeplea.com/simple-interpolation
> 
> Martin
> 
> 
> Thomas Jeppesen wrote:
>> Hi guys,
>>
>> I'm working on a patch (rjdj scene) where I'm moving a little object 
>> around on a plane. The object is been given random coordinates which 
>> it is supposed to gradually move to in five seconds.
>>
>> Right now my solution is to bang the x- and y-coordinates into a 
>> line-object which works fine, but I'd prefer for the movement to be 
>> more "natural". By natural I mean that the object accelerates in the 
>> beginning and then decellerates near the end until it comes to a full 
>> stop at the exact coordinates that where randomly produced..
>>
>> I've been trying to get my head around a solution for quite a while 
>> now, but unfortunately no luck so far.
>>
>> I'm sure this must be simple stuff for some of you PD-geniuses out 
>> there, and I'm hoping that one of you will stand up and show me how 
>> it's done :)
>>
>> Thanks in advance,
>> Thomas :)
>>
>>
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> 
>> http://lists.puredata.info/listinfo/pd-list
>>
> 
> 
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
> 




More information about the Pd-list mailing list