Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
3D visualisation with imported graphics

Subject: 3D visualisation with imported graphics

From: PLH

Date: 18 Jan, 2011 20:48:04

Message: 1 of 5

Hello all,

I'm trying to make a 3d data plot (using plot3), and I want to import a graphic onto the entire z=0 plane that's visible in my plot - essentially, I have some data that correlates to a geographical map, and I want to show my data points above their associated (x,y) coord in the z=0 plane (where the height represents some physical quantity).

Is this possible? If so, can someone point me to the relevant commands/FAQ/previous post/wiki please?

Many thanks,

PLH.

Subject: 3D visualisation with imported graphics

From: Think two, count blue.

Date: 19 Jan, 2011 00:25:17

Message: 2 of 5

On 11-01-18 02:48 PM, PLH wrote:

> I'm trying to make a 3d data plot (using plot3), and I want to import a
> graphic onto the entire z=0 plane that's visible in my plot - essentially, I
> have some data that correlates to a geographical map, and I want to show my
> data points above their associated (x,y) coord in the z=0 plane (where the
> height represents some physical quantity).
>
> Is this possible? If so, can someone point me to the relevant
> commands/FAQ/previous post/wiki please?

Search in the Matlab "doc" function for Texture Mapping

Subject: 3D visualisation with imported graphics

From: HK

Date: 19 Jan, 2011 06:23:04

Message: 3 of 5

I'm not sure if it is the best solution, but in similar case I used the surface -function. I just set the XData and YData properties as the min and max of the xy-plane and ZData as zero for the corresponding coordinates. This worked well enough for me.

Subject: 3D visualisation with imported graphics

From: PLH

Date: 19 Jan, 2011 13:26:04

Message: 4 of 5

Thanks for the help - I used imread and surface, and got that part of program working as intended.

PLH.

"HK " <zalazar8000@yahoo.com> wrote in message <ih6008$6u1$1@fred.mathworks.com>...
> I'm not sure if it is the best solution, but in similar case I used the surface -function. I just set the XData and YData properties as the min and max of the xy-plane and ZData as zero for the corresponding coordinates. This worked well enough for me.

Subject: 3D visualisation with imported graphics

From: Sean de

Date: 19 Jan, 2011 16:07:05

Message: 5 of 5

"PLH" wrote in message <ih4ua4$drn$1@fred.mathworks.com>...
> Hello all,
>
> I'm trying to make a 3d data plot (using plot3), and I want to import a graphic onto the entire z=0 plane that's visible in my plot - essentially, I have some data that correlates to a geographical map, and I want to show my data points above their associated (x,y) coord in the z=0 plane (where the height represents some physical quantity).
>
> Is this possible? If so, can someone point me to the relevant commands/FAQ/previous post/wiki please?
>
> Many thanks,
>
> PLH.

Take a look at the code for my meshCanopy function. It should be similar, you'll have to change the call to mesh to a call to plot3 and make the necessary index adjustments. If your image is not gray scale you'll have to be creative with the colormaps as well.

http://www.mathworks.com/matlabcentral/fileexchange/29485-meshcanopy

Tags for this Thread

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.

Contact us