[R] rgl plot rotation with device other than mouse

Duncan Murdoch murdoch.duncan at gmail.com
Tue Oct 27 20:59:28 CET 2015


On 27/10/2015 2:35 PM, santiago gil wrote:
> Well, I haven't built the device yet, I'm trying to figure out what my
> options will be. In the case of plugging in a simple USB trackball, I
> suppose it can work with the HID Manager in Mac to customize the signal
> from it.
> 
> In general, would it be possible to manipulate the plot, say for
> example, with a standard joystick? Is there something "deeper" in the
> code that I could look towards to make this possible? Or any other
> library that might support something like this?

I've already answered this below.

Duncan Murdoch

> 
> 2015-10-27 14:17 GMT-04:00 Duncan Murdoch <murdoch.duncan at gmail.com
> <mailto:murdoch.duncan at gmail.com>>:
> 
>     On 27/10/2015 1:38 PM, santiago gil wrote:
> 
>         Hello R,
> 
>         I'm trying to figure out if it would be possible use a device
>         (maybe simply
>         a trackball) separate from the mouse that would have the ability
>         to rotate
>         a 3D plot made with rgl without any buttons. This is to build an
>         interactive "demo"-like piece for which a mouse or trackpad is an
>         unsatisfactory manipulation tool. The worse solution would be to
>         make the
>         trackpad button "sticky" so that it works as a rotation on/off
>         toggle.
>         Anything that is less intrusive with the computer's operability
>         is even
>         better. I couldn't find the right way in par3d or anything of
>         the sort. Any
>         tips anybody? Or any other libraries to would use to do
>         something like this?
> 
> 
>     Do you know how to get input from that device?  If so, you can
>     explicitly set par3d("userMatrix") to a rotation
>     matrix based on the input.
> 
>     rgl itself has no support for getting input from anything other than
>     the mouse and keyboard.
> 
>     Duncan Murdoch
> 
> 
> 
> 
> -- 
> -------------------------------------------------------------------------------
> http://barabasilab.neu.edu/people/gil/



More information about the R-help mailing list