Point

  1. Point
    1. 介绍
    2. 案例
      1. AddPoint (Flag=1)
      2. Calculate normal (Flag=2)
    3. CheatTable
    4. Reference

Point

介绍

Point类是用来生成3D的点。

案例

AddPoint (Flag=1)

AddPoint添加点坐标,案例中数据来自于matlab PCtool$^{[1]}$

data=load('lion.xyz');
a=Point('Point Ass1');
a=AddPoint(a,data(:,1),data(:,2),data(:,3));
a=AddPointData(a,data(:,4));
Plot(a);
Plot2(a);

Plot实在matlab中绘图,效果如下:

Plot2在Paraview中绘图,其点显示会更精细,效果如下:

Calculate normal (Flag=2)

CalNormals计算表面的法向,

data=load('lion.xyz');
a=Point('Point Ass1');
a=AddPoint(a,data(:,1),data(:,2),data(:,3));
a=AddPointData(a,data(:,4));
a=CalNormals(a,2);
Plot(a,'Normal',1,'VectorScale',5);
Plot2(a,'Normal',1);

在Matlab中放大图像即可看到箭头如下所示:

在Paraview中设置原始坐标点为黑色,再叠加张位移图,可以看到坐标点沿着法向移动。

CheatTable

Name Varargin Description
AddPoint(obj,x,y) ‘delta’ Add points
AddPointData(obj,Data) Add point data
AddPointVector(obj,Vec) Add point vector
CalNormals(obj, searchRadius) ‘MinNoNeighbours’,’MaxNoNeighbours’ Calculate point normal
GetNgpts(obj) Get total number of point group
GetNpts(obj) Get total number of points
NormalizeNormals Normalize normals
Help(obj) Open help file
Plot(obj) ‘Plabel’,Grid’,’Group’,’Equal’,
‘Vector’,’VectorScale’,
Plot Point2D object
Plot2(obj) Plot Point2D object in Paraview
VTKWrite(obj) ‘Echo’,’Normal’,’NormNormal’ Write VTK file of Point2D

Reference

[1] https://ww2.mathworks.cn/matlabcentral/fileexchange/54412-point-cloud-tools-for-matlab


本网站基于Hexo 3-Hexz主题生成。如需转载请标注来源,如有错误请批评指正,欢迎邮件至 392176462@qq.com