.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에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!