Skip to content
Back to formatted view

Raw Message

Message-ID: <4DB56112.7030205@gmail.com>
Date: 2011-04-25T11:54:58Z
From: Duncan Murdoch
Subject: Defining origin for rotation in RGL device
In-Reply-To: <F3A08649-E3A4-4791-96A1-9508674D9897@gmx.de>

On 25/04/2011 5:46 AM, Mark Heckmann wrote:
> Hi all,
>
> How can I tell RGL to set the center for the rotation to the origin of  the coordinate system (0,0,0).
> It seems that the default is to use the center of the display not the origin of the coordinate system.
>
> open3d()
> lines3d(c(0, 1), c(0,0), c(0,0))
> lines3d(c(0,0), c(0, 1), c(0,0))
> lines3d(c(0,0), c(0,0), c(0, 1))
>

You can attach any transformation you like to a mouse button.  See the 
"mouseCallbacks" demo for R implementations of the standard ones, and 
modify the mouseTrackball function there to choose the position of the 
origin of the coordinate system as the centre of rotation.

Duncan Murdoch