Is there a way to change the viewpoint using view3d (or rgl.viewpoint) with respect to the image that currently appears rather than the perspective that rgl thinks is the default? For example, if I create an image and then perform what should be a no-op:
rgl.viewpoint(userMatrix=rotationMatrix(0,1,0,0)) the image is rotated. Then I can perform rotations on the result without surprises. But I want to specify rotation with respect to the image as it originally appeared, or with respect to the viewpoint that is currently in effect. Experimentation has revealed that when using rotationMatrix the z-axis points out of the canvas instead of pointing up as it often is in mathematics, especially when using the spherical coordinates (theta,phi). I guess the question is: can we query rgl for the current viewpoint and then apply changes to that? Another way of putting it is: can we do programmatically what we can easily do using the mouse in interactive mode? Thanks, Dominick ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel