Thread Subject:
2d Image on the x-y plane of a 3d plot?

Subject: 2d Image on the x-y plane of a 3d plot?

From: Fo

Date: 6 Oct, 2008 15:25:45

Message: 1 of 5

Dear all,
sorry if this question has been already answered but I couldn't find
anywhere how to do it.
My problems are simple.
1. In a mesh() plot, can I define a surface to be transparent? Should
I do it with FaceAlpha?Which property of which object should I set?
2. How can I plot an image (raster- jpg or bmp) on the x-y plane of a
3d plot? Should I set some axes property? Can I set an image() as the
background?
I am working on MATLAB Version 7.1.0.246 (R14) Service Pack 3.
Thank you for your help!

Fortunato TE

Subject: 2d Image on the x-y plane of a 3d plot?

From: pluton

Date: 6 Oct, 2008 16:22:41

Message: 2 of 5

could you please post a piece of code so that we can start with
something ?
Thank you

Subject: 2d Image on the x-y plane of a 3d plot?

From: Fo

Date: 6 Oct, 2008 19:32:36

Message: 3 of 5

Sorry that I didn't post any code.

Here a piece of code
Maybe it helps to explain the problem

%Generate a surface to plot in 3d
z=peaks();
%Generate an image to plot on the xy plane (z=0)
imOnXY=image(rand([size(peaks,1),size(peaks,2),3]));
ff=figure();
view([-30 20]);
%Show the image
imshow(imOnXY);
hold on
%plot the z matrix as surface
surface(z,'FaceAlpha',0.5,'LineStyle','none','FaceColor','interp');



On 6 okt, 17:22, pluton <legrand.math...@gmail.com> wrote:
> could you please post a piece of code so that we can start with
> something ?
> Thank you

Subject: 2d Image on the x-y plane of a 3d plot?

From: pluton

Date: 7 Oct, 2008 15:19:20

Message: 4 of 5

is this what you want ?

clear all; close all; clc
%Generate a surface to plot in 3d
z=peaks;
%Generate an image to plot on the xy plane (z=0)
imOnXY=rand([size(peaks,1),size(peaks,2),3]);
figure(1);
%Show the image
x=0*peaks-10;
hold on
surface(x,imOnXY,'FaceColor','texturemap','EdgeColor','none','CDataMapping','direct')
surface(z,'FaceAlpha',0.5,'LineStyle','none','FaceColor','interp');
axis on
view(-35,45)

Subject: 2d Image on the x-y plane of a 3d plot?

From: Fo

Date: 8 Oct, 2008 05:54:03

Message: 5 of 5

On Oct 7, 5:19=A0pm, pluton <legrand.math...@gmail.com> wrote:
> is this what you want ?
YEES!!!
That was it!!!
Thank you a lot!
Fortunato

>
> clear all; close all; clc
> %Generate a surface to plot in 3d
> z=3Dpeaks;
> %Generate an image to plot on the xy plane (z=3D0)
> imOnXY=3Drand([size(peaks,1),size(peaks,2),3]);
> figure(1);
> %Show the image
> x=3D0*peaks-10;
> hold on
> surface(x,imOnXY,'FaceColor','texturemap','EdgeColor','none','CDataMappin=
g','direct')
> surface(z,'FaceAlpha',0.5,'LineStyle','none','FaceColor','interp');
> axis on
> view(-35,45)

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us