Path: news.mathworks.com!not-for-mail
From: "Michael Garrity" <mNOSPAMgarrity@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Plot an image and rotate it in 3d?
Date: Fri, 28 Sep 2007 09:48:53 -0400
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <fdj0o6$2jf$1@fred.mathworks.com>
References: <fdgc0g$739$1@fred.mathworks.com> <1190904459.761081.170430@19g2000hsx.googlegroups.com>
Reply-To: "Michael Garrity" <mNOSPAMgarrity@mathworks.com>
NNTP-Posting-Host: garritym.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1190987334 2671 144.212.107.178 (28 Sep 2007 13:48:54 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 28 Sep 2007 13:48:54 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
Xref: news.mathworks.com comp.soft-sys.matlab:430597




"Randy Poe" <poespam-trap@yahoo.com> wrote in message news:1190904459.761081.170430@19g2000hsx.googlegroups.com...
> On Sep 27, 9:42 am, "David Doria" <daviddo...@gmail.com> wrote:
>> I would like to have a surface in a 3d plot that is an
>> image, is this possible?  For example I want to show a 3d
>> line passing through a 3d plane and intersecting at a
>> particular point in an image (like from a camera)
>>
>> does that make sense?
>>
>
> By the way, I expect the real answer is to do exactly
> what the HELP for IMAGE said, which was to use "SURF
> with texture mapping or PCOLOR". However, I'm not familiar
> with those, so I just did an ordinary surface with height-based
> coloring, which I'm comfortable manipulating.
>
>                - Randy
>
It would look something like this:

surface('xdata',[0 1],'ydata',[0 1],'zdata',zeros(2),'cdata',img,'facecolor','texturemap','edgecolor','none')

You'll need to fiddle the X & Y data to match your aspect ratio.

    -MPG-