フィルターのクリア

Problem Plotting 4D data

2 ビュー (過去 30 日間)
Saeed68gm
Saeed68gm 2011 年 4 月 13 日
コメント済み: Sagar 2015 年 3 月 9 日
Hello everyone,
I have a dataset that is result of a 3D Scanner and it's in the format (x,y,z,value) for each point. The value of each point represents the strength of signal received by the antennas. The data is scanned in regular grid, but the values of the points with no signal received from are zero or very small.
Right now I am representing these points with "*" as follows:
for k=1:91
for j=1:101
for i=1:101
if 50<dbstolt(i,j,k)
plot3(i,j,k,'-r*');hold on
end
end
end
end
My original dataset is called dbstolt, I attached a photo for better understanding. http://tinypic.com/r/sawaxt/7
Now I would like to connect these points and make a 3D Surface from them, but I don't know how. Maybe using the function patch? but how do I determine the relation between the points?
Thanks in advance
  2 件のコメント
Sean de Wolski
Sean de Wolski 2011 年 4 月 13 日
Is that a gun? If so, you have my attention.
Andrew Newell
Andrew Newell 2011 年 4 月 13 日
Good use for a scanner!

サインインしてコメントする。

採用された回答

Andrew Newell
Andrew Newell 2011 年 4 月 13 日
You might be able to do it using isosurface with isovalue=50. You'll need to create x,y,z matrices using meshgrid.
  6 件のコメント
Andrew Newell
Andrew Newell 2011 年 4 月 14 日
As well as Sean de's suggestion, you could try playing with lighting and colormap to improve your result.
Saeed68gm
Saeed68gm 2011 年 4 月 14 日
Yes, I will start to work on that soon. Thanks for your valuable suggestions))

サインインしてコメントする。

その他の回答 (2 件)

Sean de Wolski
Sean de Wolski 2011 年 4 月 14 日
The problem you're seeing is that the area of the edges is significant compared to the area of the faces. You could try either lowering the edgealpha or setting the edgecolor to none:
patch(fv,'edgecolor','none');%no edges
patch(fv,'edgealpha',0.2); %20% transparency in the edges.
  2 件のコメント
Saeed68gm
Saeed68gm 2011 年 4 月 14 日
Hey Sean,
Thank you for your answer again. I tried to set the EdgeColor to none. but doesn't work very well. I need to work on the coloring as well.
But I wanted to know how does Isosurface actually work? I read MATLAB help, but it wasn't that helpful. I am interested in the algorithm it uses to find the input for patch function. Can u help me out?
Sean de Wolski
Sean de Wolski 2011 年 4 月 14 日
It uses a marching cubesesque approach. Marching cubes as an algorithm was proprietary until 2006ish so Mathworks developed something similar for the isosurface function. I don't if they've since changed it and I don't know the details about its mechanisms. Steve Eddins would be the one to ask about that. See his blog here:
http://blogs.mathworks.com/steve/
As far as the colors. If you want the edges to show but not be black, you could set them to a slightly darker shade of the facecolor so they're still noticeable but don't interfere as much.
Ps. I'm also interested in the workings of the isosurface function, but I haven't delved into it.

サインインしてコメントする。


Saeed68gm
Saeed68gm 2011 年 5 月 18 日
Hi guys! I did a lot of research about Marching Cubes algorithm, but I didn't get any info on how the isosurface function works. I didn't get any news from Steve Eddins either.
I tried to look up the code inside the function, but since I'm a newbie I got nowhere! There is another function inside isosurface called "isosurf" which I couldn't figure out what kind of algorithm it uses.
There also was a function called "Isovalue", I didn't figure out the purpose of that either. If we provide the function with an isovalue then what is the use of "finding the isovalue using the hist function" as it says in the description?
Thanks again for your help
  3 件のコメント
Asadullah
Asadullah 2012 年 7 月 17 日
Hey Saeed,
If you are interested to apply marching cubes algorithm to your data set then pls visit http://www.mathworks.com/matlabcentral/fileexchange/32506-marching-cubes
Sagar
Sagar 2015 年 3 月 9 日
I am having a similar issue, I have similar scanner data and all I want is to show all the values in 3d space using the isosurface. How can I do? If I don't specify ISO value what exactly does it give? Do I need to use other 3d plot functions? Please suggest what is the best way to plot my x,y,z,value data in 3d space in a nice way. Thanks, -Sagar
-Sagar

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeScalar Volume Data についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by