3D matrix from 3D scatter points

1 回表示 (過去 30 日間)
David
David 2015 年 3 月 17 日
編集済み: the cyclist 2015 年 3 月 17 日
Hi everyone,
I have tracked moving particles in a 3D space by storing their spatial coordinates positions in vectors. I.e. for a given time I have:
particle_x; particle_y; patricle_z;
specifying the x,y and z coordinates of each tracked particle/point. I can easily visualize these using scatter3 in Matlab, but from this, I would like to make 2D cuts and visualize the spread of points coinciding with certain planes. My idea was to create a 3D matrix of the whole 3D space and simply fill in a value ('1') where a particle is identified. However, I'm not really sure how to do this in a good way...
Since scatter3 can visualize the points in 3D, there has to be some sort of 3D matrix saved in the background, or? Or does anyone have a good idea of how I could do this? Any advice would be very much appreciated.
Thanks
/David

採用された回答

the cyclist
the cyclist 2015 年 3 月 17 日
編集済み: the cyclist 2015 年 3 月 17 日
The conceptual method that springs to mind is to calculate the distance from each of your points to the plane you want, and plot the points that are within some tolerance of zero. (You probably don't want to require exactly zero distance, because of floating point arithmetic limitations.)
Search keywords like determine , distance , point , plane and the formula is easy to find.
  1 件のコメント
David
David 2015 年 3 月 17 日
Sounds like a decent way to approach the problem. I guess if the points are sufficiently near, I can identify them by their coinciding position. Thanks again for helping out.

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

その他の回答 (1 件)

the cyclist
the cyclist 2015 年 3 月 17 日
This old post from the forums seems like it might help you.
  2 件のコメント
David
David 2015 年 3 月 17 日
Hi,
thanks for the quick answer. Just continuing: isn't the suggested post suggesting a way of how to project all 3D points onto a specific 2D plane? What I want to do is simply make a 2D cut in my space and simply plot the points that coincide (if any) with my plane.
Or would I do this by the same procedure? I.e. points * null([normal vector])?
Thanks again for the help.
the cyclist
the cyclist 2015 年 3 月 17 日
Sorry. I misread your intent.

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

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by