[PD] Circular scrolling in pd

James Dunn james at 4thharmonic.com
Mon Jan 7 09:57:16 CET 2013


thanks, cart2pol in zexy works great for me

James

Quoth Patrice Colet, on 06/01/2013 22:02:
> hello,
>
> what about converting cartesian to polar coordinates instead?
>
> with something like
>
> angle = atan(y/x)
>
> you can even get the distance from the center with
>
> R = Sqrt(x2 + y2)
>
> that should be a lot easier
>
>
> ----- Mail original -----
>> De: "James Dunn" <james at 4thharmonic.com>
>> À: "pd-list" <pd-list at iem.at>
>> Envoyé: Dimanche 6 Janvier 2013 22:28:30
>> Objet: [PD] Circular scrolling in pd
>>
>> 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
>>
>> _______________________________________________
>> 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