.1. You have: points (matrix nx3) ; normal directions (matrix nx3); 2. Select by pick k points 3.extract the related coordinates, indexes in the matrix and search related normal directions .can you please help me in this.
1 次查看(过去 30 天)
显示 更早的评论
I use the following code based on comparing both sides of plane equationand how can i improve thisfor knowing the index of selected points.
%% Registering the collected data in s with Position and DataIndex.
S = [getCursorInfo(h)];
SI = {S.Position; S.DataIndex}.';% Doing transpose for matrics is flexible for convert to matrics.
MI=cell2mat(SI);
%% Normal vector matrics using ax+by+cz=d
N=[ 1 0 0; 0 1 0; 0 0 1; 1 1 1]';
%random data point from the cloud of points.
Base= [D(3,:); D(100,:); D(200,:)];
%Equation of plane for particular normal
P=[Base*N]';
%% checking the selected point is related to which normal`
Q= [ MI(3,[1 2 3])*N]';
%giving tolerances to the matrics comparision
ismembertol(P,Q,0.3,'Datascale',1)
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!