I would convert the x,y coords from the trackpad to polar coords, then you have angle and radius. Check out [mapping/polar], note that's meant to work with absolute coords like what you get from [cursor] or [mousestate]. [hid] will give you the relative data that mouse sensor gives.
.hc
On Jan 6, 2013, at 4:28 PM, James Dunn wrote:
Hi,
I'm trying to implement circular scrolling with the trackpad in pd and am approaching it by dividing a circle into segments and trying to detect when the mouses moves from one segment to the other. At the moment I can only detect 4 segments (basically just the zero crossings) which is not really accurate enough.
How would I go about detecting the boundaries of the 12 segments in the attached patch (circscroll.pd)?
Eventually I want to detect speed and direction too - but perhaps there is a better approach?
any advice welcome.
thanks,
james <circscroll.pd><circscrollabs.pd>_______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list