Clear Filters
Clear Filters

.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 view (last 30 days)
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)

Answers (0)

Community Treasure Hunt

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

Start Hunting!