How to plot 3D contours of temperature, on the 3D surface of the body !?

9 次查看(过去 30 天)
Hi everybody
I've plotted a colored 3D surface of a human body using patch command.
My data includes a 3x1000 matrix of XYZ (vertices), a 1x1000 vector of colors (temperature), and a 3x3000 matrix of Faces. (a matrix that explains which points must be connected in order to shape the 3D surface.)
So I've plotted the colored 3D surface with the above data; There's no problem up to this point.
Now here is my question :
How can I plot some 3D contours (of temperature) on this 3D surface, which illustrate iso-temperature points on the body !!?
Actually, I want to plot something similar to the below picture (excluding the black dots, of course !!):
-
-
I've searched a lot on this, but nothing came to be useful.
I'd be thankful if you provide me some help on this topic.
  4 个评论
Jonathan Epperl
Jonathan Epperl 2013-4-12
编辑:Jonathan Epperl 2013-4-12
Maybe you could post a minimal example that we can copy&paste into Matlab? Do you know or could you obtain explicit expression for your contours? If so, then just plot them in there using plot3.
EDIT: countourslice might actually be what you are looking for
Omid Adljuy
Omid Adljuy 2013-4-12
Thank you very much Jonathan for your comment. Actually the contourslice command is exactly what I need; however, this reqires the input data to be (1) monotonic & (2) 3-Dimentional matrix. Well my data is neither monotonic nor 3D !!!

请先登录,再进行评论。

回答(2 个)

Michael
Michael 2013-4-12
编辑:Michael 2013-4-12
My own suggestion might be to generate the 3D surface using g = surf(x), remove the edges using set(g,'EdgeColor','none'), and then color the pixel faces using your temperature data (say, C, which should be the same dimension as x) using set(g, 'CData', C). These properties are found in the "patch properties" of the documentation, you can mess with lighting and other things there as well.
  1 个评论
Omid Adljuy
Omid Adljuy 2013-4-12
Thank you very much Michael for your reply. Actually, all my data are vectors, so I can't use the surf command. However, I've plotted the 3D surface of human body, with the temperature data as its color, using patch command. Now the problem is: "How can I plot contour lines on this 3D surface !?"

请先登录,再进行评论。


John Mickett
John Mickett 2019-8-7
Mathworks folks should be able to create a function for this. There are lots of people looking to do this and is an important way of visualizing a 3D surface. Surf works but why not have a function that can do contours instead of colors.

类别

Help CenterFile Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by