[R] rgl plot rotation with device other than mouse

Duncan Murdoch murdoch.duncan at gmail.com
Tue Oct 27 19:17:38 CET 2015


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



More information about the R-help mailing list