# How to make rectangular mesh from Points cloud

조회 수: 39(최근 30일)
Amine Bohi 2019년 12월 19일
댓글: darova 2019년 12월 21일
Does somebody know, how to simply and theoretically generate a rectangular mesh from a Points Cloud defined by 3D coordinates (x,y,z)?
Regards
Amine

댓글을 달려면 로그인하십시오.

### 답변(1개)

Katie 2019년 12월 19일
You can use a combination of meshgrid and griddata to do this. In the code below, I'm assuming that x is a column vector with the x coordinates of all of your points, y is a column vector with the y coordinates of all of your points, and z is a column vector with the z coordinates of all of your points.
dx=linspace(min(x),max(x),n);%n is the number of columns you want in your grid
dy=linspace(min(y),max(y),m);%m is the number of rows you want in your grid
[xq yq]=meshgrid(dx,dy);
grid=griddata(x, y z, xq, yq, 'linear');%linear is the type of interpolation used
The documentation for griddata also provides more examples: https://www.mathworks.com/help/matlab/ref/griddata.html
##### 댓글 수: 5표시숨기기 이전 댓글 수: 4
darova 2019년 12월 21일
Maybe such function exists already. Try fsurf2patch

댓글을 달려면 로그인하십시오.

### 범주

Find more on Point Cloud Processing in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by