[R] [Rd] Display an Image on a Plane

François Pinard pinard at iro.umontreal.ca
Sat Jan 21 00:30:38 CET 2006

[Barry Rowlingson]
>[Ben Bolker]
>> [Labbe, Vincent]

>>>I am new to R and I would like to display an image on a plane in a
>>>3D plot, i.e. I would like to be able to specify a theta and a phi
>>>parameters like in the function persp to display a 2D image on an
>>>inclined plane.

>> what do you mean by "image" exactly?

>I think once you get into doing fancy visualisations like this then you
>may find a solution outside of R. [good referrences deleted]

Bonjour, Vincent.

I'm not fully sure I understand your request, what I get is that you 
want to transform an image on a plane as if one was looking at it in 
space, from an angle.   If I had this problem, I would probably produce 
the image using regular R machinery for this like png() or postscript(), 
then interactively process the result within Gimp, using trapezoidal 
deformations (I think they call it "Perspective transformation").  For 
example, I used this simple trick in the following picture:


for the KWIC listing being part of the composition.  However, if 
I needed a precise phi and theta for transformations beyond what 
trans3d() can offer, I would likely use Python or R for computing the 
projection of the rectangle enclosing the image, than PIL (Python 
Imaging Library) for producing that precise trapezoidal deformation.  
Just sharing ideas, of course.  Much likely that if I knew R better, 
I would use it more fully -- but that's a tautology! :-)

François Pinard   http://pinard.progiciels-bpi.ca

More information about the R-help mailing list