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

Labbe, Vincent (AEREX) Vincent.Labbe.AEREX at drdc-rddc.gc.ca
Mon Jan 23 16:30:05 CET 2006


Thanks to all for the answers.

I needed something quickly for a report so I used Gimp (as proposed by
François Pinard) but I will look at the links given by Barry Rowlingson if I
want something more fancy. Thanks also to Ben Bolker.

Vincent


-----Original Message-----
From: François Pinard [mailto:pinard at iro.umontreal.ca] 
Sent: Friday, January 20, 2006 6:31 PM
To: Barry Rowlingson
Cc: Ben Bolker; R-help; Labbe, Vincent (AEREX)
Subject: Re: [R] [Rd] Display an Image on a Plane

[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:

   http://pinard.progiciels-bpi.ca/plaisirs/dessins/cd-back.jpg

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