从MATLAB中的一组内部三维散点绘图表面 [英] Plotting a surface from a set of interior 3D scatter points in MATLAB

查看:1294
本文介绍了从MATLAB中的一组内部三维散点绘图表面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大的(〜60,000)组重新presenting的x,y和z坐标三元组数据点,其分散在整个笛卡尔体积。

I have a large (~60,000) set of triplet data points representing x,y, and z coordinates, which are scattered throughout a Cartesian volume.

我在寻找一种方法,用Matlab可视化的点,在最大程度上说明非凸形状/卷。

I'm looking for a way to use Matlab to visualize the non-convex shape/volume described by the maximum extent of the points.

我可以使用 scatter3 可视化的各个点,但考虑到大量点状的细节由点的噪声掩盖。

I can of course visualize the individual points using scatter3, but given the large number of points the details of the shape are obscured by the noise of the dots.

作为一个比喻,想象你充满了随机大小的球体,如BBS,乒乓球的球,和关西国际机场一个小时的玻璃,然后分别给予每个每个对象的中心坐标。你将如何采取这些坐标和可视化的沙漏的形状包含它们?

As an analogy, imagine that you filled a hour glass with spheres of random sizes such as BBs, ping pong balls, and kix and then were given the coordinates of the center of each of each object. How would you take those coordinates and visualize the shape of the hour glass containing them?

我的例子使用不同大小的对象,因为数据点之间的间隔是不均匀的,并有效地随机的;它使用沙漏因为外形是非凸的。

My example uses different sized objects because the spacing between data points is non-uniform and effectively random; it uses an hourglass because the shape is non-convex.

推荐答案

如果你的面包围点可以被描述为一个凸多面体(即像一个立方体或表面十二,无凹坑或锯齿尖部分的),那么我会通过创建一个3-D的点的Delaunay三角。这将填充围绕点容积与一系列与点作为其顶点的四面体元素,然后就可以找到一组构成的卷的使用<一个外壳三角形面的href="http://www.mathworks.com/help/techdoc/ref/delaunaytri.convexhull.html"><$c$c>convexHull的方法 DelaunayTri 类。

If your surface enclosing the points can be described as a convex polyhedron (i.e. like the surface of a cube or a dodecahedron, without concave pits or jagged pointy parts), then I would start by creating a 3-D Delaunay triangulation of the points. This will fill the volume around the points with a series of tetrahedral elements with the points as their vertices, and you can then find the set of triangular faces that form the outer shell of the volume using the convexHull method of the DelaunayTri class.

下面是产生200个随机点单位立方体内均匀分布,将创建一个四面体网格为这些点的一个例子,然后查找的3-D凸包卷:

Here's an example that generates 200 random points uniformly distributed within the unit cube, creates a tetrahedral mesh for these points, then finds the 3-D convex hull for the volume:

interiorPoints = rand(200,3);      %# Generate 200 3-D points
DT = DelaunayTri(interiorPoints);  %# Create the tetrahedral mesh
hullFacets = convexHull(DT);       %# Find the facets of the convex hull

%# Plot the scattered points:
subplot(2,2,1);
scatter3(interiorPoints(:,1),interiorPoints(:,2),interiorPoints(:,3),'.');
axis equal;
title('Interior points');

%# Plot the tetrahedral mesh:
subplot(2,2,2);
tetramesh(DT);
axis equal;
title('Tetrahedral mesh');

%# Plot the 3-D convex hull:
subplot(2,2,3);
trisurf(hullFacets,DT.X(:,1),DT.X(:,2),DT.X(:,3),'FaceColor','c')
axis equal;
title('Convex hull');

这篇关于从MATLAB中的一组内部三维散点绘图表面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆