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 :)
There are lots of curve objects in the mapping library for this. The
mapping lib works on all 0-1 range, so make your [line] generate a
ramp from 0 to 1 in the time you want. Then after the [line], use a
curve object. They are named after the shape and types of segment.
shape: sigmoid (S-shaped) seat (like you sit in)
types: breakpoint cubic quartic circular elliptical etc...
I'd start with [exponential_sigmoid]. You'll most likely want a
sigmoid shape for the accel/deccel pattern you describe.
.hc
On Mar 16, 2010, at 3:59 PM, 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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
"A cellphone to me is just an opportunity to be irritated wherever you
are." - Linus Torvalds
Great - Thank you very much. I'll take a look in the mapping library.
Cheers, Thomas
Hans-Christoph Steiner wrote:
There are lots of curve objects in the mapping library for this. The mapping lib works on all 0-1 range, so make your [line] generate a ramp from 0 to 1 in the time you want. Then after the [line], use a curve object. They are named after the shape and types of segment.
shape: sigmoid (S-shaped) seat (like you sit in)
types: breakpoint cubic quartic circular elliptical etc...
I'd start with [exponential_sigmoid]. You'll most likely want a sigmoid shape for the accel/deccel pattern you describe.
.hc
On Mar 16, 2010, at 3:59 PM, 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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
"A cellphone to me is just an opportunity to be irritated wherever you are." - Linus Torvalds
Hallo, Thomas Jeppesen hat gesagt: // Thomas Jeppesen wrote:
Great - Thank you very much. I'll take a look in the mapping library.
For RjDj scenes you probably will prefer the "puremapping" library, in SVN at Sourcforge in: trunk/abstractions/nusmuk/puremapping/
Last I checked, the older "mapping" had many dependencies on externals and other abstractions etc. This can be a proctological nuisance when only vanilla Pd is available.
puremapping additionally omits the [expr] object most of the time, which gives a speedup and lets you run on the less-than-vanilla Pd in RjDj which is missing [expr].
Frank
OK,
Thank you that is good to know and very helpful!
Thanks all - I'm very close to having implemented a solution to my problem.
Cheers, Thomas
Frank Barknecht wrote:
Hallo, Thomas Jeppesen hat gesagt: // Thomas Jeppesen wrote:
Great - Thank you very much. I'll take a look in the mapping library.
For RjDj scenes you probably will prefer the "puremapping" library, in SVN at Sourcforge in: trunk/abstractions/nusmuk/puremapping/
Last I checked, the older "mapping" had many dependencies on externals and other abstractions etc. This can be a proctological nuisance when only vanilla Pd is available.
puremapping additionally omits the [expr] object most of the time, which gives a speedup and lets you run on the less-than-vanilla Pd in RjDj which is missing [expr].
Ciao
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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi,
The line3 object would be perfect in my situation. The only problem is that it doesn't work in PD Vanilla, which is what drives RjDj - only PD extended seems to support the line3 object.
Thanks for pointing out the line3 object out to me though!
Cheers, Thomas :)
cyrille henry wrote:
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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Thomas Jeppesen a écrit :
Hi,
The line3 object would be perfect in my situation. The only problem is that it doesn't work in PD Vanilla,
it work with pd vanila, but it's not part of pd vanilla. (i don't use extended)
which is what drives RjDj - only PD extended seems to support the line3 object.
sorry, i missed that you where using rjdj, so you can't use line3. i really should make an abstraction version of this extern.
Cyrille
Thanks for pointing out the line3 object out to me though!
Cheers, Thomas :)
cyrille henry wrote:
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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
No worries, all contributions to my little problem here was welcome and helped me creating a good solution for what I needed :)
An abstraction of the line3 object would be nice though :)
cyrille henry wrote:
Thomas Jeppesen a écrit :
Hi,
The line3 object would be perfect in my situation. The only problem is that it doesn't work in PD Vanilla,
it work with pd vanila, but it's not part of pd vanilla. (i don't use extended)
which is what drives RjDj - only PD extended seems to support the line3 object.
sorry, i missed that you where using rjdj, so you can't use line3. i really should make an abstraction version of this extern.
Cyrille
Thanks for pointing out the line3 object out to me though!
Cheers, Thomas :)
cyrille henry wrote:
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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Great - thanks Martin. I have this working now. Now I just need to apply it to my patch.
Thanks for the quick response guys!
Cheers, Thomas
Martin Schied wrote:
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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
i use this patch to decide which function suits the application best:
Am 16.03.2010 um 20:59 schrieb Thomas Jeppesen:
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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Thanks - that looks very helpful!
Cheers, Thomas
Max wrote:
i use this patch to decide which function suits the application best:
Am 16.03.2010 um 20:59 schrieb Thomas Jeppesen:
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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list